Note
This help should be accurate and comprehensive. If you see anything missing or that needs to be fixed, see How to Contribute or let us know in the Juice Slack #documentation channel.
The Apps endpoints provide a way to view and update application details
GET
/api/v1/jb/apps/
¶Get a list of Apps
Example Request:
GET /api/v1/jb/apps/
Accept: application/json
Authorization: Token 7297b3ebb0e7f7baf5f54d39908dda99f5ea8665
Example Response:
HTTP/1.1 200 OK
Vary: Accept
Content-Type: text/javascript
[
{
"id": "zylTKNVx",
"slug": "datademo",
"label": "Data Services Demo",
"usage": {},
"package_info": {},
"show_help": false,
"help_html": "\n",
"show_footer": false,
"footer_html": "",
"description": "US Census Bureau data services demo",
"in_maintenance": false,
"maintenance_message": "Currently offline, please try again in a
few minutes."
}
]
Response JSON Object: | |
---|---|
|
|
Request Headers: | |
|
|
Response Headers: | |
|
|
Status Codes: |
|
GET
/api/v1/jb/apps/
(string: app_id)/
¶Get an App’s Details
Example Request:
GET /api/v1/jb/apps/zylTKNVx/
Accept: application/json
Authorization: Token 7297b3ebb0e7f7baf5f54d39908dda99f5ea8665
Example Response:
HTTP/1.1 200 OK
Vary: Accept
Content-Type: text/javascript
{
"id": "zylTKNVx",
"slug": "datademo",
"label": "Data Services Demo",
"usage": {},
"package_info": {},
"show_help": false,
"help_html": "\n",
"show_footer": false,
"footer_html": "",
"description": "US Census Bureau data services demo",
"in_maintenance": false,
"maintenance_message": "Currently offline, please try again in a
few minutes."
}
Parameters: |
|
---|---|
Response JSON Object: | |
|
|
Request Headers: | |
|
|
Response Headers: | |
|
|
Status Codes: |
|
PATCH
/api/v1/jb/apps/
(string: app_id)/
¶Change an applications label, description, help or footer html, and control help or footer display status.
Example Request:
PATCH /api/v1/jb/apps/zylTKNVx/
Accept: application/json
Authorization: Token 7297b3ebb0e7f7baf5f54d39908dda99f5ea8665
{
"show_help": true
}
Example Response:
HTTP/1.1 200 OK
Vary: Accept
Content-Type: text/javascript
{
"id": "zylTKNVx",
"slug": "datademo",
"label": "Data Services Demo",
"usage": {},
"package_info": {},
"show_help": false,
"help_html": "\n",
"show_footer": false,
"footer_html": "",
"description": "US Census Bureau data services demo",
"in_maintenance": false,
"maintenance_message": "Currently offline, please try again in a
few minutes."
}
Parameters: |
|
---|---|
Request JSON Object: | |
|
|
Response JSON Object: | |
|
|
Request Headers: | |
|
|
Response Headers: | |
|
|
Status Codes: |
|
DELETE
/api/v1/jb/apps/
(string: app_id)/clear_cache/
¶Delete an application’s recipe cache which will removed any stored responses from SQL queries.
Example Request:
DELETE /api/v1/jb/apps/zylTKNVx/clear_cache/
Accept: application/json
Authorization: Token 7297b3ebb0e7f7baf5f54d39908dda99f5ea8665
Example Response:
HTTP/1.1 204 NO CONTENT
Vary: Accept
Content-Type: text/javascript
Request Headers: | |
---|---|
|
|
Response Headers: | |
|
|
Status Codes: |
|
GET
/api/v1/jb/apps/
(string: app_id)/usage/?window=
(int: days)¶Get an App’s Usage Logs. If no time window is specified, logs for the last 30 days are returned.
Example Request:
GET /api/v1/jb/apps/zylTKNVx/usage/
Accept: application/json
Authorization: Token 7297b3ebb0e7f7baf5f54d39908dda99f5ea8665
Example Response:
HTTP/1.1 200 OK
Vary: Accept
Content-Type: text/javascript
[
{
"action_description": "Viewed Census stack for Juicebox 3 Demo",
"email": "chris@juice.com",
"full_name": "Christian Oliver",
"timestamp": "2018-01-22T20:25:04.948059Z",
"action": "STACK_ACCESS",
"extra": {
"app": "Juicebox 3 Demo",
"request": {
"path": "/jb3demo/census",
"session": "obpswmqw16wd33va7t0onvub78m8svcq",
"META": {
"HTTP_USER_AGENT": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.132 Safari/537.36",
"SERVER_NAME": "1.0.0.127.in-addr.arpa",
"HTTP_REFERER": "Not found",
"REMOTE_ADDR": "127.0.0.1",
"CONTENT_TYPE": "text/plain",
"REQUEST_METHOD": "GET",
"HTTP_HOST": "localhost:8000",
"SERVER_PORT": "8000",
"QUERY_STRING": "",
"HTTP_ACCEPT_ENCODING": "gzip, deflate, br"
}
},
"stack": "Census",
"app_id": "xVNKTlyz"
}
}
]
Parameters: |
|
---|---|
Response JSON Object: | |
|
|
Request Headers: | |
|
|
Response Headers: | |
|
|
Status Codes: |
|