Author - Scorm Dispatches API

Fetch list of SCORM dispatches

GET /api/author/course_templates/:course_template_id/scorm_dispatches

This endpoint returns a list of all SCORM dispatches

Response Codes

  • 200 OK if the request was successful

Parameters

  • sort String [ name ]

    Query parameter. Causes list to be returned in sorted order ascending order. Prepending values with a - will return results in descending order.

  • search String

    Query parameter. Causes list to be returned filtered by search string.

Example Response

{
  "meta": {},
  "dispatches": [
     {
         "id": "1",
         "course_template_id": 7,
         "external_id": "ac9f6fc18e2a4d2c57cff4ef89c438ac8b61e5fa",
         "name": "My Dispatch 1",
         "user_id": 1,
         "expiration_date": "2018-09-19",
         "enabled": false,
         "registration_count": 100
     },
     {
         "id": "10",
         "course_template_id": 7,
         "external_id": "vc9f6fc18e2a4d2c57cff4ef89c438ac8b61e5fb",
         "name": "My Dispatch 2",
         "user_id": 1,
         "expiration_date": "2018-09-19",
         "enabled": false,
         "registration_count": 100
     }
  ]
}

Show an existing SCORM dispatch

GET /api/author/course_templates/:course_template_id/scorm_dispatches/:id

This endpoint returns a SCORM dispatch. This endpoint issues a GET request with id as the argument

Response Codes

  • 200 OK if the request was successful.
  • 404 Not Found if the resource is not found.

Parameters

  • id Integer Required

    Path parameter. Course template ID.

Example Response

{
  "meta": {},
  "dispatches": [
     {
         "id": "1",
         "course_template_id": 7,
         "external_id": "ac9f6fc18e2a4d2c57cff4ef89c438ac8b61e5fa",
         "name": "My Dispatch ",
         "user_id": 1,
         "expiration_date": "2018-09-19",
         "enabled": false,
         "registration_count": 100
     }
  ]
}

Create SCORM dispatch

POST /api/author/course_templates/:course_template_id/scorm_dispatches

Response Codes

  • 201 Created
  • 400 Bad request could not create SCORM dispatch. If a course is not published, or is archived, a 400 will be returned.

    Path parameter. Course template ID.

Parameters

  • name String Required
    No description provided.
  • expiration_date String

    (iso8601 format, or ‘none’ for no expiration)

  • registration_cap Integer
    No description provided.
  • enabled String

    (‘true’, ‘false’)

Example Request

{
  "scorm_dispatch": {
    "name": "My Dispatch",
    "expiration_date": "2018-12-31",
    "enabled": false,
    "registration_count": 100
  }
}
curl \
  -X POST \
  -H "Authorization: Bearer $TOKEN" \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -d '{"scorm_dispatch":{"name":"My Dispatch","expiration_date":"2018-12-31","enabled":false,"registration_count":100}}' \
  http://<bridge>/api/author/course_templates/:course_template_id/scorm_dispatches
    

Example Response

{
  "meta": {},
  "dispatches": [
     {
         "id": "1",
         "course_template_id": 7,
         "external_id": "ac9f6fc18e2a4d2c57cff4ef89c438ac8b61e5fa",
         "name": "My Dispatch ",
         "user_id": 1,
         "expiration_date": "2018-09-19",
         "enabled": false,
         "registration_count": 100
     }
  ]
}

Update an existing group

PATCH /api/author/course_templates/:course_template_id/scorm_dispatches/:id
PUT /api/author/course_templates/:course_template_id/scorm_dispatches/:id

This endpoint behaves like a PATCH request whether sent by PATCH or PUT.

Response Codes

  • 200 OK if SCORM dispatch is updated

Parameters

  • name String Required
    No description provided.
  • expiration_date String

    (iso8601 format, or ‘none’ for no expiration)

  • registration_cap Integer
    No description provided.
  • enabled String

    (‘true’, ‘false’)

Example Request

{
  "scorm_dispatch": {
    "name": "My Dispatch",
    "expiration_date": "2018-12-31",
    "enabled": false,
    "registration_count": 100
  }
}
curl \
  -X PATCH \
  -H "Authorization: Bearer $TOKEN" \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -d '{"scorm_dispatch":{"name":"My Dispatch","expiration_date":"2018-12-31","enabled":false,"registration_count":100}}' \
  http://<bridge>/api/author/course_templates/:course_template_id/scorm_dispatches/:id
    

Example Response

{
  "meta": {},
  "dispatches": [
     {
         "id": "1",
         "course_template_id": 7,
         "external_id": "ac9f6fc18e2a4d2c57cff4ef89c438ac8b61e5fa",
         "name": "My Dispatch ",
         "user_id": 1,
         "expiration_date": "2018-09-19",
         "enabled": false,
         "registration_count": 100
     }
  ]
}

Delete a SCORM dispatch

DELETE /api/author/course_templates/:course_template_id/scorm_dispatches/:id

Response codes

  • 204 No Content On successful deletion
  • 404 Not Found On successful deletion

Parameters

  • id Integer Required

    Path parameter. Course template id.

Download a SCORM dispatch file

GET /api/author/course_templates/:course_template_id/scorm_dispatches/:id/download

streams download file, returns 404 if not found

Response Codes

  • 200 OK
  • 404 Not Found