================================ Fetch and Load Juicebox Apps API ================================ .. include:: ../../incomplete.rst The Fetch and Load endpoints provide a way to fetch juicebox apps for initial install or update as well as a way load juicebox apps. This must be done by a staff account. Fetch a Juicebox App -------------------- .. http:post:: /api/v1/app/fetch/(string:app_slug)/ Fetch a Juicebox App **Example Request**: .. code:: POST /api/v1/app/fetch/vcdashboard/ Accept: application/json Authorization: Token 7297b3ebb0e7f7baf5f54d39908dda99f5ea8665 { "app_version": "latest" } **Example Response**: .. code:: HTTP/1.1 200 OK Vary: Accept Content-Type: text/javascript { "message": "Loaded vcdashboard version latest" } :json string message: the result message :reqheader Accept: the response content type depends on ``Accept`` header :reqheader Authorization: contains the token to be used for authentication :resheader Content-Type: this depends on ``Accept`` header of request :statuscode 200: OK :statuscode 403: Authentication Failed :statuscode 404: Application Slug not found Load a Juicebox App ------------------- .. http:post:: /api/v1/app/load/(string:app_slug)/ Load a Juicebox App **Example Request**: .. code:: POST /api/v1/app/load/vcdashboard/ Accept: application/json Authorization: Token 7297b3ebb0e7f7baf5f54d39908dda99f5ea8665 **Example Response**: .. code:: HTTP/1.1 204 OK Vary: Accept Content-Type: text/javascript :reqheader Accept: the response content type depends on ``Accept`` header :reqheader Authorization: contains the token to be used for authentication :resheader Content-Type: this depends on ``Accept`` header of request :statuscode 204: OK - Application loaded successfully :statuscode 403: Authentication Failed :statuscode 404: Application Slug not found