All Resources

Interfaces

Admin - Clone Objects API

Controls cloning supported objects and viewing cloning job status.

A Clone Object is an association between a Source and a Destination; it also tracks the current state of a clone operation and any errors that may have occurred during the job.

Object Synopses

CloneObjectRequest

  • source_id Integer

    The id of the source object

  • source_type String

    The type of the source object

  • options Object

    Additional fields to be applied to the new object

CloneObjectResponse

  • id Integer

    Clone Object id

  • state String

    Current state of the cloning operation

  • destination_id Integer

    The id of the destination object

  • destination_type String

    The type of the destination object

  • source_id Integer

    The id of the source object

  • source_type String

    The type of the source object

  • error_messages Array

    An array of any existing error messages

  • created_at String

    The date the clone object was created

  • updated_at String

    The date the clone object was last updated

List Clone Objects

GET /api/admin/clone_objects

Response Codes

  • 200 OK
  • 304 Not Modified

{ "meta": {}, "clone_objects": [ { "id": 3, "state": "created", "destination_id": 1605, "destination_type": "SubAccount", "source_id": 1, "source_type": "SubAccount", "error_messages": [], "created_at": "2018-03-28T15:36:16.915-06:00", "updated_at": "2018-03-28T15:36:16.915-06:00", "parameters": { "subdomain": "sub-clone-1" , "name": "Sub Clone 1" } } ] }

Show a clone object

GET /api/admin/clone_objects/:id

Response Codes

  • 200 OK

Parameters

  • id Integer Required

    Path parameter. Clone Object id

Example Response

{
  "clone_objects": [
    {
      "id": 3,
      "state": "created",
      "destination_id": 1605,
      "destination_type": "SubAccount",
      "source_id": 1,
      "source_type": "SubAccount",
      "error_messages": [],
      "created_at": "2018-03-28T15:36:16.915-06:00",
      "updated_at": "2018-03-28T15:36:16.915-06:00",
      "parameters": { "subdomain": "sub-clone-1" , "name": "Sub Clone 1" }
    }
  ]
}

Create Clone Objects

POST /api/admin/clone_objects

This will create a clone object and initiate a clone job for the requested object. Note that all source_types need to be identical. This endpoint does not support creating clone_objects for different source types at this time.

Response Codes

  • 201 Created
  • 400 Bad Request
  • 409 Conflict

Parameters

  • clone_objects CloneObjectRequest[] Required

    Body parameter. An array of {API::CloneObjectRequest} to be executed.

Example Request

{
  "clone_objects": [
    {
      "source_id": 1,
      "source_type": "SubAccount",
      "options": {
        "subdomain": "sub-clone-1",
        "name": "Sub Clone 1"
      }
    },
    {
      "source_id": 3,
      "source_type": "SubAccount",
      "options": {
        "subdomain": "sub-clone-2",
        "name": "Sub Clone 2"
      }
    }
  ]
}
curl \
  -X POST \
  -H "Authorization: Bearer $TOKEN" \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -d '{"clone_objects":[{"source_id":1,"source_type":"SubAccount","options":{"subdomain":"sub-clone-1","name":"Sub Clone 1"}},{"source_id":3,"source_type":"SubAccount","options":{"subdomain":"sub-clone-2","name":"Sub Clone 2"}}]}' \
  http://<bridge>/api/admin/clone_objects
    

Example Response

{
  "clone_objects": [
    {
      "id": 3,
      "state": "pending",
      "destination_id": 1605,
      "destination_type": "SubAccount",
      "source_id": 1,
      "source_type": "SubAccount",
      "error_messages": [],
      "created_at": "2018-03-28T15:36:16.915-06:00",
      "updated_at": "2018-03-28T15:36:16.915-06:00",
      "parameters": { "subdomain": "sub-clone-1" , "name": "Sub Clone 1" }
    },
    {
      "id": 4,
      "state": "pending",
      "destination_id": 1606,
      "destination_type": "SubAccount",
      "source_id": 3,
      "source_type": "SubAccount",
      "error_messages": [],
      "created_at": "2018-03-28T15:36:26.013-06:00",
      "updated_at": "2018-03-28T15:36:26.013-06:00",
      "parameters": { "subdomain": "sub-clone-2" , "name": "Sub Clone 2" }
    }
  ]
}

Admin - Custom Fields API

Manages custom user fields.

List custom fields

GET /api/author/custom_fields

Response Codes

  • 200 OK

Parameters

  • includes String[]

    Body parameter. An array of custom_fields attributes to add to the result, currently only name is supported.

Example Response

{
    "meta": {},
    "custom_fields": [
        {
            "id": "6",
            "name": "Title"
        },
        {
            "id": "9",
            "name": "Department"
        }
    ]
}

Show a custom field

GET /api/author/custom_fields/:id

Response Codes

  • 200 OK

Example Response

{
    "meta": {},
    "custom_fields": [
        {
            "id": "9",
            "name": "Department"
        }
    ]
}

Create a custom field

POST /api/author/custom_fields

Response Codes

  • 201 Created
  • 400 Bad Request

Parameters

  • custom_fields CustomFields[] Required

    Body parameter.

Example Request

{
    "custom_fields": [
        {
            "name": "Department"
        }
    ]
}
curl \
  -X POST \
  -H "Authorization: Bearer $TOKEN" \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -d '{"custom_fields":[{"name":"Department"}]}' \
  http://<bridge>/api/author/custom_fields
    

Example Response

{
    "meta": {},
    "custom_fields": [
        {
            "id": "9",
            "name": "Department"
        }
    ]
}

Update a custom field

PATCH /api/author/custom_fields/:id
PUT /api/author/custom_fields/:id

Response Codes

  • 200 OK
  • 400 Bad Request

Parameters

  • custom_fields CustomFields[] Required

    Body parameter.

Example Request

{
    "custom_field": {
        "name": "Title"
    }
}
curl \
  -X PATCH \
  -H "Authorization: Bearer $TOKEN" \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -d '{"custom_field":{"name":"Title"}}' \
  http://<bridge>/api/author/custom_fields/:id
    

Example Response

{
    "meta": {},
    "custom_fields": [
        {
            "id": "9",
            "name": "Title"
        }
    ]
}

Destroy a custom field

DELETE /api/author/custom_fields/:id

Response Codes

  • 200 OK
  • 400 Bad Request

Example Response

{
    "meta": {},
    "custom_fields": [
        {
            "id": "9",
            "name": "Title"
        }
    ]
}

Admin - Data Dumps API

Manage data dumps. Note that currently, creating a data dump replaces existing data dumps, so an account will only have one at a time.

Object Synopses

DataDump

  • status String

    Dump status

  • date DateTime

    Dump date

List data dumps

GET /api/admin/data_dumps

Response Codes

  • 200 OK
  • 304 Not Modified

Example Response

{
  "meta": {},
  "data_dumps": [
    {
      "status": "complete",
      "date": "2015-11-12T19:03:37Z"
    }
  ]
}

Create a data dump

POST /api/admin/data_dumps

Response Codes

  • 200 OK

Parameters

  • only Array

    Body parameter. List of model names to include in the dump. E.g. [“users”, “course_templates”]

Example Response

{
  "meta": {},
  "data_dumps": [
    {
      "status": "pending",
      "date": "2015-11-12T19:03:37Z"
    }
  ]
}

Download a data dump

GET /api/admin/data_dumps/download

Redirects to a signed download URL. Returns 404 if there is no completed dump.

Response Codes

  • 302 Found
  • 404 Not Found

Fetch the list of model names that could be included in data dump.

GET /api/admin/data_dumps/model_names

Response Codes

  • 200 Ok

Example Response

{
  "model_names": [
    "users",
    "enrollments",
    "course_templates",
    "..."
  ]
}

Admin - Import Profiles API

Manage importing of profiles.

View Import Profile

GET /api/admin/import_profile

This endpoint exposes the import profile for an account.

Response codes

  • 200 OK
  • 401 Unauthorized

Example Response

{
  "id": 1,
  "csv_days": [false, false, false, false, false, false, false],
  "csv_time": null,
  "has_headers": false,
  "import_columns": [
    {
      "custom_field_id": 1,
      "name": "department",
      "position": 1,
      "primary_field": false
    }
  ]
}

Update import profile

PATCH /api/admin/import_profile
PUT /api/admin/import_profile

A PUT action with json payload to update import profile

Response Codes

  • 200 OK
  • 401 Unauthorized

Parameters

  • csv_url String Required

    Body parameter

  • csv_user String Required

    Body parameter

  • csv_password String Required

    Body parameter

  • has_headers Boolean Required

    Body parameter

  • csv_days String Required

    Body parameter

  • csv_time String Required

    Body parameter

  • columns Hash Required

    Body parameter. A map of column definitions

Example Request

{
  "has_headers" : true,
  "columns": {
    "0": [
      "first_name",
      "last_name",
      "uid"
    ]
  }
}
curl \
  -X PATCH \
  -H "Authorization: Bearer $TOKEN" \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -d '{"has_headers":true,"columns":{"0":["first_name","last_name","uid"]}}' \
  http://<bridge>/api/admin/import_profile
    

Example Response

{
  "id": 1,
  "csv_days": [false, false, false, false, false, false, false],
  "csv_time": null,
  "has_headers": false,
  "import_columns": [
    {
      "custom_field_id": 1,
      "name": "department",
      "position": 1,
      "primary_field": false
    }
  ]
}

Returns import profile file

GET /api/admin/import_profile/file

A GET action to send binary import profile file data to the requesting browser

Response Codes

  • 200 OK
  • 401 Unauthorized

Admin - Link Item Launch Controller API

Get the launch URL and data for launching LTI Link Items as an administrator

GET /api/admin/lti_link_item_launch

Response Codes

  • 200 OK
  • 404 Not Found

Parameters

  • lti_content_item_id String Required

    The id of the LTI Content Item to supply the config info

  • program_id String

    The id of the Program that contains the LTI Content Item

Example Response

{
  "lti_content_item_id": "1",
  "program_id": "2",
  "launch_url": "http://example.com/launch",
  "launch_data": {
    "context_id": "1673cd0f-f043-4d34-bfbc-c13fd5cce99a",
    "context_label": "bridge",
    "custom_field": "value",
    "launch_presentation_document_target": "iframe",
    "launch_presentation_return_url": "https://bridge.local.bridgeops.sh:3000/lti/content_item/1",
    "lis_person_contact_email_primary": "user@example.com",
    "lis_person_name_family": "Last",
    "lis_person_name_full": "First Last",
    "lis_person_name_given": "First",
    "lti_message_type": "basic-lti-launch-request",
    "lti_version": "LTI-1p2",
    "oauth_callback": "about:blank",
    "oauth_consumer_key": "key",
    "oauth_nonce": "534b94655fc5f8ebaa9c97344ea7b953",
    "oauth_signature": "7CgFfsQ14XFAJSM2o8GT6pg8C7w=",
    "oauth_signature_method": "HMAC-SHA1",
    "oauth_timestamp": "1490312905",
    "oauth_version": "1.0",
    "resource_link_description": "This is a Sample Tool Provider.",
    "resource_link_id": "8169f5e122e9dafafd1f02c9e15eb4ab",
    "roles": "administrator",
    "tool_consumer_info_product_family_code": "Bridge",
    "tool_consumer_instance_guid": "bridge.local.bridgeops.sh:3000",
    "tool_consumer_instance_name": "Bridge",
    "tool_consumer_instance_url": "http://bridge.local.bridgeops.sh:3000",
    "user_id": "c74cff31-603b-4c01-832e-1810ee54bf91"
  }
}

Admin - Notification Types API

This API controls notification type preferences, such as enabling or disabling certain types of notifications, or disabling certain channels for notifications.

Object Synopses

NotificationType

  • id String

    An key-based ID identifying the notification type.

  • audience String

    A general descriptor of the users who will receive these types of notifications.

  • category String

    A descriptor which groups similar notification types.

  • name String

    The name of the notification.

  • description String

    A description of the contents and timing of the notification.

  • channels Object

    A list of notification channels, and whether the notification is enabled for the channel. If a channel is not listed, the notification is not available over that channel.

List notification types

GET /api/admin/notification_types

Lists all notification types available to the current user to be configured.

Response Codes

  • 200 OK
  • 403 Forbidden

Example Response

{
   "notification_types": [
     {
       "id": "welcome",
       "audience": "Everyone",
       "category": "User Account",
       "name": "Welcome",
       "description": "Sent immediately after account creation.",
       "channels": {
         "email": true
       }
     },
     {
       "id": "password_reset",
       "audience": "Everyone",
       "category": "User Account",
       "name": "Password Reset",
       "description": "Notification allowing user to reset their password.",
       "channels": {
         "email": true,
         "slack": true
       }
     }
   ]
 }

Get individual notification type

GET /api/admin/notification_types/:id

Provides details for an individual notification type requested.

Response Codes

  • 200 OK
  • 403 Forbidden

Parameters

  • id String Required

    Path parameter. The id key for the requested notification type.

Example Response

{
   "notification_types": [
     {
       "id": "welcome",
       "audience": "Everyone",
       "category": "User Account",
       "name": "Welcome",
       "description": "Sent immediately after account creation.",
       "channels": {
         "email": true
       }
     }
   ]
 }

Update an individual notification type

PATCH /api/admin/notification_types/:id
PUT /api/admin/notification_types/:id

Updates notification preferences for an individual notification type.

Response Codes

  • 200 OK
  • 403 Forbidden
  • 422 Unprocessable Entity

Parameters

  • id String Required

    Path parameter. The id for the notification type to update.

Example Request

{
   "channels": {
     "email": true,
     "slack": false
   }
}
curl \
  -X PATCH \
  -H "Authorization: Bearer $TOKEN" \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -d '{"channels":{"email":true,"slack":false}}' \
  http://<bridge>/api/admin/notification_types/:id
    

Example Response

{
   "notification_types": [
     {
       "id": "welcome",
       "audience": "Everyone",
       "category": "User Account",
       "name": "Welcome",
       "description": "Sent immediately after account creation.",
       "channels": {
         "email": true
       }
     }
   ]
 }

Admin - Reports API

Endpoints to view report data when logged in as Administrator.

Get Report content

GET /api/admin/reports/:id

Response Codes

  • 200 OK
  • 401 Unauthorized
  • 404 Report not found

Parameters

  • id String [ QuizReport, SignInReport ] Required

    Path parameter. Report name

  • course_template_id Integer

    Query parameter. Course ID

Example Response

{
  "reports": [
    {
      "title": "My Course Quiz Results 2016-06-16",
      "report_type": "quiz",
      "data": [
        {
          "reportdata": "data"
        }
      ],
      "data_types": {
        "learner": "string",
        "time": "string",
        "q3": "string",
        "q4": "string",
        "q5": "string",
        "q6": "string"
      }
    }
  ]
}

Admin - Salesforce Accounts API

Salesforce Account information

Salesforce Accounts

GET /api/admin/salesforce_accounts/:id

This endpoint returns information about a given Salesforce account.

Response codes

  • 200 OK
  • 401 Unauthorized
  • 403 Forbidden
  • 404 Not Found

Example Response

{
  "salesforce_account":
  {
    "name": "Flying Squirrels, INC"
  }
}

Admin - User Fields API

Manages user fields.

List user fields

GET /api/author/user_fields

Response Codes

  • 200 OK

Parameters

  • includes String[]

    Body parameter. An array of custom_fields attributes to add to the result, currently only name is supported.

Example Response

{
    "meta":{},
    "user_fields": [
        {
            "id":"2",
            "name":"Management",
            "type": "custom_field_value"
        },
        {
            "id":"1",
            "name":"Job Title",
            "type": "custom_field_value"
        },
        {
            "id": "locale",
            "name": "Locale",
            "type": "user_field_value"
        }
    ]
}

Admin - Users API

Endpoints to create and delete a user when logged in as Administrator.

Object Synopses

UserRequest

  • uid String

    Uid must be included. Unique user id

  • first_name String

    User first name

  • last_name String

    User last name

  • full_name String

    User full name

  • sortable_name String

    User sortable name (last, first in European-American culture)

  • email String

    User email address

  • locale String

    The user’s language code

  • manager_id String

    Optional: ID of the user’s manager. Alternatively, the UID of the user’s manager, prefixed with uid:.

  • hire_date Date

    Date that user was hired, in ISO 8601 format (YYYY-MM-DD)

  • job_title string

    Job title of user

  • department string

    Department of user

  • hris_id string

    HRIS ID of user, must be unique

  • custom_fields Array

    Optional custom fields. These must be created before assigning them to users.

Add a user

POST /api/admin/users

Response Codes

  • 200 OK if the user was created
  • 400 Bad Request if the user already exists

Parameters

  • users UserRequest[] Required

    An array of UserRequest objects. Even though an array is passed in to this endpoint, it only adds one user a time. All extra entries in the array are ignored.

Example Request

{
  "users": [
    "{API::UserRequest}"
  ]
}
curl \
  -X POST \
  -H "Authorization: Bearer $TOKEN" \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -d '{"users":["{API::UserRequest}"]}' \
  http://<bridge>/api/admin/users
    

Example Response

{
  "meta":   {},
  "linked": {},
  "users": [{
    "id": 3,
    "uid": "hsolo",
    "first_name": "Han",
    "last_name":  "Solo",
    "email": "h.solo@millennium-falcon.com",
    "locale": "en",
    "roles": [],
    "name": "Han Solo",
    "avatar_url": null,
    "deleted_at": null,
    "hire_date": "2016-01-31",
    "links": [],
    "meta": {
      "can_masquerade": true
    }
  }]
}

Delete a user

DELETE /api/admin/users/:id

This endpoint deletes the user by id. A user cannot delete himself/herself.

Response Codes

  • 204 No Content when deletion is complete
  • 404 Not Found if requested user id does not exist

Parameters

  • id Integer Required

    The id of the user to be deleted. Alternatively, the user’s uid, prefixed with “uid:”.

  • async Boolean

    If true, the user destroy is processed with an async worker

Return summary information for user

GET /api/admin/users/:id/summary

This endpoint returns counts for the following: Completed Courses Completed Programs Completed Live Trainings Total Completed On Time Total Overdue

Response Codes

  • ‘200’ If user is valid
  • ‘404 Not Found’ if requested user doesn’t exist

Parameters

  • id Integer Required

    The id of the user for which information is to be returned.

  • start_date Date

    Start of the time period to pull data from.

  • end_date Date

    End of the time period to pull data from.

Example Response

{
  "summary": {
    "completed_courses":17,
    "completed_programs":2,
    "completed_live_courses":2,
    "total_on_time":11,
    "total_overdue":8
  }
}

Hide a deleted user

POST /api/admin/users/:id/hide

This endpoint hides the deleted user by id. A user cannot hide himself/herself nor hide an active user.

Response Codes

  • 204 No Content when hiding is complete
  • 404 Not Found if requested user id does not exist

Parameters

  • id Integer Required

    The id of the user to be hidden. Alternatively, the user’s uid, prefixed with “uid:”.

Approver - Approval Events API

Object Synopses

ApprovalEventResponse

  • id Integer

    Id of the event

  • approval_id Integer

    The id of the approval this event is linked to.

  • event_type String

    Type of the event. One of ‘approver_assigned’, ‘comment_added’, ‘approved’, ‘rejected’, ‘requested’, or ‘progress_reset’

  • data Object

    Object with fields holding additional data about the event.

  • created_at String

    Time when this event was created.

  • evidences Array

    Array of evidences attached to the event.

Retrieve a list of approval events for the specified approval

GET /api/approver/approvals/:approval_id/approval_events

Ordered to return newest events first

Response Codes

  • 200 OK
  • 403 Forbidden
  • 404 Not Found

Parameters

  • approval_id Integer Required

    Id of the approval to get events for

Example Response

{
  "approval_events": [
    "{API::ApprovalEventResponse}"
  ]
}

Approver - Approval Summaries API

Fetch approval summaries

GET /api/approver/approval_summaries

Response Codes

  • 200 OK

Example Response

{
  "approval_summaries": [
    {
      "id": "1",
      "learnable_id": "2",
      "learnable_type": "Task",
      "title": "Sign up for enrollment",
      "description": "how to sign up",
      "pending_count": 1,
      "retry_count": 1,
      "approved_count": 1
    }
  ]
}

Fetch an approval summary

GET /api/approver/approval_summaries/:learnable_type/:learnable_id

Response Codes

  • 200 OK
  • 404 Not Found

Parameters

  • learnable_id Integer Required

    Id of the learnable

  • learnable_type String Required

    Type of the learnable

Example Response

{
  "approval_summaries": [
    {
      "id": "1",
      "learnable_id": "2",
      "learnable_type": "Task",
      "title": "Sign up for enrollment",
      "description": "how to sign up",
      "pending_count": 1,
      "retry_count": 1,
      "approved_count": 1
    }
  ],
  "meta": {
    "next_up_approval_summary": ["ApprovalSummary or nil"]
  }
}

Approver - Approvals API

Object Synopses

ApproverResponse

  • id Integer

    Id of approver

  • name String

    The name of this approver (i.e. group or user name).

  • avatar_url String

    URL to approver’s avatar image.

  • email String

    Email of approver.

  • users_count String

    Count of the users in the group, if type is ‘Group’.

  • is_admin_group Boolean

    Whether or not the approver is the fallback ‘Admins’ group.

  • is_account_admin_group Boolean

    Whether or not the approver is the fallback ‘Account Admins’ group.

  • deleted_at String

    Time when this checkpoint enrollment was deleted.

  • type String

    Type of approver. One of ‘Group’ or ‘User’

ApprovalResponse

  • id Integer

    Id of approval

  • enrollable_id Integer

    Id of enrollable linked to this approval. Usually a checkpoint enrollment id.

  • enrollable_type String

    Type of enrollable linked to this approval. Usually a checkpoint enrollment (e.g. TaskEnrollment).

  • state String

    Current state of approval. One of ‘incomplete’, ‘requested’, ‘rejected’, or ‘approved’

  • approver_type String

    Type of approver linked to this approval. One of ‘Group’ or ‘User’

  • approver ApproverResponse

    The approver linked to this approval. May be null if in an ‘incomplete’, state.

  • approver_events ApprovalEventResponse[]

    Array of approval events linked to the approval. Only if included by the endpoint.

  • created_at String

    Time when this checkpoint enrollment was created.

  • updated_at String

    Time when this checkpoint enrollment was last updated.

Fetch an approval

GET /api/approver/approvals/:id

Response Codes

  • 200 OK
  • 403 Forbidden
  • 404 Not Found

Parameters

  • id Integer Required

    Id of the approval

Example Response

{
  "approvals": [
    "{API::ApprovalResponse}"
  ]
}

Update an approval

PATCH /api/approver/approvals/:id
PUT /api/approver/approvals/:id

Response Codes

  • 200 OK
  • 403 Forbidden
  • 404 Not Found
  • 422 Unprocessable Entity

Parameters

  • id Integer Required

    Id of the approval

  • comment String

    Comment to be added to the approval

  • state String

    State of the approval, can be: [“rejected”, “approved”]

Example Request

{
  "comment": "Look at this again?",
  "state": "rejected"
}
curl \
  -X PATCH \
  -H "Authorization: Bearer $TOKEN" \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -d '{"comment":"Look at this again?","state":"rejected"}' \
  http://<bridge>/api/approver/approvals/:id
    

Example Response

{
  "approvals": [
    "{API::ApprovalResponse}"
  ]
}

Fetch next approval

GET /api/approver/approvals/next

Response Codes

  • 200 OK
  • 403 Forbidden
  • 404 Not Found

Parameters

  • learnable_id Integer Required

    Id of the current approval’s learnable

  • learnable_type String Required

    Type of the current approval’s learnable

  • current_approval_id Integer

    Id of the current approval

  • approval_state String

    State of the next approval

Example Response

{
  "approvals": [
    "{API::ApprovalResponse}"
  ]
}

Fetch previous approval

GET /api/approver/approvals/previous

Response Codes

  • 200 OK
  • 403 Forbidden
  • 404 Not Found

Parameters

  • learnable_id Integer Required

    Id of the current approval’s learnable

  • learnable_type String Required

    Type of the current approval’s learnable

  • current_approval_id Integer

    Id of the current approval

  • approval_state String

    State of the next approval

Example Response

{
  "approvals": [
    "{API::ApprovalResponse}"
  ]
}

Author - Abstract Group Enrollments API

Author - Abstract Learner API

Author - Affiliated Sub Accounts API

This endpoint controls the affiliation of items with subaccounts.

List affiliated accounts

GET /api/author/course_templates/:course_template_id/sub_accounts
GET /api/author/affiliated_sub_accounts

Response codes

  • 200 OK

Parameters

  • sort String [ name ]

    Query parameter. Applies a sort ot the result list.

Example Request

/api/author/affiliated_sub_accounts?item_id=1&item_type=CourseTemplate

Example Response

{
  "meta": {},
  "sub_accounts": [
    {
      "id": "1",
      "name": "SubAccount",
      "affiliated": false,
      "has_enrollments": false,
      "has_foreign_sources": false,
      "user_count": 1
    }
  ]
}

Share

PUT /api/author/course_templates/:course_template_id/sub_accounts/share
PUT /api/author/affiliated_sub_accounts/share

Response codes

  • 200 OK On successful share
  • 400 Bad Request When item is archived
  • 403 Forbidden
  • 409 Conflict While item is pending affiliation

Parameters

  • item_id Integer Required

    The id of the item being shared

  • item_type String Required

    The type of item being shared

  • domain_id Integer Required

    The id of the domain

Example Request

{
  "item_id": 1,
  "item_type": "CourseTemplate",
  "domain_id": 1
}
curl \
  -X PUT \
  -H "Authorization: Bearer $TOKEN" \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -d '{"item_id":1,"item_type":"CourseTemplate","domain_id":1}' \
  http://<bridge>/api/author/course_templates/:course_template_id/sub_accounts/share
    

Example Response

{
  "meta": {},
  "sub_accounts": [
    {
      "id": "1",
      "name": "SubAccount",
      "affiliated": true,
      "has_enrollments": false,
      "has_foreign_sources": false,
      "user_count": 1
    }
  ]
}

Share Batch

PUT /api/author/affiliated_sub_accounts/share_batch

Response codes

  • 200 OK On successful share of all items
  • 400 Bad Request When an issue occurs with one or more items
  • 403 Forbidden

Parameters

  • affiliations Array Required

    An array of objects to affiliate, each consisting of an item_type, item_id, and domain_id.

Example Request

{
  "affiliations": [
    {
      "item_id": 1,
      "item_type": "CourseTemplate",
      "domain_id": 1
    },
    {
      "item_id": 1,
      "item_type": "LiveCourse",
      "domain_id": 2
    },
    {
      "item_id": 1,
      "item_type": "Task",
      "domain_id": 3
    },
    {
      "item_id": 1,
      "item_type": "Program",
      "domain_id": 4
    }
  ]
}
curl \
  -X PUT \
  -H "Authorization: Bearer $TOKEN" \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -d '{"affiliations":[{"item_id":1,"item_type":"CourseTemplate","domain_id":1},{"item_id":1,"item_type":"LiveCourse","domain_id":2},{"item_id":1,"item_type":"Task","domain_id":3},{"item_id":1,"item_type":"Program","domain_id":4}]}' \
  http://<bridge>/api/author/affiliated_sub_accounts/share_batch
    

Example Response

{
  "affiliations": [
    {
      "item_id": 1,
      "item_type": "CourseTemplate",
      "status": "success",
      "sub_accounts": [
        {
          "id": "1",
          "name": "SubAccount",
          "affiliated": true,
          "has_enrollments": false,
          "has_foreign_sources": false,
          "user_count": 1
        }
      ]
    },
    {
      "item_id": 1,
      "item_type": "LiveCourse",
      "status": "success",
      "sub_accounts": [
        {
          "id": "2",
          "name": "SubAccount",
          "affiliated": true,
          "has_enrollments": false,
          "has_foreign_sources": false,
          "user_count": 1
        }
      ]
    },
    {
      "item_id": 1,
      "item_type": "Task",
      "status": "error",
      "error_code": "item_outside_root_domain",
      "sub_accounts": [
        {
          "id": "3",
          "name": "SubAccount",
          "affiliated": true,
          "has_enrollments": false,
          "has_foreign_sources": false,
          "user_count": 1
        }
      ]
    },
    {
      "item_id": 1,
      "item_type": "Program",
      "status": "success",
      "sub_accounts": [
        {
          "id": "4",
          "name": "SubAccount",
          "affiliated": true,
          "has_enrollments": false,
          "has_foreign_sources": false,
          "user_count": 1
        }
      ]
    }
  ]
}

Share Tags

PUT /api/author/affiliated_sub_accounts/share_tags

Response codes

  • 200 OK On successful share
  • 400 Bad Request When item is archived
  • 403 Forbidden
  • 409 Conflict While item is pending affiliation

Parameters

  • item_id Integer Required

    The id of the item being shared

  • item_type String Required

    The type of item being shared

  • domain_id Integer Required

    The id of the domain

Example Request

{
  "item_id": 1,
  "item_type": "CourseTemplate",
  "domain_id": 1
}
curl \
  -X PUT \
  -H "Authorization: Bearer $TOKEN" \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -d '{"item_id":1,"item_type":"CourseTemplate","domain_id":1}' \
  http://<bridge>/api/author/affiliated_sub_accounts/share_tags
    

Example Response

{
  "meta": {},
  "sub_accounts": [
    {
      "id": "1",
      "name": "SubAccount",
      "affiliated": true,
      "has_enrollments": false,
      "has_foreign_sources": false,
      "user_count": 1
    }
  ]
}

Share Group Relevance

PUT /api/author/affiliated_sub_accounts/share_group_relevance

Response codes

  • 200 OK On successful share
  • 400 Bad Request When item is archived
  • 403 Forbidden
  • 409 Conflict While item is pending affiliation

Parameters

  • item_id Integer Required

    The id of the item whose group relevance is being shared

  • item_type String Required

    The type of item whose group relevance is being shared

  • domain_id Integer Required

    The id of the domain

Example Request

{
  "item_id": 1,
  "item_type": "CourseTemplate",
  "domain_id": 1
}
curl \
  -X PUT \
  -H "Authorization: Bearer $TOKEN" \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -d '{"item_id":1,"item_type":"CourseTemplate","domain_id":1}' \
  http://<bridge>/api/author/affiliated_sub_accounts/share_group_relevance
    

Example Response

{
  "meta": {},
  "sub_accounts": [
    {
      "id": "1",
      "name": "SubAccount",
      "affiliated": true,
      "has_enrollments": false,
      "has_foreign_sources": false,
      "user_count": 1
    }
  ]
}

Revoke

PUT /api/author/course_templates/:course_template_id/sub_accounts/revoke
PUT /api/author/affiliated_sub_accounts/revoke

Response codes

  • 200 OK On successful revoke
  • 400 Bad Request When item is archived
  • 403 Forbidden
  • 409 Conflict While item is pending affiliation

Parameters

  • item_id Integer Required

    The id of the item being revoked

  • item_type String Required

    The type of item being revoked

  • domain_id Integer Required

    The id of the domain

Example Request

{
  "item_id": 1,
  "item_type": "CourseTemplate",
  "domain_id": 1
}
curl \
  -X PUT \
  -H "Authorization: Bearer $TOKEN" \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -d '{"item_id":1,"item_type":"CourseTemplate","domain_id":1}' \
  http://<bridge>/api/author/course_templates/:course_template_id/sub_accounts/revoke
    

Example Response

{
  "meta": {},
  "sub_accounts": [
    {
      "id": "1",
      "name": "SubAccount",
      "affiliated": false,
      "has_enrollments": false,
      "has_foreign_sources": false,
      "user_count": 1
    }
  ]
}

Revoke Batch

PUT /api/author/affiliated_sub_accounts/revoke_batch

Response codes

  • 200 OK On successful share of all items
  • 400 Bad Request When an issue occurs with one or more items
  • 403 Forbidden

Parameters

  • affiliations Array Required

    An array of objects to affiliate, each consisting of an item_type, item_id, and domain_id.

Example Request

{
  "affiliations": [
    {
      "item_id": 1,
      "item_type": "CourseTemplate",
      "domain_id": 1
    },
    {
      "item_id": 1,
      "item_type": "LiveCourse",
      "domain_id": 2
    },
    {
      "item_id": 1,
      "item_type": "Task",
      "domain_id": 3
    },
    {
      "item_id": 1,
      "item_type": "Program",
      "domain_id": 4
    }
  ]
}
curl \
  -X PUT \
  -H "Authorization: Bearer $TOKEN" \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -d '{"affiliations":[{"item_id":1,"item_type":"CourseTemplate","domain_id":1},{"item_id":1,"item_type":"LiveCourse","domain_id":2},{"item_id":1,"item_type":"Task","domain_id":3},{"item_id":1,"item_type":"Program","domain_id":4}]}' \
  http://<bridge>/api/author/affiliated_sub_accounts/revoke_batch
    

Example Response

{
  "affiliations": [
    {
      "item_id": 1,
      "item_type": "CourseTemplate",
      "status": "success",
      "sub_accounts": [
        {
          "id": "1",
          "name": "SubAccount",
          "affiliated": true,
          "has_enrollments": false,
          "has_foreign_sources": false,
          "user_count": 1
        }
      ]
    },
    {
      "item_id": 1,
      "item_type": "LiveCourse",
      "status": "success",
      "sub_accounts": [
        {
          "id": "2",
          "name": "SubAccount",
          "affiliated": true,
          "has_enrollments": false,
          "has_foreign_sources": false,
          "user_count": 1
        }
      ]
    },
    {
      "item_id": 1,
      "item_type": "Task",
      "status": "error",
      "error_code": "item_outside_root_domain",
      "sub_accounts": [
        {
          "id": "3",
          "name": "SubAccount",
          "affiliated": true,
          "has_enrollments": false,
          "has_foreign_sources": false,
          "user_count": 1
        }
      ]
    },
    {
      "item_id": 1,
      "item_type": "Program",
      "status": "success",
      "sub_accounts": [
        {
          "id": "4",
          "name": "SubAccount",
          "affiliated": true,
          "has_enrollments": false,
          "has_foreign_sources": false,
          "user_count": 1
        }
      ]
    }
  ]
}

Revoke Tags

PUT /api/author/affiliated_sub_accounts/revoke_tags

Response codes

  • 200 OK On successful revoke
  • 400 Bad Request When item is archived
  • 403 Forbidden
  • 409 Conflict While item is pending affiliation

Parameters

  • item_id Integer Required

    The id of the item being revoked

  • item_type String Required

    The type of item being revoked

  • domain_id Integer Required

    The id of the domain

Example Request

{
  "item_id": 1,
  "item_type": "CourseTemplate",
  "domain_id": 1
}
curl \
  -X PUT \
  -H "Authorization: Bearer $TOKEN" \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -d '{"item_id":1,"item_type":"CourseTemplate","domain_id":1}' \
  http://<bridge>/api/author/affiliated_sub_accounts/revoke_tags
    

Example Response

{
  "meta": {},
  "sub_accounts": [
    {
      "id": "1",
      "name": "SubAccount",
      "affiliated": false,
      "has_enrollments": false,
      "has_foreign_sources": false,
      "user_count": 1
    }
  ]
}

Revoke Group Relevance

PUT /api/author/affiliated_sub_accounts/revoke_group_relevance

Response codes

  • 200 OK On successful revoke
  • 400 Bad Request When item is archived
  • 403 Forbidden
  • 409 Conflict While item is pending affiliation

Parameters

  • item_id Integer Required

    The id of the item being revoked

  • item_type String Required

    The type of item being revoked

  • domain_id Integer Required

    The id of the domain

Example Request

{
  "item_id": 1,
  "item_type": "CourseTemplate",
  "domain_id": 1
}
curl \
  -X PUT \
  -H "Authorization: Bearer $TOKEN" \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -d '{"item_id":1,"item_type":"CourseTemplate","domain_id":1}' \
  http://<bridge>/api/author/affiliated_sub_accounts/revoke_group_relevance
    

Example Response

{
  "meta": {},
  "sub_accounts": [
    {
      "id": "1",
      "name": "SubAccount",
      "affiliated": false,
      "has_enrollments": false,
      "has_foreign_sources": false,
      "user_count": 1
    }
  ]
}

Author - Attachments API

Author - Checkpoint Enrollments API

Enables fetching, updating, and resetting enrollments (learners) for a task

Object Synopses

CheckpointEnrollmentResponse

  • id Integer

    Id of enrollment

  • user_id Integer

    User id of learner

  • name String

    Name of learner

  • email String

    Email of learner

  • avatar_url String

    URL to avatar image

  • state String

    Current state of enrollment. One of ‘assigned’ or ‘complete’

  • has_custom_approver Boolean

    Whether this checkpoint enrollment has custom approver set.

  • sources Array

    Lists the sources of the enrollment whether individual user enrollment, group enrollment, etc.

  • approval ApprovalResponse

    The approval linked to this checkpoint enrollment. Only there if the checkpoint requires approval.

  • foreseen_approver ApproverResponse

    If the linked approval exists and is in the ‘incomplete’ state, it represents who the approver will be when the learner requests approval.

  • default_approver ApproverResponse

    If the linked approval exists, it represents the default approver.

  • created_at String

    Time when this checkpoint enrollment was created.

  • updated_at String

    Time when this checkpoint enrollment was last updated.

  • deleted_at String

    Time when this checkpoint enrollment was deleted. Only present if deleted records were requested.

  • end_at DateTime

    Due date for this checkpoint enrollment

  • completed_at DateTime

    Completion date for this checkpoint enrollment

  • allow_re_enroll Boolean

    Can the learner be re-enrolled with this checkpoint enrollment.

Fetch list of enrollments (learners) in a checkpoint

GET /api/author/tasks/:task_id/learners

Response Codes

  • 200 OK
  • 404 Not Found

Parameters

  • task_id Integer Required

    Path parameter. Checkpoint id for the learners we want

  • updated_after DateTime

    Query parameter. Filters list to only include learners updated after the given RFC 3339 compliant timestamp.

  • created_after DateTime

    Query parameter. Filters list to only include learners created after the given RFC 3339 compliant timestamp.

  • deleted_after DateTime

    Query parameter. Filters list to only include learners deleted after the given RFC 3339 compliant timestamp.

  • updated_before DateTime

    Query parameter. Filters list to only include learners updated before the given RFC 3339 compliant timestamp.

  • created_before DateTime

    Query parameter. Filters list to only include learners created before the given RFC 3339 compliant timestamp.

  • deleted_before DateTime

    Query parameter. Filters list to only include learners deleted before the given RFC 3339 compliant timestamp.

  • only_deleted Boolean

    Filters list to only include deleted learners.

  • with_deleted Boolean

    Filters list to also include deleted learners.

  • includes[] String [ approval_events ]

    Query paramater. Additional information to be returned in the response. If approval_events is given, response will include any approval events in any linked approvals.

  • sort String [ name, end_at, approver, status ]

    Query parameter causes list to be returned in ascending order. Values may be prepended with - for descending order.

  • search String

    Find enrollments with learner matching values in first name, last name, uid, or email.

  • user_id Integer

    Find enrollments belonging to a specific learner.

Example Response

{
  "meta": {
    "next": "http://bridge.bridgeapp.com/api/author/tasks/1/learners?after=eyJ0eXAiOiJKV1QiLCJhSDiQQ"
  },
  "enrollments": [
    "{API::CheckpointEnrollmentResponse}"
  ]
}

Update checkpoint enrollment

PATCH /api/author/tasks/:task_id/learners/:id
PUT /api/author/tasks/:task_id/learners/:id

Response Codes

  • 200 OK
  • 404 Not Found

Parameters

  • checkpoint_id Integer Required

    Path parameter. Checkpoint id for the learners we want

  • checkpoint_enrollment_id Integer Required

    Path parameter. Checkpoint enrollment id for the learner

  • payload JSON Required
    No description provided.

Example Request

/api/author/tasks/1/learners/1

Example Response

{
  "meta": {},
  "enrollments": [
    "{API::CheckpointEnrollmentResponse}"
  ]
}

Author - Checkpoints API

Object Synopses

SubAccount

The checkpoint’s original subaccount.

  • id String

    Subaccount id.

  • name String

    Subaccount name.

  • is_root Boolean

    Indicates if the subaccount is the main subaccount.

  • sub_accounts_exist Boolean

    Indicates whether subaccounts other than the main exist on this account.

  • not_current Boolean

    Indicates if the checkpoint’s subaccount is the subaccount this request was made under.

  • tac_type String

    Describes the subaccount’s terms and conditions.

  • tac_custom_body_markup String

    Custom body for custom terms and conditions.

  • tac_updated_at String

    Timestamp of last update of terms and conditions.

Approver

An approver set.

  • id String

    Approver or approver group’s id.

  • name String or nil

    Name of approver or approver group.

  • avatar_url String or null

    URL of the approver’s avatar.

  • email String or null

    Email address of the approver.

  • users_count Integer or null

    Count of members of the approval group.

  • deleted_at String or null

    Timestamp of approval group’s deletion.

  • type String or null

    Type of approver. May be User or Group.

  • is_admin_group Boolean

    Indicates the approver is an admin group.

  • is_account_admin_group Boolean

    Indicates if the approver is an account admin group.

Checkpoint

  • id String

    Checkpoint id.

  • title String

    Title describing the checkpoint.

  • created_at DateTime Required

    The timestamp at which this checkpoint was created

  • updated_at DateTime Required

    The timestamp at which this checkpoint was last changed

  • deleted_at DateTime

    The timestamp at which this checkpoint was deleted. Only present if deleted records were requested

  • author_id String

    Id of the checkpoint’s creator.

  • instructions String

    DEPRECATED

  • description String

    A brief description of what learners can expect from the checkpoint.

  • has_unpublished_changes Boolean or null

    Indicates if the instructions have been edited but not yet published.

  • structured_body Object

    An object containing formatting details for the checkpoint instruction page.

  • instructions_attachments Object[] Required

    Array of file attachments to the checkpoint instructions. Included only if requested with query parameter ?include_instructions_attachments=true.

  • is_published Boolean

    A boolean describing whether checkpoint is currently visible to enrolled learners.

  • enrollments_count Integer

    Count of learners enrolled in this checkpoint.

  • enrollment_counts Object

    Count of enrolled learners broken out by overdue, incomplete, finished, and all counts.

  • has_certificate Boolean or null

    Indicates if a certificate is created at completion.

  • requires_approval Boolean or null

    Indicates if checkpoint requires approval to be completed.

  • blocks_progress Boolean or null

    Indicates if the checkpoints blocks in-order programs. Only valid if requires_approval is true.

  • attachments_count Integer

    Count of attached files.

  • requires_evidence Boolean or null

    Indicate whether checkpoint requires evidence of completion to be uploaded.

  • direct_messaging_enabled Boolean or null

    Indicates if notifications are turned on for checkpoints on this subaccount.

  • author Object

    Details of the author of the checkpoint.

  • sub_account SubAccount

    The subaccount which created the checkpoint.

  • has_shared_enrollments Boolean or null

    Indicates if checkpoint has been shared with any other subaccounts.

  • default_approver_type String or null

    Indicates the type of the approver set. Null indicates approval from learner’s own manager.

  • default_approver_id String or null

    Id of the approver set.

  • default_approver Approver

    Object representing the default approver set.

  • pending_approval_count Integer

    Count of enrollments with approval requested.

  • due_date_type String

    Describes how the due date is calculated.

  • default_due_on_date Boolean or null

    Describes the exact due date of all new enrollments. Applicable only if ‘due_date_type’ is ‘fixed’.

  • default_days_until_due Boolean or null

    Describes the number of days from a new enrollment until checkpoint is due. Applicable only if ‘due_date_type’ is ‘relative’.

  • tags Array

    A list of tags for the live course

  • matching_tags Array

    Tags matching the search query for the live course

CheckpointResponse

CheckpointRequest

Checkpoint request object.

  • title String

    Title describing the checkpoint.

  • instructions String

    DEPRECATED

  • description String

    A brief description of what learners can expect from the checkpoint.

  • has_certificate Boolean or null

    Indicates if a certificate is created at completion.

  • requires_approval Boolean or null

    Indicates if checkpoint requires approval to be completed.

  • blocks_progress Boolean or null

    Indicates if the checkpoints blocks in-order programs. Only valid if requires_approval is true.

  • default_approver_type String or null

    Indicates the type of the approver set. Null indicates approval from learner’s own manager.

  • default_approver_id String or null

    Id of the approver set

  • requires_evidence Boolean or null

    Indicate whether checkpoint requires evidence of completion to be uploaded.

  • default_due_on_date Boolean or null

    Describes the exact due date of all new enrollments. Applicable only if ‘due_date_type’ is ‘fixed’.

  • default_days_until_due Boolean or null

    Describes the number of days from a new enrollment until checkpoint is due. Applicable only if ‘due_date_type’ is ‘relative’.

Fetch checkpoints

GET /api/author/tasks

Response Codes

  • 200 OK

Parameters

  • sort String [ newest, -newest, alphabetical, -alphabetical, updated, -updated ]

    Query parameter. Sorts results.

  • search String

    Query parameter. Searches checkpoints by title, returning matches.

  • subaccounts Checkpoint

    Query parameter. Limit results to checkpoints in any of the given subaccounts.

  • updated_after DateTime

    Filters list to only include checkpoints updated after the given RFC 3339 compliant timestamp.

  • created_after DateTime

    Filters list to only include checkpoints created after the given RFC 3339 compliant timestamp.

  • deleted_after DateTime

    Filters list to only include checkpoints deleted after the given RFC 3339 compliant timestamp.

  • updated_before DateTime

    Filters list to only include checkpoints updated before the given RFC 3339 compliant timestamp.

  • created_before DateTime

    Filters list to only include checkpoints created before the given RFC 3339 compliant timestamp.

  • deleted_before DateTime

    Filters list to only include checkpoints deleted before the given RFC 3339 compliant timestamp.

  • only_deleted Boolean

    Filters list to only include deleted checkpoints.

  • with_deleted Boolean

    Filters list to also include deleted checkpoints.

  • include_instructions_attachments Boolean

    Query parameter. Response will include attachments from checkpoint instructions.

Example Response

{
  "meta": {},
  "tasks": [
    {
      "id": "32",
      "title": "Test Checkpoint",
      "tags": [],
      "author_id": "2",
      "instructions": null,
      "description": "This is a test checkpoint.",
      "has_unpublished_changes": false,
      "structured_body": null,
      "is_published": true,
      "enrollments_count": 0,
      "enrollment_counts": {
        "all": 0,
        "overdue": 0,
        "incomplete": 0,
        "finished": 0
      },
      "has_certificate": false,
      "requires_approval": false,
      "blocks_progress": false,
      "updated_at": "2017-12-08T09:04:52.507-07:00",
      "attachments_count": 0,
      "requires_evidence": false,
      "author": {
        "id": "2",
        "uid": "testauthor",
        "name": "Test Author",
        "email": "testauthor@example.com",
        "avatar_url": null
      },
      "sub_account": {
        "id": "1",
        "name": "Bridge",
        "is_root": true,
        "sub_accounts_exist": false,
        "not_current": false,
        "tac_type": "domestic",
        "tac_custom_body_markup": null,
        "tac_updated_at": "2017-08-10T17:30:23.440Z"
      },
      "default_approver_type": null,
      "default_approver_id": null,
      "default_approver": null,
      "due_date_type": "relative",
      "default_due_on_date": null,
      "default_days_until_due": 7
    }
  ]
}

Returns an author_checkpoints

Create checkpoint

POST /api/author/tasks

Response codes

  • 201 Created

Parameters

  • tasks CheckpointRequest[] Required

    Body parameter. An array of CheckpointRequests to be created.

Example Response

{
  "meta": {},
  "tasks": [
    {
      "id": "32",
      "title": "Test Checkpoint",
      "author_id": "2",
      "instructions": null,
      "description": "This is a test checkpoint.",
      "has_unpublished_changes": false,
      "structured_body": null,
      "is_published": true,
      "enrollments_count": 0,
      "enrollment_counts": {
        "all": 0,
        "overdue": 0,
        "incomplete": 0,
        "finished": 0
      },
      "has_certificate": false,
      "requires_approval": false,
      "blocks_progress": false,
      "updated_at": "2017-12-08T09:04:52.507-07:00",
      "attachments_count": 0,
      "requires_evidence": false,
      "author": {
        "id": "2",
        "uid": "testauthor",
        "name": "Test Author",
        "email": "testauthor@example.com",
        "avatar_url": null
      },
      "sub_account": {
        "id": "1",
        "name": "Bridge",
        "is_root": true,
        "sub_accounts_exist": false,
        "not_current": false,
        "tac_type": "domestic",
        "tac_custom_body_markup": null,
        "tac_updated_at": "2017-08-10T17:30:23.440Z"
      },
      "default_approver_type": null,
      "default_approver_id": null,
      "default_approver": null,
      "due_date_type": "relative",
      "default_due_on_date": null,
      "default_days_until_due": 7
    }
  ]
}

Returns an author_checkpoints

Fetch specific checkpoint

GET /api/author/tasks/:id

Response codes

  • 200 OK

Parameters

  • id Integer Required

    Path parameter. Checkpoint id.

  • include_instructions_attachments Boolean

    Query parameter. Response will include attachments from checkpoint instructions.

Example Response

{
  "meta": {},
  "tasks": [
    {
      "id": "32",
      "title": "Test Checkpoint",
      "tags": [],
      "author_id": "2",
      "instructions": null,
      "description": "This is a test checkpoint.",
      "has_unpublished_changes": false,
      "structured_body": null,
      "is_published": true,
      "enrollments_count": 0,
      "enrollment_counts": {
        "all": 0,
        "overdue": 0,
        "incomplete": 0,
        "finished": 0
      },
      "has_certificate": false,
      "requires_approval": false,
      "blocks_progress": false,
      "updated_at": "2017-12-08T09:04:52.507-07:00",
      "attachments_count": 0,
      "requires_evidence": false,
      "author": {
        "id": "2",
        "uid": "testauthor",
        "name": "Test Author",
        "email": "testauthor@example.com",
        "avatar_url": null
      },
      "sub_account": {
        "id": "1",
        "name": "Bridge",
        "is_root": true,
        "sub_accounts_exist": false,
        "not_current": false,
        "tac_type": "domestic",
        "tac_custom_body_markup": null,
        "tac_updated_at": "2017-08-10T17:30:23.440Z"
      },
      "default_approver_type": null,
      "default_approver_id": null,
      "default_approver": null,
      "due_date_type": "relative",
      "default_due_on_date": null,
      "default_days_until_due": 7
    }
  ]
}

Returns an author_checkpoints

Update checkpoints

PATCH /api/author/tasks/:id
PUT /api/author/tasks/:id

Response codes

  • 200 OK

Parameters

  • id Integer Required

    Path parameter. Checkpoint id.

  • task CheckpointRequest Required

    Body parameter. Object with updates to the checkpoint.

Example Response

{
  "meta": {},
  "tasks": [
    {
      "id": "32",
      "title": "Test Checkpoint",
      "author_id": "2",
      "instructions": null,
      "description": "This is a test checkpoint.",
      "has_unpublished_changes": false,
      "structured_body": null,
      "is_published": true,
      "enrollments_count": 0,
      "enrollment_counts": {
        "all": 0,
        "overdue": 0,
        "incomplete": 0,
        "finished": 0
      },
      "has_certificate": false,
      "requires_approval": false,
      "blocks_progress": false,
      "updated_at": "2017-12-08T09:04:52.507-07:00",
      "attachments_count": 0,
      "requires_evidence": false,
      "author": {
        "id": "2",
        "uid": "testauthor",
        "name": "Test Author",
        "email": "testauthor@example.com",
        "avatar_url": null
      },
      "sub_account": {
        "id": "1",
        "name": "Bridge",
        "is_root": true,
        "sub_accounts_exist": false,
        "not_current": false,
        "tac_type": "domestic",
        "tac_custom_body_markup": null,
        "tac_updated_at": "2017-08-10T17:30:23.440Z"
      },
      "default_approver_type": null,
      "default_approver_id": null,
      "default_approver": null,
      "due_date_type": "relative",
      "default_due_on_date": null,
      "default_days_until_due": 7,
      "graphic": {
        "gradient": 0,
        "image": null
      }
    }
  ]
}

Returns an author_checkpoints

Delete checkpoint

DELETE /api/author/tasks/:id

Response codes

  • 204 No Content
  • 400 Bad Request

Parameters

  • id Integer Required

    Path parameter. Checkpoint id.

Publish a checkpoint

POST /api/author/tasks/:id/publish

Parameters

  • id Integer Required

    Path parameter. Checkpoint id.

Example Response

{
  "meta": {},
  "tasks": [
    {
      "id": "32",
      "title": "Copy of Test Checkpoint",
      "author_id": "2",
      "instructions": null,
      "description": "This is a test checkpoint.",
      "has_unpublished_changes": false,
      "structured_body": null,
      "is_published": true,
      "enrollments_count": 0,
      "enrollment_counts": {
        "all": 0,
        "overdue": 0,
        "incomplete": 0,
        "finished": 0
      },
      "has_certificate": false,
      "requires_approval": false,
      "blocks_progress": false,
      "updated_at": "2017-12-08T09:04:52.507-07:00",
      "attachments_count": 0,
      "requires_evidence": false,
      "author": {
        "id": "2",
        "uid": "testauthor",
        "name": "Test Author",
        "email": "testauthor@example.com",
        "avatar_url": null
      },
      "sub_account": {
        "id": "1",
        "name": "Bridge",
        "is_root": true,
        "sub_accounts_exist": false,
        "not_current": false,
        "tac_type": "domestic",
        "tac_custom_body_markup": null,
        "tac_updated_at": "2017-08-10T17:30:23.440Z"
      },
      "default_approver_type": null,
      "default_approver_id": null,
      "default_approver": null,
      "due_date_type": "relative",
      "default_due_on_date": null,
      "default_days_until_due": 7
    }
  ]
}

Returns an author_checkpoints

Clone a checkpoint

POST /api/author/tasks/:id/clone

Response Codes

  • 200 OK

Parameters

  • id Integer Required

    Path parameter. Checkpoint id.

Example Response

{
  "meta": {},
  "tasks": [
    {
      "id": "32",
      "title": "Copy of Test Checkpoint",
      "author_id": "2",
      "instructions": null,
      "description": "This is a test checkpoint.",
      "has_unpublished_changes": false,
      "structured_body": null,
      "is_published": true,
      "enrollments_count": 0,
      "enrollment_counts": {
        "all": 0,
        "overdue": 0,
        "incomplete": 0,
        "finished": 0
      },
      "has_certificate": false,
      "requires_approval": false,
      "blocks_progress": false,
      "updated_at": "2017-12-08T09:04:52.507-07:00",
      "attachments_count": 0,
      "requires_evidence": false,
      "author": {
        "id": "2",
        "uid": "testauthor",
        "name": "Test Author",
        "email": "testauthor@example.com",
        "avatar_url": null
      },
      "sub_account": {
        "id": "1",
        "name": "Bridge",
        "is_root": true,
        "sub_accounts_exist": false,
        "not_current": false,
        "tac_type": "domestic",
        "tac_custom_body_markup": null,
        "tac_updated_at": "2017-08-10T17:30:23.440Z"
      },
      "default_approver_type": null,
      "default_approver_id": null,
      "default_approver": null,
      "due_date_type": "relative",
      "default_due_on_date": null,
      "default_days_until_due": 7
    }
  ]
}

Returns an author_checkpoints

Author - Content Markets API

Fetch content market information

GET /api/author/markets

No documentation available yet.

Author - Course Reports API

Fetch reports for a course

GET /api/author/course_templates/:course_template_id/reports

No documentation available yet.

Author - Course Slides API

Fetch course slides

GET /api/author/course_templates/:course_template_id/slides

No documentation available yet.

Fetch specific course slide

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

No documentation available yet.

Create slide

POST /api/author/course_templates/:course_template_id/slides

No documentation available yet.

Update slides

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

No documentation available yet.

Delete slides

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

No documentation available yet.

Author - Course Template API

Fetch course template

GET /api/author/course_templates/:course_template_id/authors

No documentation available yet.

Create course template

POST /api/author/course_templates/:course_template_id/authors

Response Codes

  • 201 Created On succesful addition of author
  • 400 Bad Request When item is archived
  • 400 Bad Request When unable to add author

Delete course template

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

Response Codes

  • 204 No Content On successful removal of author
  • 400 Bad Request When attempting to remove the last author
  • 400 Bad Request When item is archived

Author - Course Templates API

This endpoint controls the creation and maintenance of courses.

Object Synopses

CourseTemplateRequest

  • title String Required

    Title of course.

  • description String

    A description of the course.

  • is_published Boolean Required

    Describes the visibility of the course.

  • has_unpublished_changes Boolean Required

    Describes if there are changes not yet visible to learners.

  • default_days_until_due Integer Required

    Number of days from assignment to a learner until course is due.

  • default_due_on_date String

    Date on which all enrollments will be due.

  • due_date_type String

    Due date type currently being utilized by the server.

  • course_type String Required

    Describes whether course is native bridge, SCORM, Lynda, or OpenSesame.

  • external_course_id String

    Optional identifier for linking to external systems.

  • has_certificate Boolean

    Indicates if certificate is issued when course is successfully completed.

  • passing_threshold Integer

    Percent correct answers required to pass course.

  • max_quiz_attempts Integer

    The number of times a learner is allowed to answer quiz questions.

  • continuing_education_credits Integer

    The number of points a learner earns for completing this course.

  • open_book Boolean

    Indicates if learners can navigate the course during quizzes.

  • tags Array

    A list of tags for the course

  • matching_tags Array

    Tags matching the search query for the course

  • maintain_branding_in_sub_account Boolean

    Controls whether this course is rendered with the custom branding of its originating account when shared

  • locked_attributes_enabled Boolean

    Indicates if some course attributes are locked.

  • locked_attributes Array

    Attributes that are locked on the enrollment profile of the course.

  • derived_locked_attributes Array

    Attributes that are locked on the enrollment profile, including those set on the subaccount and the root subaccount

OrderedSlide

  • id Integer Required

    Slide id.

  • position Integer Required

    Published. Slide position in the course.

  • new_position Integer Required

    Unpublished slide position in the course.

  • published_attributes {API::SlideAttributes}
    No description provided.
  • draft_attributes {API::SlideAttributes}
    No description provided.
  • published_at DateTime or null

    Required DateTime slide was published.

  • estimated_time Integer

    Estimated number of minutes to complete slide.

  • attachments TODO

    Array of slide attachments

SlideAttributes

  • title String

    The title of the slide

  • body String

    The content of the slide

  • type String

    Slide type

  • allow_comments Boolean or null Required

    Allows comments by learners if true.

  • cover_slide_data {API::CoverSlideData}
    No description provided.
  • attachment_url String or null

    The URL of the image associated with the quiz question.

  • attachment_align String or null

    The alignment of the image associated with the quiz question, one of top, left, wide, or bottom.

  • static_order Boolean or null

    Skips randomizing answer order if true.

CoverSlideData

  • dark Boolean Required

    Describes the color scheme of slide.

  • heading String

    Required on cover slides. Optional on all others. Title of slide.

  • intro String

    Subtitle of slide.

  • backgroundColor String

    Hex color of background.

  • primaryColor String

    Hex color of foreground.

  • backgroundImageUrl String

    URL of background image

  • backgroundImageStyle String

    Optional unless backgroundImageUrl is present. Controls how background image is displayed

  • backgroundImageOpacity Float

    Optional unless backgroundImageUrl is present. Describes opacity of the image.

CourseTemplateSubAccount

  • id Integer

    SubAccount id

  • name String

    The name of the subaccount

  • is_root Boolean

    Is this the root account

  • not_current Boolean

    Is this course outside the current subaccount

  • sub_accounts_exist Boolean

    Do subaccounts exist in the account

List courses

GET /api/author/course_templates

Note: the deleted_at element in the returned object is present only if deleted records were requested.

Response Codes

  • 200 OK
  • 304 Not Modified

Parameters

  • sort String [ newest, title, updated, archived ]

    Query parameter. Applies a sort to the result list.

  • filters[] String [ my_courses, unpublished, has_certificate, no_enrollments, bridge, scorm, lynda, opensesame ]

    Query parameter. This argument may occur multiple times.

  • search String

    Query parameter. Search course titles for a match with the given string.

  • includes[] String [ counts, expiration, enrollment_profiles, programs ]

    Query paramater. Additional information to be returned in the response. This argument may occur multiple times. If counts is given, response will include enrollment_counts. If expiration is given, response will include auto_re_enroll, default_days_until_expiration, expires, and re_enrollment_period. If enrollment_profiles is given, response will include enroll_url, open_enrollment, and uuid. If programs is given, response will include program_ids.

  • updated_after DateTime

    Query parameter. Filters list to only include courses updated after the given RFC 3339 compliant timestamp.

  • created_after DateTime

    Query parameter. Filters list to only include courses created after the given RFC 3339 compliant timestamp.

  • deleted_after DateTime

    Query parameter. Filters list to only include courses deleted after the given RFC 3339 compliant timestamp.

  • updated_before DateTime

    Query parameter. Filters list to only include courses updated before the given RFC 3339 compliant timestamp.

  • created_before DateTime

    Query parameter. Filters list to only include courses created before the given RFC 3339 compliant timestamp.

  • deleted_before DateTime

    Query parameter. Filters list to only include courses deleted before the given RFC 3339 compliant timestamp.

  • only_deleted Boolean

    Filters list to only include deleted courses.

  • with_deleted Boolean

    Filters list to also include deleted courses.

Example Request

with includes
/api/author/course_templates?includes[]=enrollment_profiles&includes[]=expiration

Example Response

{
  "meta": {},
  "course_templates": [
    {
      "id": "1",
      "estimated_time": null,
      "passing_threshold": 80,
      "max_quiz_attempts": 5,
      "continuing_education_credits": 3,
      "title": "Scorm 01",
      "description": "",
      "is_published": true,
      "has_unpublished_changes": false,
      "default_days_until_due": 7,
      "has_certificate": false,
      "external_status": "inapplicable",
      "external_status_message": "optional messaging",
      "course_type": "scorm",
      "open_book": false,
      "enrollments_count": 0,
      "attachments_count": 1,
      "created_at": "2018-10-30T23:37:07.864Z",
      "updated_at": "2018-11-28T09:58:33.000Z",
      "deleted_at": "2018-12-05T19:27:54.010Z",
      "third_party_course_id": null,
      "external_course_id": null,
      "next_section_due": null,
      "sub_account": {
        "id": "1",
        "name": "Bridge",
        "is_root": true,
        "sub_accounts_exist": false,
        "not_current": false,
        "tac_type": "domestic",
        "tac_custom_body_markup": null,
        "tac_updated_at": "2016-08-05T18:03:21.815Z"
      },
      "has_shared_enrollments": false,
      "tags": [],
      "matching_tags": [],
      "expires": false,
      "default_days_until_expiration": null,
      "retain": false,
      "retain_intervals": [1, 3, 7],
      "auto_re_enroll": false,
      "re_enrollment_period": 7,
      "open_enrollment": false,
      "uuid": "193c854d",
      "enroll_url": "http://bridge.bridgelearning.dev:3000/learner/courses/193c854d/enroll",
      "links": {
        "author": "1"
      },
      "show_correct_response": true,
      "locked_attributes_enabled": false,
      "locked_attributes": ["title", "description"],
      "derived_locked_attributes": ["title", "description"]
    }
  ]
}

List course titles

GET /api/author/course_templates/titles

{ “meta”: {}, “course_templates”: [ { “id”: “1”, “title”: “My Test Course” } ] }

Parameters

  • sort String [ newest, title, updated ]

    Query parameter. Applies a sort to the result list.

  • filters[] String [ my_courses, unpublished, has_certificate, no_enrollments, bridge, scorm, lynda, opensesame ]

    Query parameter. This argument may occur multiple times.

  • search String

    Query parameter. Search course titles for a match with the given string.

Show course

GET /api/author/course_templates/:id

Response Codes

  • 200 OK
  • 304 Not Modified

Parameters

  • id Integer Required

    The course id.

  • sort String

    Query parameter. This argument makes no difference on outcome, since a single object is always sorted.

  • includes[] String [ has_shared_enrollments, next_section_due, programs, with_content ]

    Query paramater. Additional information to be returned in the response. This argument may occur multiple times. If has_shared_enrollments or next_section_due is given, response will include each respective field. If programs is given, response will include program_ids.

Example Request

with includes
/api/author/course_templates/1?includes[]=has_shared_enrollments&includes[]=next_section_due

Example Response

{
  "meta": {},
  "course_templates": [
    {
      "id": "1",
      "estimated_time": null,
      "passing_threshold": 80,
      "max_quiz_attempts": 5,
      "continuing_education_credits": 3,
      "title": "Scorm 01",
      "description": "",
      "is_published": true,
      "has_unpublished_changes": false,
      "default_days_until_due": 7,
      "has_certificate": false,
      "external_status": "inapplicable",
      "external_status_message": "optional messaging",
      "course_type": "scorm",
      "open_book": false,
      "enrollments_count": 0,
      "attachments_count": 1,
      "updated_at": "2016-09-01T12:44:10.773-06:00",
      "third_party_course_id": null,
      "external_course_id": null,
      "next_section_due": null,
      "sub_account": {
        "id": "1",
        "name": "Bridge",
        "is_root": true,
        "sub_accounts_exist": false,
        "not_current": false,
        "tac_type": "domestic",
        "tac_custom_body_markup": null,
        "tac_updated_at": "2016-08-05T18:03:21.815Z"
      },
      "has_shared_enrollments": false,
      "enrollment_counts": {
        "all": 0,
        "required": 0,
        "optional": 0,
        "finished": 0,
        "not_started": 0,
        "overdue": 0,
        "in_progress": 0
      },
      "tags": [],
      "matching_tags": [],
      "expires": false,
      "default_days_until_expiration": null,
      "retain": false,
      "retain_intervals": [1, 3, 7],
      "auto_re_enroll": false,
      "re_enrollment_period": 7,
      "open_enrollment": false,
      "uuid": "193c854d",
        "enroll_url": "http://bridge.bridgelearning.dev:3000/learner/courses/193c854d/enroll",
        "links": {
        "author": "1"
      },
      "scorm": {
        "registration_instancing_option": "always",
        "player_launch_type": "2",
        "sco_launch_type": "2",
        "score_rollup_mode": "3"
      },
      "locked_attributes_enabled": true,
      "locked_attributes": ["title", "description"],
      "derived_locked_attributes": ["title", "description"]
    }
  ]
}

Create course

POST /api/author/course_templates

Response codes

  • 201 Created

Parameters

  • course_templates CourseTemplateRequest[] Required

    Body parameter. An array of {API::CourseTemplateRequest} to be created.

Example Request

{
  "course_templates": [
    "{API::CourseTemplateRequest}"
  ]
}
curl \
  -X POST \
  -H "Authorization: Bearer $TOKEN" \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -d '{"course_templates":["{API::CourseTemplateRequest}"]}' \
  http://<bridge>/api/author/course_templates
    

Example Response

{
  "meta": {},
  "course_templates": [
    {
      "id":                           "4",
      "estimated_time":               null,
      "passing_threshold":            80,
      "max_quiz_attempts":            5,
      "continuing_education_credits": 3,
      "title":                        "My Course",
      "description":                  "A description",
      "is_published":                 false,
      "has_unpublished_changes":      false,
      "default_days_until_due":       7,
      "has_certificate":              false,
      "program_ids":                  [],
      "external_status":              "inapplicable",
      "external_status_message":      "optional messaging",
      "external_course_id":           "P314159",
      "course_type":                  "bridge",
      "open_book":                    false,
      "enrollments_count":            0,
      "sub_account": {
        "id": 1,
        "name": "Acme, Co",
        "is_root": true,
        "not_current": false,
        "sub_accounts_exist": true
      },
      "links": {
        "author": "1"
      },
      "locked_attributes_enabled":         false,
      "locked_attributes":            ["title", "description"],
      "derived_locked_attributes":    ["title", "description"]
    }
  ]
}

Update a course

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

Response Codes

  • 200 OK

Parameters

  • course_template CourseTemplateRequest Required

    Body parameter. A {API::CourseTemplateRequest} containing the fields to be updated.

Example Request

{
  "course_template": "{API::CourseTemplateRequest}"
}
curl \
  -X PATCH \
  -H "Authorization: Bearer $TOKEN" \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -d '{"course_template":"{API::CourseTemplateRequest}"}' \
  http://<bridge>/api/author/course_templates/:id
    

Example Response

{
  "meta": {},
  "course_templates": [
    {
      "id": "1",
      "estimated_time": 3,
      "passing_threshold": 80,
      "max_quiz_attempts": 5,
      "continuing_education_credits": 3,
      "title": "My Test Course",
      "is_published": true,
      "has_unpublished_changes": false,
      "default_days_until_due": 7,
      "has_certificate": true,
      "program_ids": [],
      "external_status": "inapplicable",
      "external_status_message": "optional messaging",
      "external_course_id": "P314159",
      "course_type": "bridge",
      "open_book": false,
      "enrollments_count": 3,
      "sub_account": {
        "id": 1,
        "name": "Acme, Co",
        "is_root": true,
        "not_current": false,
        "sub_accounts_exist": true
      },
      "links": {
        "author": "1"
      },
      "locked_attributes_enabled": true,
      "locked_attributes": ["title", "description"],
      "derived_locked_attributes": ["title", "description"]
    }
  ]
}

Delete a course

DELETE /api/author/course_templates/:id

Response codes

  • 204 No Content On successful deletion

Parameters

  • id Integer Required

    Path parameter. Course template id.

Restore a destroyed course

POST /api/author/course_templates/:id/restore

Response codes

  • 200 OK On successful restoration
  • 204 No Content On unsuccesful restoration

Parameters

  • id Integer Required

    Path paramter. Course template id.

Syncs course enrollments with data available in upstream SCORM

POST /api/author/course_templates/:id/sync

This endpoint requires support user permissions(validated by the frontend) for now. In the future this may become available to account admins with a custom account permission such as course_template_sync(which would need to be created)

Response codes

  • 204 No Content On successful sync request
  • 400 Bad Request When course is not SCORM
  • 403 Forbidden

Parameters

  • id Integer Required

    Path parameter. Course template id.

Example Request

/api/author/course_templates/1/sync

Publish course

POST /api/author/course_templates/:id/publish

Makes a course visible to non-authors

Response Codes

  • 200 OK
  • 400 Bad Request When course is archived

Parameters

  • id Integer Required

    Path parameter. Course template id.

  • notify_filter String

    Which learners to notify. One of ‘all’, ‘finished’, or ‘in_progress’.

  • notify_message String

    Message to send to learners. Limited to 1000 characters.

  • re_enroll Boolean

    Indicates if completed enrollments should be re-enrolled. Defaults to false.

Example Response

{
  "meta": {},
  "course_templates": [
    {
      "id": "7",
      "estimated_time": 1,
      "passing_threshold": 80,
      "max_quiz_attempts": 5,
      "continuing_education_credits": 3,
      "title": "Test Course",
      "is_published": true,
      "has_unpublished_changes": false,
      "default_days_until_due": 7,
      "has_certificate": false,
      "program_ids": [],
      "external_status": "inapplicable",
      "external_status_message": "optional messaging",
      "external_course_id": "P314159",
      "course_type": "bridge",
      "open_book": false,
      "enrollments_count": 0,
      "sub_account": {
        "id": 1,
        "name": "Acme, Co",
        "is_root": true,
        "not_current": false,
        "sub_accounts_exist": true
      },
      "links": {
        "author": "1"
      },
      "locked_attributes_enabled": true,
      "locked_attributes": ["title", "description"],
      "derived_locked_attributes": ["title", "description"]
    }
  ]
}

Discard changes

POST /api/author/course_templates/:id/discard_changes

Discards unpublished changes to the course.

Response Codes

  • 200 OK

Parameters

  • id Integer Required

    Path parameter. Course template id.

Example Response

{
  "meta": {},
  "course_templates": [
    {
      "id": "7",
      "estimated_time": 1,
      "passing_threshold": 80,
      "max_quiz_attempts": 5,
      "continuing_education_credits": 3,
      "title": "Test Course",
      "description": "A description",
      "is_published": true,
      "has_unpublished_changes": false,
      "default_days_until_due": 7,
      "has_certificate": false,
      "program_ids": [],
      "external_status": "inapplicable",
      "external_status_message": "optional messaging",
      "external_course_id": "P314159",
      "course_type": "bridge",
      "open_book": false,
      "enrollments_count": 0,
      "sub_account": {
        "id": 1,
        "name": "Acme, Co",
        "is_root": true,
        "not_current": false,
        "sub_accounts_exist": true
      },
      "links": {
        "author": "1"
      },
      "locked_attributes_enabled": true,
      "locked_attributes": ["title", "description"],
      "derived_locked_attributes": ["title", "description"]
    }
  ]
}

Upload SCORM

POST /api/author/course_templates/:id/upload

Upload a SCORM course.

Response Codes

  • 200 OK
  • 400 Bad Request When course is archived

Parameters

  • id Integer Required

    Path parameter. Course template to be overwritten by upload.

  • location String Required

    Body parameter. URI of course to import.

  • file_modified_at DateTime

    Body parameter. Last modification time of the uploaded file.

  • name String

    Body parameter. Name of the uploaded file.

Example Request

{
  "location": "https://instructure-getsmart.s3.amazonaws.com/uploads/1/3d885212-e681-4971-98ab-0e1100b521c1.zip",
  "file_modified_at": "2012-09-21T23:18:28.000Z",
  "name": "RuntimeBasicCalls_SCORM20043rdEdition.zip"
}
curl \
  -X POST \
  -H "Authorization: Bearer $TOKEN" \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -d '{"location":"https://instructure-getsmart.s3.amazonaws.com/uploads/1/3d885212-e681-4971-98ab-0e1100b521c1.zip","file_modified_at":"2012-09-21T23:18:28.000Z","name":"RuntimeBasicCalls_SCORM20043rdEdition.zip"}' \
  http://<bridge>/api/author/course_templates/:id/upload
    

Example Response

{
  "meta": {},
  "course_templates": [
    {
      "id": "19",
      "estimated_time": null,
      "passing_threshold": 80,
      "max_quiz_attempts": 5,
      "continuing_education_credits": 3,
      "title": "A course title",
      "description": "A description",
      "is_published": false,
      "has_unpublished_changes": false,
      "default_days_until_due": 7,
      "has_certificate": false,
      "program_ids": [],
      "external_status": "pending",
      "external_status_message": "optional messaging",
      "external_course_id": "P314159",
      "course_type": "scorm",
      "open_book": false,
      "enrollments_count": 0,
      "sub_account": {
        "id": 1,
        "name": "Acme, Co",
        "is_root": true,
        "not_current": false,
        "sub_accounts_exist": true
      },
      "links": {
        "author": "1"
      },
      "locked_attributes_enabled": true,
      "locked_attributes": ["title", "description"],
      "derived_locked_attributes": ["title", "description"]
    }
  ]
}

Upload SCORM that has been attached to a course

POST /api/author/course_templates/:id/import_attached_scorm

Replace course with previously attached SCORM course and then publish.

Response Codes

  • 200 OK
  • 400 Bad Request When course is archived

Parameters

  • id Integer Required

    Path parameter. Course template to be overwritten by upload.

Example Request

{
}
curl \
  -X POST \
  -H "Authorization: Bearer $TOKEN" \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -d '{}' \
  http://<bridge>/api/author/course_templates/:id/import_attached_scorm
    

Example Response

{
  "meta": {},
  "course_templates": [
    {
      "id": "19",
      "estimated_time": null,
      "passing_threshold": 80,
      "max_quiz_attempts": 5,
      "continuing_education_credits": 3,
      "title": "A course title",
      "description": "A description",
      "is_published": false,
      "has_been_unpublished": false,
      "has_unpublished_changes": false,
      "retain": false,
      "quizzes_count": 0,
      "external_status": "inapplicaable",
      "external_status_message": null,
      "course_type": "scorm",
      "enrollments_count": 0,
      "attachments_count": 1,
      "meta": {
        "domain_id": "1",
        "sub_account_id": "1",
        "r2b_jwt": "aaa.bbb.ccc"
      },
      "sub_account": {
        "id": 1,
        "name": "Acme, Co",
        "is_root": true,
        "sub_accounts_exist": false,
        "not_current": false,
        "tac_type": "domestic",
        "tac_custom_body_markup": null,
        "tac_updated_at": "2016-08-05T18:03:21.815Z"
      },
      "updated_at": "2016-09-01T12:44:10.773-06:00",
      "has_shared_enrollments": false,
      "enrollment_counts": {
        "all": 0,
        "required": 0,
        "optional": 0,
        "finished": 0,
        "not_started": 0,
        "overdue": 0,
        "in_progress": 0
      },
      "tags": [],
      "matching_tags": [],
      "expires": false,
      "default_days_until_expiration": null,
      "retain": false,
      "retain_intervals": [1, 3, 7],
      "auto_re_enroll": false,
      "re_enrollment_period": 7,
      "open_enrollment": false,
      "uuid": "193c854d",
        "enroll_url": "http://bridge.bridgelearning.dev:3000/learner/courses/193c854d/enroll",
        "links": {
        "author": "1"
      },
      "scorm": {
        "registration_instancing_option": "always",
        "player_launch_type": "2",
        "sco_launch_type": "2",
        "score_rollup_mode": "3"
      },
      "locked_attributes_enabled": true,
      "locked_attributes": ["title", "description"],
      "derived_locked_attributes": ["title", "description"]
    }
  ]
}

Attach a SCORM course

POST /api/author/course_templates/:id/attach_scorm

Attach a SCORM course to a Bridge course.

Response Codes

  • 200 OK
  • 400 Bad Request When course is archived

Parameters

  • id Integer Required

    Path parameter. Course template to attach SCORM course.

  • location String Required

    Body parameter. URI of SCORM course to import.

  • file_modified_at DateTime

    Body parameter. Last modification time of the uploaded SCORM course file.

  • name String

    Body parameter. Display name of the uploaded SCORM course file.

Example Request

{
  "location": "https://instructure-getsmart.s3.amazonaws.com/uploads/1/3d885212-e681-4971-98ab-0e1100b521c1.zip",
  "file_modified_at": "2012-09-21T23:18:28.000Z",
  "name": "RuntimeBasicCalls_SCORM20043rdEdition.zip"
}
curl \
  -X POST \
  -H "Authorization: Bearer $TOKEN" \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -d '{"location":"https://instructure-getsmart.s3.amazonaws.com/uploads/1/3d885212-e681-4971-98ab-0e1100b521c1.zip","file_modified_at":"2012-09-21T23:18:28.000Z","name":"RuntimeBasicCalls_SCORM20043rdEdition.zip"}' \
  http://<bridge>/api/author/course_templates/:id/attach_scorm
    

Example Response

{
  "meta": {},
  "course_templates": [
    {
      "id": "19",
      "estimated_time": null,
      "passing_threshold": 80,
      "max_quiz_attempts": 5,
      "continuing_education_credits": 3,
      "title": "A course title",
      "description": "A description",
      "is_published": false,
      "has_unpublished_changes": false,
      "default_days_until_due": 7,
      "has_certificate": false,
      "program_ids": [],
      "external_status": "attached",
      "external_course_id": "P314159",
      "course_type": "scorm",
      "open_book": false,
      "enrollments_count": 0,
      "sub_account": {
        "id": 1,
        "name": "Acme, Co",
        "is_root": true,
        "not_current": false,
        "sub_accounts_exist": true
      },
      "links": {
        "author": "1"
      },
      "locked_attributes_enabled": true,
      "locked_attributes": ["title", "description"],
      "derived_locked_attributes": ["title", "description"]
    }
  ]
}

Clone a course

POST /api/author/course_templates/:id/clone

Response Codes

  • 200 OK
  • 400 Bad Request When original course is archived

Parameters

  • id Integer Required

    Path parameter. Course template id.

Example Response

{
  "meta": {},
  "course_templates": [
    {
      "id": "10",
      "estimated_time": 1,
      "passing_threshold": 80,
      "max_quiz_attempts": 5,
      "continuing_education_credits": 3,
      "title": "Copy of Test Course",
      "description": "A description",
      "is_published": true,
      "has_unpublished_changes": false,
      "default_days_until_due": 7,
      "has_certificate": false,
      "program_ids": [],
      "external_status": "inapplicable",
      "external_course_id": "P314159",
      "course_type": "bridge",
      "open_book": false,
      "enrollments_count": 0,
      "sub_account": {
        "id": 1,
        "name": "Acme, Co",
        "is_root": true,
        "not_current": false,
        "sub_accounts_exist": true
      },
      "links": {
        "author": "1"
      },
      "locked_attributes_enabled": true,
      "locked_attributes": ["title", "description"],
      "derived_locked_attributes": ["title", "description"]
    }
  ]
}

Export a course

GET /api/author/course_templates/:id/export

This endpoint requires the course_template_download permission which by default is granted to admins and account admins.

Bridge courses are exported to JSON format. SCORM courses export a ZIP of relevant SCORM metadata.

Response Codes

  • 200 OK
  • 401 Unauthorized

Parameters

  • id Integer Required

    Path parameter. The course id

  • format String

    Path parameter. Ignored.

Example Response

{
  "id": 7,
  "title": "Test Course",
  "description": "A description",
  "estimated_time": 1,
  "user_id": 1,
  "passing_threshold": 80,
  "max_quiz_attempts": 5,
  "continuing_education_credits": 3,
  "published_at": "2015-07-15T11:15:22.730-06:00",
  "default_days_until_due": 7,
  "has_unpublished_changes": true,
  "has_certificate": false,
  "external_id": null,
  "external_status": "inapplicable",
  "external_course_id": "P314159",
  "course_type": "bridge",
  "domain_id": 1,
  "ordered_slides": [
    "{API::OrderedSlide}"
  ]
}

Author - Enrollments API

Object Synopses

EnrollmentRequest

  • end_at DateTime

    Due date for this enrollment

  • expires_at DateTime

    Expiration date for this enrollment. May only be applied to ‘completed’ enrollments.

  • completed_at DateTime

    Completion date for this enrollment. Sets state to ‘complete’ if not already.

  • user_id Integer

    User to enroll. Either user_id or group_id must be included, but not both.

  • group_id Integer

    Group to enroll. Either user_id or group_id must be included, but not both.

  • score Integer

    Score (out of 100) for completed enrollment.

  • state String

    Current state of enrollment. One of ‘created’, ‘active’, ‘complete’, or ‘failed’.

  • required Boolean

    Is this enrollment required.

EnrollmentResponse

  • id Integer

    Enrollment id.

  • course_template Integer

    Course template id.

  • end_at DateTime

    Due date for this enrollment

  • expires_at DateTime

    Expiration date for this enrollment. Only applies to ‘completed’ enrollments.

  • completed_at DateTime

    Completion date for this enrollment. Only applies to ‘completed’ enrollments.

  • updated_at DateTime

    Last updated date for this enrollment.

  • progress Float

    Progress of course finished.

  • can_be_removed Boolean

    Can this enrollment be removed.

  • can_be_made_optional Boolean

    Can this enrollment be made optional.

  • active Boolean

    Whether this enrollment is active or has been replaced by another enrollment.

  • required Boolean

    Is this enrollment required or did the learner optionally enroll themselves.

  • is_permanently_failed Boolean

    Is this enrollment permanently failed.

  • is_archived Boolean

    Has this enrollment been archived.

  • score Integer

    Score (out of 100) for completed enrollment.

  • state String

    Current state of enrollment. One of ‘created’, ‘active’, ‘complete’, or ‘failed’.

  • links Hash

    Provides links to additional detail in response object

  • allow_re_enroll Boolean

    Can the learner be re-enrolled with this enrollment.

List Enrollments

GET /api/author/course_templates/:course_template_id/enrollments

This endpoint will fetch all enrollments for the desired course.

Response Codes

  • 200 OK
  • 304 Not Modified

Parameters

  • id Integer Required

    Path parameter. Course id

  • sort String [ name, score, progress, due_date ]

    Query parameter. Sorts return values in ascending order. Prepending a - sorts return values in descending order.

  • search String

    Finds users with matching values in first name, last name, uid, or email.

  • user_id Integer

    Query parameter. Filters list to only include enrollments belonging to user.

  • updated_after DateTime

    Query parameter. Filters list to only include enrollments updated after the given RFC 3339 compliant timestamp.

  • created_after DateTime

    Query parameter. Filters list to only include enrollments created after the given RFC 3339 compliant timestamp.

  • deleted_after DateTime

    Query parameter. Filters list to only include enrollments deleted after the given RFC 3339 compliant timestamp.

  • updated_before DateTime

    Query parameter. Filters list to only include enrollments updated before the given RFC 3339 compliant timestamp.

  • created_before DateTime

    Query parameter. Filters list to only include enrollments created before the given RFC 3339 compliant timestamp.

  • deleted_before DateTime

    Query parameter. Filters list to only include enrollments deleted before the given RFC 3339 compliant timestamp.

  • only_deleted Boolean

    Filters list to only include deleted enrollments.

  • with_deleted Boolean

    Filters list to also include deleted enrollments.

Example Response

{
  "meta": {},
  "linked":
  {
    "course_templates": [
      {
        "id": "1"
      }
    ],
    "learners": [
      {
        "id": "1",
        "name": "Leia Organa",
        "avatar_url": "http://www.alderaan-gov.com/royal-family/hrh_leia.png",
        "deleted": false
      }
    ]
  },
  "enrollments": [
    {
      "id": "4",
      "course_template": "1",
      "end_at": "2015-07-07T23:59:59.000-06:00",
      "expires_at": "2015-09-07T23:59:59.000-06:00",
      "updated_at": "2015-06-22T11:05:00.000-06:00",
      "progress": 0,
      "can_be_removed": true,
      "completed_at": null,
      "score": 0,
      "state": "created",
      "links": {
        "learner": {
          "type": "learners",
          "id": "6"
        }
      }
    }
  ]
}

Create an enrollment

POST /api/author/course_templates/:course_template_id/enrollments

Either the group_id or the user_id must be provided, but not both.

Response Codes

  • 204 No Content

Parameters

  • course_template_id Integer Required

    Path parameter. Course template id.

  • enrollments EnrollmentRequest[] Required

    Body parameter. An array of EnrollmentRequest.

Example Request

{
  "enrollments": [
    "{API::EnrollmentRequest}"
  ]
}
curl \
  -X POST \
  -H "Authorization: Bearer $TOKEN" \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -d '{"enrollments":["{API::EnrollmentRequest}"]}' \
  http://<bridge>/api/author/course_templates/:course_template_id/enrollments
    

Update an enrollment

PATCH /api/author/enrollments/:id
PUT /api/author/enrollments/:id

Response Codes

  • 200 OK
  • 400 Bad Request When course is archived

Parameters

  • id Integer Required

    Path parameter, not required in request body. Enrollment id.

  • enrollments EnrollmentRequest[] Required

    Body parameter. An array of EnrollmentRequest to update.

Example Request

{
  "enrollments": [
    "{API::EnrollmentRequest}"
  ]
}
curl \
  -X PATCH \
  -H "Authorization: Bearer $TOKEN" \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -d '{"enrollments":["{API::EnrollmentRequest}"]}' \
  http://<bridge>/api/author/enrollments/:id
    

Example Response

{
  "meta": {},
  "linked":
  {
    "course_templates":
    [
      {
        "id":"1"
      }
    ],
    "learners": []
  },
  "enrollments":
  [
    "{API::EnrollmentResponse}"
  ]
}

Delete an enrollment

DELETE /api/author/enrollments/:id

Response Codes

  • 204 No Content when deletion has completed
  • 400 Bad Request When course is archived
  • 404 Not Found when enrollment or its user are not in system
  • 403 Forbidden when current user is not authorized to unenroll user

Parameters

  • id Integer Required

    Path parameter. Enrollment id.

  • force_unenroll Boolean

    Body Parameter. Removes enrollment if enrollment is started or optional when true.

Update due date for an enrollment

POST /api/author/enrollments/:id/due_date

Response Codes

  • 200 OK
  • 400 Bad Request When course is archived

Parameters

  • id Integer Required

    Path parameter, not required in request body. Enrollment id.

  • enrollments EnrollmentRequest[] Required

    Body parameter. An array of EnrollmentRequest to update.

Example Request

{
  "enrollments": [
    "{API::EnrollmentRequest}"
  ]
}
curl \
  -X POST \
  -H "Authorization: Bearer $TOKEN" \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -d '{"enrollments":["{API::EnrollmentRequest}"]}' \
  http://<bridge>/api/author/enrollments/:id/due_date
    

Example Response

{
  "meta": {},
  "linked":
  {
    "course_templates":
    [
      {
        "id":"1"
      }
    ],
    "learners": []
  },
  "enrollments":
  [
    "{API::EnrollmentResponse}"
  ]
}

Author - Enrollments Movements API

Move an enrollment

PATCH /api/author/enrollments/:id/move/:slide_id

A PATCH action for progressing the enrollment’s current attempt

Response Codes

  • 200 OK
  • 400 Bad Request
  • 401 Unauthorized

Parameters

  • id Integer Required

    Path parameter. Enrollment id.

  • slide_id Integer Required

    Path parameter. Slide id.

Example Response

{
  "meta": {},
  "linked":
  {
    "course_templates":
    [
      {
        "id":"1"
      }
    ],
    "learners": []
  },
  "enrollments":
  [
    "{API::EnrollmentResponse}"
  ]
}

Author - Enrollments Subscriptions API

Get PandaPush subscription info

GET /api/author/course_templates/:course_template_id/enrollments/subscription

Get PandaPush subscription data for a course’s enrollments. This endpoint will fetch all enrollments for the desired course.

Response Codes

  • 200 OK
  • 403 Forbidden

Example Response

{
  "subscriptions": [
    {
      "url": "https://pp-beta.insops.net/push",
      "channel": "/PP_APP_ID/private/instructure/domains/1/course_templates/2/enrollments/**",
      "token": "A JWT-ENCODED STRING"
    }
  ]
}

Author - Group Enrollments For Courses API

Fetch group enrollments for course

GET /api/author/course_templates/:course_template_id/groups

No documentation available yet.

Delete group enrollments for courses

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

Response Codes

  • 204 No Content On successful unenrollment of group
  • 400 Bad Request When item is archived

Author - Group Previews API

Create smart group preview rules and display its memberships

Object Synopses

Rule

  • id Integer or null

    Null when adding a new group. Rule id.

  • custom_field_id Integer

    Id of the custom field on which the rule is built.

  • predicate String

    Logical predicate for rule

  • value String

    Value to match

Create a smart group preview

POST /api/author/group_previews

Parameters

  • rules Rule[] Required

    An array of Rules.

  • join_type String [ intersect, union ]

    A string indicating how to join the rules. Default is intersect.

Example Response

{
  "id": "uuid-secret-123"
}

Get a list of learners for smart group preview

GET /api/author/group_previews/:id

Parameters

  • id String Required

    Path parameter. The id returned from creating a smart group preview.

Example Response

{
  "meta": {
    "total": 1
  },
  "learners": [
    {
      "id": "5",
      "avatar_url": null,
      "completed_courses_count": 0,
      "name": "Luke Skywalker",
      "next_due_date": "2015-07-24T18:58:01.344Z"
    }
  ]
}

Author - Groups API

Controls the creation, deletion, and display of groups.

Object Synopses

GroupRequest

  • name String

    Optional. Group display name

  • parent_id Integer

    Optional.

  • external_id String

    Optional. Identifier for linking to external systems.

  • smart Boolean

    Optional. Indicates if group is a smart group. This can also be indicated in type.

  • type String

    Optional. Indicates if group is smart. This can also be indicated in smart.

  • rules Array

    Optional. An array of Rules for creating smart groups. Ignored if group is not a smart group.

Rule

  • id Integer or null

    Null when adding a new group. Rule id.

  • custom_field_id Integer

    Id of the custom field on which the rule is built.

  • predicate String

    Logical predicate for rule

  • value String

    Value to match

Fetch all groups

GET /api/author/groups

This endpoint returns a list of all groups

Response Codes

  • 200 OK if the request was successful
  • 304 Not Modified if the resource has not changed

Parameters

  • sort String [ name, memberships_count ]

    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.

  • filters[] String [ smart, group, team, domain ]

    Query parameter. Causes the list of items being returned to be filtered by group type (smart group, manually-created group, team of manager’s direct reports, or domain). This argument may occur multiple times.

Example Response

{
  "meta": {},
  "groups": [

    {
      "id": "1",
      "parent_id": "",
      "external_id": "AL-123",
      "name": "All Learners",
      "type": "domain",
      "users_count": 1,
      "links": {}
    },

    {
      "id": "4",
      "parent_id": "",
      "external_id": "NG-456",
      "name": "New group",
      "type": "group",
      "users_count": 1,
      "links": {}
    }
  ]
}

Preview a new SmartGroup rule

GET /api/author/groups/preview

Parameters

  • rules Rule[] Required

    Query parameter. An array of Rules. E.g. ?rules[0][id]=3&rules[0][custom_field_id]=1&rules[0][predicate]=is_not&rules[0][value]=X-Wing+Pilot

  • join_type String [ intersect, union ]

    Query parameter. A string indicating how to join the rules. Default is intersect.

Example Response

{
  "meta": {
    "total": 1
  },
  "learners": [
    {
      "id": "5",
      "avatar_url": null,
      "completed_courses_count": 0,
      "name": "Luke Skywalker",
      "next_due_date": "2015-07-24T18:58:01.344Z"
    }
  ]
}

Show an existing group

GET /api/author/groups/:id

This endpoint returns a group listing. This endpoint issues a GET request with id as the argument

Response Codes

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

Parameters

  • id Integer Required

    Path parameter. Group id.

Example Response

{
  "meta": {},
  "groups": [
    {
      "id": "3",
      "parent_id": "",
      "external_id": "Han-Shot-First-123",
      "name": "Millennium Falcon Crew",
      "type": "group",
      "users_count": 0,
      "links": {}
    }
  ]
}

Create a new group

POST /api/author/groups

This endpoint creates a new group by issuing a POST request with a request payload. GroupRequests in the payload may contain initial values for group attributes or they may be empty.

Response Codes

  • 201 Created if resource is created
  • 400 Bad Request if resource is not created

Parameters

  • groups GroupRequest[] Required

    Body parameter. An array of GroupRequest.

Example Request

{
   "groups": [
     "{API::GroupRequest}"
   ]
}
curl \
  -X POST \
  -H "Authorization: Bearer $TOKEN" \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -d '{"groups":["{API::GroupRequest}"]}' \
  http://<bridge>/api/author/groups
    

Example Response

{
   "meta": { },
   "groups": [
     {
       "id": "6",
       "parent_id": "",
       "external_id": "",
       "name": null,
       "type": "group",
       "users_count": 0,
       "links": { }
     }
  ]
}

Update an existing group

PATCH /api/author/groups/:id
PUT /api/author/groups/:id

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

Response Codes

  • 200 OK if group is updated

Parameters

  • group GroupRequest Required

    Body parameter. A {API::GroupRequest} containing the fields to be updated.

Example Request

{
   "group": "{API::GroupRequest}"
}
curl \
  -X PATCH \
  -H "Authorization: Bearer $TOKEN" \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -d '{"group":"{API::GroupRequest}"}' \
  http://<bridge>/api/author/groups/:id
    

Example Response

{
   "meta": {},
   "groups": [
     {
       "id": "6",
       "parent_id": "",
       "external_id": "Red5",
       "name": "Red Squadron",
       "type": "smart",
       "users_count": 0,
       "links": {},
       "rules": [
         "{API::Rule}"
       ]
     }
   ]
}

Deletes an existing group

DELETE /api/author/groups/:id

This endpoint deletes an existing group by issueing a DELETE request

Response Codes

  • 204 No Content if resource deletion is successful
  • 404 Not Found if id is invalid

Parameters

  • id Integer Required

    Path parameter. Group id.

Fetch learnables related to group

GET /api/author/groups/:id/content

This endpoint returns a list of learnables (courses, programs, and live courses) that this group is either associated with or can be associated with.

Response Codes

  • 200 OK if the request was successful
  • 304 Not Modified if the resource has not changed

rubocop: disable Metrics/AbcSize

Parameters

  • id Integer Required

    Path parameter. Group id.

  • search String

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

  • item_types[] String [ CourseTemplate, Program, LiveCourse ]

    Query parameter. Causes the list of items being returned to be filtered by type. This argument may occur multiple times.

  • sort String [ title ]

    Query parameter. Returns results in ascending order. Prepending values with - will return results in descending order.

  • page Integer

    Paginate results, show the given page. Defaults to 0.

  • limit Integer

    Paginate results, limiting to this many results per page. Defaults to 20.

Example Response

{
  "meta": {},
  "groups": [

    {
      "id": "1",
      "parent_id": "",
      "external_id": "AL-123",
      "name": "All Learners",
      "type": "domain",
      "users_count": 1,
      "links": {}
    },

    {
      "id": "4",
      "parent_id": "",
      "external_id": "NG-456",
      "name": "New group",
      "type": "group",
      "users_count": 1,
      "links": {}
    }
  ]
}

Clone a group

POST /api/author/groups/:id/clone

Response Codes

  • ‘200 OK’

Parameters

  • id Integer Required

    Path parameter. Group id.

Example Response

{
  "meta": {},
  "groups": [
      {
          "id": "11",
          "parent_id": "",
          "domain_id": "1",
          "external_id": "",
          "name": "Copy of c1",
          "type": "smart",
          "users_count": 13,
          "archived_at": null,
          "registered_count": null,
          "messageable_count": 13,
          "join_type": "intersect",
          "new_smart_group": false,
          "links": {}
      }
  ]
}

Author - Learner Course Enrollments API

Deprecated: Use Author::EnrollmentsController#destroy or Learner::LearningItemsController#index instead.

Fetch course enrollment

GET /api/author/learners/:learner_id/learner_courses

Deprecated: Use Learner::LearningItemsController#index instead.

Delete course enrollment

DELETE /api/author/learners/:learner_id/learner_courses/:id

Deprecated: Use Author::EnrollmentsController#destroy instead

Author - Learner Items API

Deprecated: Use Bridge Analytics (or the Learner transcript) instead.

List learner learning items

GET /api/author/learners/:learner_id/learner_items

Deprecated: Use Bridge Analytics (or the Learner transcript) instead.

Remove a learner learning item

DELETE /api/author/learners/:learner_id/learner_items/:id

Deprecated: Use “Author - Enrollments API” instead

Author - Library Items API

This API allows authors to add/remove library items

Create

POST /api/author/library_items/:item_type/:item_id

Response Codes

  • 201 Created
  • 400 Bad Request

Parameters

  • item_type String [ course_templates ] Required

    Path parameter. Item type

  • item_id Integer Required

    Path parameter. Item id

Example Response

{
  "meta": {},
  "library_items": [
    {
       "id": "1",
       "item_type": "CourseTemplate",
       "item_id": "14",
       "title": "Untitled Course",
       "estimated_time": null,
       "features": ["has_video", "has_images", "scorm"],
       "created_at": "2016-02-03T07:29:51.474-07:00",
       "updated_at": "2016-02-03T07:29:51.496-07:00",
       "links":
         {
           "user": "1"
         }
    }
  ]
}

Destroy

DELETE /api/author/library_items/:item_type/:item_id

Response Codes

  • 204 No Content
  • 400 Bad Request

Parameters

  • item_type String [ course_templates ] Required

    Path parameter. Item type

  • item_id Integer Required

    Path parameter. Item id

Author - Live Course Instructors API

Object Synopses

LiveCourseSessionInstructor

Represents an instructor for a live course session

  • id String

    The id of the instructor

  • name String

    The name of the instructor

List live course session instructors

GET /api/author/live_courses/:live_course_id/sessions/:session_id/instructors

Response Codes

  • 200 OK
  • 404 NOT FOUND

Parameters

  • live_course_id Integer Required

    Path parameter. Live course id

  • session_id Integer Required

    Path parameter. Session id

Example Request

/api/author/live_courses/1/sessions/1/instructors

Example Response

{
  "instructors": [
    {
     "id": "1",
     "name": "Instructor 1"
    },
    {
      "id": "2",
      "name": "Instructor 2"
    },
    {
      "id": "3",
      "name": "Instructor 3"
    }
  ]
}

Show a live course session instructor

GET /api/author/live_courses/:live_course_id/sessions/:session_id/instructors/:id

Response Codes

  • 200 OK
  • 404 Not Found

Parameters

  • live_course_id Integer Required

    Path parameter. Live Course id

  • session_id Integer Required

    Path parameter. Session id

  • id Integer Required

    Path parameter. Instructor id

Example Request

/api/author/live_courses/1/sessions/1/instructors/1

Example Response

{
  "instructors": [
    {
      "id": "1",
      "name": "Instructor 1"
    }
  ]
}

Create a live course session instructor

POST /api/author/live_courses/:live_course_id/sessions/:session_id/instructors

Response Codes

  • 201 Created
  • 400 Bad Request Occurs when maximum instructor limit has been reached.

Parameters

  • live_course_id Integer Required

    Path parameter. Live Course id

  • session_id Integer Required

    Path parameter. Session id

  • name String Required

    The name of the instructor

  • user_id Integer Required

    Id of the user to be an instructor

Example Request

{
  "instructor": "{API::SessionRequest}"
}
curl \
  -X POST \
  -H "Authorization: Bearer $TOKEN" \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -d '{"instructor":"{API::SessionRequest}"}' \
  http://<bridge>/api/author/live_courses/:live_course_id/sessions/:session_id/instructors
    

Example Response

{
  "instructor": "{API::SessionResponse}"
}

Delete a live course session instructor

DELETE /api/author/live_courses/:live_course_id/sessions/:session_id/instructors/:id

Response Codes

  • 204 No Content

Parameters

  • live_course_id Integer Required

    Path parameter. Live Course id

  • session_id Integer Required

    Path parameter. Session id

  • id Integer Required

    Path parameter. ID of the instructor to delete.

Example Request

/api/author/live_courses/1/sessions/1/instructors/1

Author - Live Course Learners API

Object Synopses

LiveCourseEnrollment

Represents an enrollment for a live course

  • id String
    No description provided.
  • user_id String

    The enrolled user’s id.

  • name String

    The learner’s name.

  • email String

    The learner’s email.

  • avatar_url String

    URL for user’s avatar image

  • start_at String

    Start time of session, if registered.

  • state String
    No description provided.
  • expires_at String

    Time when this live training qualification expires.

  • created_at String

    Time when this live training enrollment was created.

  • updated_at String

    Time when this live training enrollment was last updated.

  • deleted_at String

    Time when this live training enrollment was deleted. Only present if deleted records were requested.

  • active Boolean
    No description provided.
  • sources Array

    Lists the sources of the enrollment whether individual user enrollment or group enrollment.

  • registration {API::LiveCourseSessionRegistration}

    Session registration. Only displays if includes[]=registration is passed as a query parameter.

LiveCourseSessionRegistration

Registration details for a session

  • id String
    No description provided.
  • live_course_session_id String
    No description provided.
  • start_at String
    No description provided.

List live course enrollments

GET /api/author/live_courses/:live_course_id/learners

Response Codes

  • 200 OK

Parameters

  • live_course_id Integer Required

    Path parameter. Live course id for the learners we want

  • updated_after String

    Query parameter. Returns records updated after a given date and time

  • created_after String

    Query parameter. Returns records created after a given date and time

  • deleted_after String

    Query parameter. Returns records deleted after a given date and time

  • updated_before String

    Query parameter. Returns records updated before a given date and time

  • created_before String

    Query parameter. Returns records created before a given date and time

  • deleted_before String

    Query parameter. Returns records deleted before a given date and time

  • only_deleted Boolean

    Filters list to only include deleted learners.

  • with_deleted Boolean

    Filters list to also include deleted learners.

  • includes[] String [ registration ]

    Query parameter. Additional session registration details will be returned.

Example Request

/api/author/live_courses/1/learners?updated_after=2016-09-05
/api/author/live_courses/1/learners?updated_after=2016-09-05 12:27:55

Example Response

{
  "meta": {},
  "enrollments": [
    "{API::LiveCourseEnrollment}"
  ]
}

Create live course enrollment

POST /api/author/live_courses/:live_course_id/learners

Response Codes

  • 204 No Content

Parameters

  • live_course_id Integer Required

    Path parameter. Live course id for the learners we want

  • user_id String Required

    Body parameter. User id of the learner

Example Request

{
  "enrollments":[
    {
      "user_id": 2
    }
  ]
}
curl \
  -X POST \
  -H "Authorization: Bearer $TOKEN" \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -d '{"enrollments":[{"user_id":2}]}' \
  http://<bridge>/api/author/live_courses/:live_course_id/learners
    

Update live course enrollment

PATCH /api/author/live_courses/:live_course_id/learners/:id
PUT /api/author/live_courses/:live_course_id/learners/:id

Response Codes

  • 200 OK
  • 422 Unprocessable Entity

Parameters

  • live_course_id Integer Required

    Path parameter. Live course id for the learners we want

  • live_course_enrollment_id Integer Required

    Path parameter. Live course enrollment id for the learner

  • payload JSON Required
    No description provided.

Example Request

/api/author/live_courses/1/learners/1

Example Response

{
  "meta": {},
  "enrollments": [
    "{API::LiveCourseEnrollment}"
  ]
}

Delete live course enrollment

DELETE /api/author/live_courses/:live_course_id/learners/:id

Response Codes

  • 204 No Content

Parameters

  • live_course_id Integer Required

    Path parameter. Live course id for the learners we want

  • live_course_enrollment_id Integer Required

    Path parameter. Live course enrollment id for the learner

Example Request

/api/author/live_courses/1/learners/1

Author - Live Course Session Registrations API

This API allows authors to list, create, destroy registrants and take attendance.

List registrations for a live course session

GET /api/author/live_course_sessions/:live_course_session_id/registrations

Note: the deleted_at element in the returned object is present only if deleted records were requested.

Response Codes

  • 200 OK
  • 400 Bad Request

Parameters

  • live_course_sessions_id Integer Required

    Path parameter. Live course session id.

  • updated_after DateTime

    Returns records updated after a given date and time

  • created_after DateTime

    Returns records created after a given date and time

  • deleted_after DateTime

    Returns records deleted after a given date and time

  • updated_before DateTime

    Returns records updated before a given date and time

  • created_before DateTime

    Returns records created before a given date and time

  • deleted_before DateTime

    Returns records deleted before a given date and time

  • only_deleted Boolean

    Filters list to only include deleted registrations.

  • with_deleted Boolean

    Filters list to also include deleted registrations.

Example Request

/api/author/live_course_sessions/5/registrations
/api/author/live_course_sessions/5/registrations?with_deleted&updated_after=2015-07-05T12:27:55Z

Example Response

{
  "meta": {},
  "registrations": [
    {
      "id": "3",
      "live_course_session_id": "1",
      "name": "John Doo",
      "avatar_url": null,
      "marked_complete_at": "2015-07-16T14:49:00.762-06:00",
      "start_at": "2015-07-16T14:30:00.546-06:00",
      "created_at": "2015-06-01T01:12:56Z",
      "updated_at": "2015-07-04T23:57:00Z",
      "deleted_at": null
    }
  ]
}

Create a new registration

POST /api/author/live_course_sessions/:live_course_session_id/registrations

Response Codes

  • 204 No Content
  • 400 Bad Request

Parameters

  • live_course_session_id Integer Required

    Path parameter. Live course session id.

  • user_id Integer Required

    Body parameter. The ID of the learner to register for the session.

  • from_waitlist Boolean

    Body parameter. Default false.

Example Request

{
  "user_id": 42
}
curl \
  -X POST \
  -H "Authorization: Bearer $TOKEN" \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -d '{"user_id":42}' \
  http://<bridge>/api/author/live_course_sessions/:live_course_session_id/registrations
    

Update the registration

PATCH /api/author/live_course_sessions/:live_course_session_id/registrations/:id
PUT /api/author/live_course_sessions/:live_course_session_id/registrations/:id

Response Codes

  • 200 OK
  • 400 Bad Request

Parameters

  • live_course_session_id Integer Required

    Path parameter. Live course session id.

  • id Integer Required

    Path parameter. Registration id.

  • live_course_session_registration[marked_complete_at] DateTime Required

    Body parameter. DateTime of check in at live course session or null if not present.

Example Request

{
  "live_course_session_registration": {
    "marked_complete_at": null
  }
}
curl \
  -X PATCH \
  -H "Authorization: Bearer $TOKEN" \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -d '{"live_course_session_registration":{"marked_complete_at":null}}' \
  http://<bridge>/api/author/live_course_sessions/:live_course_session_id/registrations/:id
    

Example Response

{
  "meta": {},
  "registrations": []
}

Author - Live Course Session Registrations Subscriptions API

Get PandaPush subscription info

GET /api/author/live_course_sessions/:live_course_session_id/registrations/subscription

Get PandaPush subscription data for a course’s live_course_session_registrations. This endpoint will fetch all live_course_session_registrations for the desired course.

Response Codes

  • 200 OK
  • 403 Forbidden

Example Response

{
  "subscriptions": [
    {
      "url": "https://pp-beta.insops.net/push",
      "channel": "/PP_APP_ID/private/instructure/domains/1/live_course_sessions/2/registrations/**",
      "token": "A JWT-ENCODED STRING"
    }
  ]
}

Author - Live Course Session Waitlist API

This API allows authors to create and destroy waitlist enrollments.

Create a new waitlist enrollment

POST /api/author/live_course_sessions/:live_course_session_id/waitlist_enrollments

Response Codes

  • 204 No Content
  • 400 Bad Request

Parameters

  • live_course_session_id Integer Required

    Path parameter. Live course session id.

  • user_id Integer Required

    Body parameter. The ID of the learner to register for the session.

Example Request

{
  "user_id": 42
}
curl \
  -X POST \
  -H "Authorization: Bearer $TOKEN" \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -d '{"user_id":42}' \
  http://<bridge>/api/author/live_course_sessions/:live_course_session_id/waitlist_enrollments
    

Author - Live Course Sessions API

Object Synopses

SessionResponse

  • id Integer

    Live course session id

  • start_at DateTime or null

    Scheduled starting date and time

  • end_at DateTime or null

    Scheduled ending date and time

  • location String

    The physical location of the live course session

  • seats Integer

    Enrollment cap

  • registered_count Integer

    Current number of registrants

  • present_count Integer

    Current number of attending registrants

  • parts_count Integer

    Number of parts in a multi-part session

  • parent_id Integer

    The id of the live course session part’s parent

  • notes String

    Additional notes for registrants

  • live_course_id Integer

    The id of the live course

  • concluded_at DateTime or null

    Date and time at which the live course session concluded

  • enroll_url String

    enrollment url

  • has_web_conference Boolean

    True, if session (or any or it’s parts) have a web conference

  • instuctors Array

    Objects representing the instuctors for this session.

  • created_at String

    Time when this session was created.

  • updated_at String

    Time when this session was last updated.

  • deleted_at String

    Time when this session was deleted. Only present if deleted records were requested.

SessionRequest

  • start_at DateTime or null

    Optional. Scheduled starting date and time

  • end_at DateTime or null

    Optional. Scheduled ending date and time

  • location String

    Optional. The physical location of the live course session

  • seats Integer

    Optional. Enrollment cap

  • notes String

    Optional. Additional notes for registrants

  • timezone String

    Optional. User selected Timezone

List live course sessions

GET /api/author/live_courses/:live_course_id/sessions

Response Codes

  • 200 OK
  • 304 Not Modified

Parameters

  • live_course_id Integer Required

    Path parameter. Live course id for the sessions we want

  • updated_after DateTime

    Returns records updated after a given date and time

  • created_after DateTime

    Returns records created after a given date and time

  • deleted_after DateTime

    Returns records deleted after a given date and time

  • updated_before DateTime

    Returns records updated before a given date and time

  • created_before DateTime

    Returns records created before a given date and time

  • deleted_before DateTime

    Returns records deleted before a given date and time

  • only_deleted Boolean

    Filters list to only include deleted sessions.

  • with_deleted Boolean

    Filters list to also include deleted sessions.

  • parent_id Integer

    Returns only children records for a given parent_id

Example Request

/api/author/live_courses/1/sessions
/api/author/live_courses/3/sessions?with_deleted&updated_after=2015-07-05T14:01:00Z

Example Response

{
  "sessions": [
    "{API::SessionResponse}"
  ]
}

Show a live course session

GET /api/author/live_courses/:live_course_id/sessions/:id

Response Codes

  • 200 OK
  • 304 Not Modified

Parameters

  • live_course_id Integer Required

    Path parameter. Live course id

  • id Integer Required

    Path parameter. Session id

Example Response

{
  "sessions": [
    "{API::SessionResponse}"
  ]
}

Create a live course session

POST /api/author/live_courses/:live_course_id/sessions

Response Codes

  • 201 Created
  • 400 Bad Request if parameters are missing
  • 404 Not Found if live_course_id is not valid

Parameters

  • live_course_id Integer Required

    Path parameter. Live course id

  • sessions SessionRequest[] Required

    Body parameter. An array of SessionRequest objects with details for sessions to be created. All SessionRequest parameters are optional, but an empty object {} is the minimum element required in the array.

  • parent_id Integer

    Body parameter. Parent id.

  • timezone String

    Body parameter. Timezone.

Example Request

{
  "sessions": [
    "{API::SessionRequest}"
  ]
}
curl \
  -X POST \
  -H "Authorization: Bearer $TOKEN" \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -d '{"sessions":["{API::SessionRequest}"]}' \
  http://<bridge>/api/author/live_courses/:live_course_id/sessions
    

Example Response

{
  "sessions": [
    "{API::SessionResponse}"
  ]
}

Update a live course session

PATCH /api/author/live_courses/:live_course_id/sessions/:id
PUT /api/author/live_courses/:live_course_id/sessions/:id

Response Codes

  • 200 OK
  • 400 Bad Request if there is not at least one parameter passed
  • 404 Not Found if either live_course_id or id is invalid

Parameters

  • live_course_id Integer Required

    Path parameter. Live course id.

  • id Integer Required

    Path parameter. Session id.

  • timezone String

    Body parameter. Timezone.

  • session SessionRequest Required

    Body parameter. A SessionRequest object containing the fields to be updated.

Example Request

{
  "session": "{API::SessionRequest}"
}
curl \
  -X PATCH \
  -H "Authorization: Bearer $TOKEN" \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -d '{"session":"{API::SessionRequest}"}' \
  http://<bridge>/api/author/live_courses/:live_course_id/sessions/:id
    

Example Response

{
  "sessions": [
    "{API::SessionResponse}"
  ]
}

Delete a live course sessions

DELETE /api/author/live_courses/:live_course_id/sessions/:id

Response Codes

  • 204 No Content on successful deletion
  • 404 Not Found if live_course_id or id is invalid

Parameters

  • live_course_id Integer Required

    Path parameter. Live course id.

  • id Integer Required

    Path parameter. Session id.

Conclude a live course session

POST /api/author/live_courses/:live_course_id/sessions/:id/conclude

This action is irreversible. Declares a session to be completed. Unregisters absent enrollments and marks present enrollments as completed.

Response Codes

  • 200 OK if successfully concluded
  • 400 Bad Request if unable to conclude session
  • 404 Not Found if live_course_id or id are invalid

Parameters

  • live_course_id Integer Required

    Path parameter. Live course id.

  • id Integer Required

    Path parameter. Session id.

Example Response

{
  "sessions": [
    "{API::SessionResponse}"
  ]
}

Publish a live course session

POST /api/author/live_courses/:live_course_id/sessions/:id/publish

This action declares a session as published. Notifies users of the status change. Doesn’t affect published sessions.

Response Codes

  • 200 OK if successfully published
  • 400 Bad Request if unable to publish session
  • 404 Not Found if live_course_id or id are invalid

Parameters

  • live_course_id Integer Required

    Path parameter. Live course id.

  • id Integer Required

    Path parameter. Session id.

Example Response

{
  "sessions": [
    "{API::SessionResponse}"
  ]
}

Clone a live course session

POST /api/author/live_courses/:live_course_id/sessions/:id/clone

This action creates a copy of an existing live course session.

Response Codes

  • 201 Created if successfully created
  • 404 Not Found if live_course_id or id are invalid

Parameters

  • live_course_id Integer Required

    Path parameter. Live course id.

  • id Integer Required

    Path parameter. Session id.

Example Response

{
  "sessions": [
    "{API::SessionResponse}"
  ]
}

Author - Live Course Web Conferences API

Object Synopses

WebConferenceResponse

  • id Integer

    Live course web conference id

  • live_course_session_id Integer

    Live course session id this web conference belongs to

  • provider String

    Web conference provider. One of ‘Microsoft Teams’, ‘Google Meet’, ‘WebEx’, ‘GoToMeeting’, ‘GoToWebinar’, ‘Adobe Connect’, ‘Zoom’, ‘Bluejeans’, or ‘Other’

  • other_provider String

    If provider is ‘Other’, provider name may be placed here instead

  • meeting_url String

    URL where learners can join web conference

  • access_code String

    Access code for web conference

  • phone String

    Phone number for learners to join web conference

  • host_key String

    Additional key for other hosts

  • password String

    Password for learners to join web conference

  • registration_link String

    Link to register for the web conference

WebConferenceRequest

  • provider String

    Web conference provider. One of ‘Microsoft Teams’, ‘Google Meet’, ‘WebEx’, ‘GoToMeeting’, ‘GoToWebinar’, ‘Adobe Connect’, ‘Zoom’, ‘Bluejeans’, or ‘Other’

  • other_provider String

    If provider is ‘Other’, provider name may be placed here instead

  • meeting_url String

    URL where learners can join web conference

  • access_code String

    Access code for web conference

  • phone String

    Phone number for learners to join web conference

  • host_key String

    Additional key for other hosts

  • password String

    Password for learners to join web conference

  • registration_link String

    Link to register for the web conference

  • default_session Boolean

    Re-use the details of this web conference for new sessions

  • apply_all Boolean

    Saves details to all other sessions in live course

List web conference details

GET /api/author/web_conferences
GET /api/author/live_courses/:live_course_id/web_conferences

Response Codes

  • 200 OK

Parameters

  • live_course_id Integer

    Filters list to only include web conferences under this live course.

  • default_session Boolean

    Filters list to only include default web conferences for current user.

Example Response

{
  "web_conferences": [
    "{API::WebConferenceResponse}"
  ]
}

Show a session's web conference details

GET /api/author/live_courses/:live_course_id/sessions/:session_id/web_conference

Response Codes

  • 200 OK
  • 404 Not Found if no web conference exists

Example Response

{
  "web_conferences": [
    "{API::WebConferenceResponse}"
  ]
}

Update a session's web conference details

PATCH /api/author/live_courses/:live_course_id/sessions/:session_id/web_conference
PUT /api/author/live_courses/:live_course_id/sessions/:session_id/web_conference

Response Codes

  • 200 OK
  • 404 Not Found if either live_course_id or session_id is invalid
  • 422 Unprocessable Entity if a required parameter is missing

Parameters

  • live_course_id Integer Required

    Path parameter. Live course id.

  • session_id Integer Required

    Path parameter. Session id.

Example Request

{
  "web_conference": "{API::WebConferenceRequest}"
}
curl \
  -X PATCH \
  -H "Authorization: Bearer $TOKEN" \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -d '{"web_conference":"{API::WebConferenceRequest}"}' \
  http://<bridge>/api/author/live_courses/:live_course_id/sessions/:session_id/web_conference
    

Example Response

{
  "web_conferences": [
    "{API::WebConferenceResponse}"
  ]
}

Remove a session's web conference details

DELETE /api/author/live_courses/:live_course_id/sessions/:session_id/web_conference

Response Codes

  • 204 No Content on successful removal
  • 404 Not Found if live_course_id or session_id is invalid or web_conference doesn’t exist

Parameters

  • live_course_id Integer Required

    Path parameter. Live course id.

  • session_id Integer Required

    Path parameter. Session id.

Author - Live Courses API

This API allows authors to list, display, create, update, and delete live courses.

Object Synopses

LiveCourseRequest

  • title String

    Title of live course.

  • description String

    A description of the live course.

  • external_course_id String

    An external identifier for the course.

  • has_certificate Boolean

    Indicates if a certificate is issued when course is successfully completed.

LiveCourseResponse

Live Course

  • id String Required
    No description provided.
  • title String Required
    No description provided.
  • author_id String Required

    The id of the creator of this live course.

  • created_at DateTime Required

    The timestamp at which this course was created

  • updated_at DateTime Required

    The timestamp at which this course was last changed

  • deleted_at DateTime

    The timestamp at which this course was deleted. Only present if deleted records were requested

  • description String Required

    A longer description of course content.

  • sessions_count Integer Required
    No description provided.
  • enrollments_count Integer Required
    No description provided.
  • is_published Boolean Required
    No description provided.
  • external_course_id String

    An external identifier for the course.

  • has_certificate Boolean

    Indicates if certificate is issued when course is successfully completed.

  • expires Boolean

    Indicates if this live course expires and must be retaken periodically. Always shown in ‘Show live course’ and ‘Update live course’ methods. Shown in ‘List live courses’ method if includes[]=expiration query parameter is passed.

  • default_days_until_expiration Integer

    Period of time until learner must be re-enrolled. Always shown in ‘Show live course’ and ‘Update live course’ methods. Shown in ‘List live courses’ method if includes[]=expiration query parameter is passed.

  • auto_re_enroll Boolean

    Indicates if Bridge will re-enroll the learner automatically after expiration. Always shown in ‘Show live course’ and ‘Update live course’ methods. Shown in ‘List live courses’ method if includes[]=expiration query parameter is passed.

  • re_enrollment_period Integer

    Number of days before expiration when Bridge will automatically re-enroll. Always shown in ‘Show live course’ and ‘Update live course’ methods. Shown in ‘List live courses’ method if includes[]=expiration query parameter is passed.

  • open_enrollment Boolean

    Indicates if enrollment is open to all users with enroll_url. Always shown in ‘Show live course’ and ‘Update live course’ methods. Shown in ‘List live courses’ method if includes[]=enrollment_profiles query parameter is passed.

  • uuid String

    Course uuid. Always shown in ‘Show live course’ and ‘Update live course’ methods. Shown in ‘List live courses’ method if includes[]=enrollment_profiles query parameter is passed.

  • enroll_url String

    URL a learner can use to enroll if open enrollment is permitted. Always shown in ‘Show live course’ and ‘Update live course’ methods. Shown in ‘List live courses’ method if includes[]=enrollment_profiles query parameter is passed.

  • enrollments {API::LiveCourseEnrollment}[]

    Array containing all enrollments for this live course. Omitted unless includes[]=enrollments query parameter is passed.

  • enrollment_counts {API::LiveCourseEnrollmentsCount}

    Always shown in ‘Show live course’ and ‘Update live course’ methods. Shown in ‘List live courses’ method if includes[]=counts query parameter is passed.

  • tags Array

    A list of tags for the live course

  • matching_tags Array

    Tags matching the search query for the live course

LiveCourseEnrollmentsCount

Detailed counts of enrollments

  • all Integer Required

    Total count of enrollments.

  • invited Integer Required

    Count of enrollments that have received invitations to register.

  • not_registered Integer Required

    Count of enrollments that have not registered for a session.

  • registered Integer Required

    Count of enrollments that have registered for a session.

  • finished Integer Required

    Count of enrollments that have completed a session.

List live courses

GET /api/author/live_courses

Response Codes

  • 200 OK
  • 304 Not Modified

@argument[Optional, String] search Query parameter. String to search for in title.

@argument[Optional, String] subaccounts[] Query parameter. Array of String subaccount IDs to filter by.

Parameters

  • sort String [ title, updated ]

    Query parameter. Applies a sort to the result list.

  • filters String [ upcoming ]

    Query parameter. Array of filters to limit results.

  • updated_after DateTime

    Filters list to only include records updated after the given RFC 3339 compliant timestamp.

  • created_after DateTime

    Filters list to only include records created after the given RFC 3339 compliant timestamp.

  • deleted_after DateTime

    Filters list to only include records deleted after the given RFC 3339 compliant timestamp.

  • updated_before DateTime

    Filters list to only include records updated before the given RFC 3339 compliant timestamp.

  • created_before DateTime

    Filters list to only include records created before the given RFC 3339 compliant timestamp.

  • deleted_before DateTime

    Filters list to only include records deleted before the given RFC 3339 compliant timestamp.

  • only_deleted Boolean

    Filters list to only include deleted live courses.

  • with_deleted Boolean

    Filters list to also include deleted live courses.

  • includes[] String [ counts, expiration, enrollments, enrollment_profiles ]

    Query paramater. Additional information to be returned in the response. This argument may occur multiple times. If counts is given, response will include enrollment_counts. If expiration is given, response will include auto_re_enroll, default_days_until_expiration, expires, and re_enrollment_period. If enrollment_profiles is given, response will include enroll_url, open_enrollment, and uuid. If enrollments is given, response will contain all enrollments and their registrations in the course.

Example Response

{
  "meta": {},
  "live_courses": [
    "{LiveCourseResponse}"
  ]
}

Create live course

POST /api/author/live_courses

Response Codes

  • 201 Created

Parameters

  • live_courses LiveCourseRequest[] Required

    Path parameter. An array of LiveCourseRequest. If Optional fields` are present, the new live course will be initialized with their values.

Example Request

{
  "live_courses": [
    "{API::LiveCourseRequest}"
  ]
}
curl \
  -X POST \
  -H "Authorization: Bearer $TOKEN" \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -d '{"live_courses":["{API::LiveCourseRequest}"]}' \
  http://<bridge>/api/author/live_courses
    

Example Response

{
  "meta": {},
  "live_courses": [
    "{API::LiveCourseResponse}"
  ]
}

Show live course

GET /api/author/live_courses/:id

Response Codes

  • 200 OK
  • 304 Not Modified

Parameters

  • id Integer Required

    Path parameter. Live course id

  • includes[] String [ enrollments ]

    Query paramater. Additional information to be returned in the response. This argument may occur multiple times. If enrollments is given, response will contain all enrollments and their registrations in the course.

Example Response

{
  "meta": {},
  "live_courses": [
    "{API::LiveCourseResponse}"
  ]
}

Update live course

PATCH /api/author/live_courses/:id
PUT /api/author/live_courses/:id

Response Codes

  • 200 OK

Parameters

  • id Integer Required

    Path parameter. Live course id

  • title String Required

    Body parameter. The new live course title

  • description String Required

    Body parameter. The new live course description

Example Request

"{API::LiveCourseRequest}"

Example Response

{
  "meta": {},
  "live_courses": [
    "{API::LiveCourseResponse}"
  ]
}

Delete live course

DELETE /api/author/live_courses/:id

Response Codes

  • 204 No Content

Parameters

  • id Integer Required

    Path parameter. Live course id

Author - Manager Direct Reports API

These endpoints will return information about managers and their direct reports.

List direct reports

GET /api/author/managers/:manager_id/direct_reports

Direct reports are listed 20 per response with the next group available via the next URL in the meta object.

Response Codes

  • 200 OK
  • 404 Not Found If manager id does not reference a manager

Parameters

  • manager_id String Required

    The manager’s id.

Example Response

{
  "meta": {
    "next": "https://example.bridgeapp.com/api/author/managers/1?after=afdsajkf3er32fsjfkdsa"
  },
  "manager_id": "1",
  "direct_reports_count": 21,
  "direct_reports": [
    {
      "id": "2",
      "uid": "gexemplar",
      "hris_id": "123456",
      "first_name": "George",
      "last_name": "Exemplar",
      "full_name": "George A Exemplar",
      "sortable_name": "Exemplar, George A",
      "email": "gexemplar@example.com",
      "locale": "en",
      "roles": [],
      "name": "George Exemplar",
      "avatar_url": "https://www.example.com/pictures/gexemplar.jpeg",
      "updated_at": "2016-12-03T08:48:01.944-07:00",
      "deleted_at": null,
      "unsubscribed": null,
      "welcomed_at": "2015-06-18T10:40:09.097-06:00",
      "logged_in_at": "2016-12-03T08:48:01.930-07:00",
      "hire_date": "2014-04-24T16:00:00.000-07:00",
      "is_manager": false,
      "job_title": "Widget Designer"
    }
  ]
}

Author - Managers API

These endpoints will return information about managers and their direct reports.

List all managers

GET /api/author/managers

Managers are listed 20 per response with the next group available via the next URL in the meta object.

Response Codes

200 OK

Parameters

  • search String

    Finds managers with matching value in first name, last name, uid, or email.

Example Response

{
  "meta": {
    "next": "https://example.bridgeapp.com/api/author/managers?after=afdsajkf3er32fsjfkdsa"
  },
  "managers": [
    {
      "id": "1",
      "uid": "jdoe",
      "hris_id": "123213",
      "first_name": "John",
      "last_name": "Doe",
      "full_name": "John A Doe",
      "sortable_name": "Doe, John A",
      "email": "jdoe@example.com",
      "locale": "en",
      "roles": ["observer"],
      "name": "John Doe",
      "avatar_url": "https://www.example.com/pictures/jdoe.jpeg",
      "updated_at": "2016-12-02T08:48:01.944-07:00",
      "deleted_at": null,
      "unsubscribed": null,
      "welcomed_at": "2015-06-17T10:40:09.097-06:00",
      "logged_in_at": "2016-12-02T08:48:01.930-07:00",
      "hire_date": "2014-04-01T16:00:00.000-07:00",
      "direct_reports_count": 9
    }
  ]
}

Author - Memberships API

This API controls group memberships.

Object Synopses

MembershipRequest

  • user_id Integer

    User id to add to group

Add a member to a group

POST /api/author/groups/:group_id/learners

Response Codes

  • 201 Created
  • 404 Not Found

Parameters

  • group_id Integer Required

    Path parameter. Group id.

  • users MembershipRequest[] Required

    Body parameter. An array of MembershipRequest objects

Example Request

{
  "users": [
    "{API::MembershipRequest}"
  ]
}
curl \
  -X POST \
  -H "Authorization: Bearer $TOKEN" \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -d '{"users":["{API::MembershipRequest}"]}' \
  http://<bridge>/api/author/groups/:group_id/learners
    

Example Response

{
  "meta": {},
  "linked": {
    "groups": [
      {
        "id": "4",
        "parent_id": "",
        "name": "Rebellion",
        "type": "group",
        "users_count": 1,
        "links": {}
      }
    ]
  },
  "learners": [
    {
      "id": "2",
      "group": "4",
      "avatar": null,
      "completed_courses_count": 0,
      "email": null,
      "name": "Cem Al",
      "next_due_date": "2015-07-22T20:08:49.411Z"
    }
  ]
}

List the members of the group

GET /api/author/groups/:group_id/learners

Response Codes

  • 200 OK
  • 400 Bad Request

Parameters

  • group_id Integer Required

    Path parameter. Group id.

  • search String

    Query parameter. The value can be a firstname, lastname, username, or e-mail.

  • sort String [ name ]

    Query parameter. Returns results in ascending order. Prepending values with - will return results in descending order.

Example Response

{
  "meta": {},
  "linked": {
    "groups": [
      {
        "id": "1",
        "parent_id": "",
        "name": "All Learners",
        "type": "domain",
        "users_count": 1,
        "links": {}
      }
   ]
  },
  "learners": [
    {
      "id": "1",
      "group": "1",
      "avatar": null,
      "completed_courses_count": 1,
      "email": null,
      "name": "John Doo",
      "next_due_date": null
    }
  ]
}

Delete a member from a group

DELETE /api/author/groups/:group_id/learners/:id

Response Codes

  • 204 No Content

Parameters

  • group_id Integer Required

    Path parameter. Group id.

  • id Integer Required

    Path parameter. Learner id.

Author - Messages API

Send message

POST /api/author/messages

POST /api/author/messages/

Author - Notifications API

Fetch notifications for a user

GET /api/author/users/:user_id/notifications

No documentation available yet.

Send welcome email to a user

POST /api/author/notifications/:id/welcome

No documentation available yet.

Send password reset email to a user

POST /api/author/notifications/:id/password

No documentation available yet.

Author - Program Enrollments API

Enables fetching, creating, and deleting enrollments (learners) for a program

Object Synopses

ProgramEnrollmentResponse

  • id Integer

    User id of learner

  • name String

    Name of learner

  • email String

    Email of learner

  • avatar_url String

    URL to avatar image

  • state String

    Current state of enrollment. One of ‘active’ or ‘complete’

  • enrollment_id Integer

    Enrollment id

  • current_program_item_index Integer

    Current program item step learner is on

  • total_program_items Integer

    Total number of steps in program

  • current_program_item_due Integer

    Number of days until current course is due

  • pending_approval_item_count Integer

    Number of program items pending approval

  • program_due Integer

    Number of days until program is due

  • group_ids String[]

    Group ids associated with this learner’s enrollment

  • created_at String

    Time when this program enrollment was created.

  • updated_at String

    Time when this program enrollment was last updated.

  • deleted_at String

    Time when this program enrollment was deleted. Only present if deleted records were requested.

  • end_at DateTime

    Due date for this program enrollment

  • expires_at DateTime

    Expiration date for this program enrollment

  • completed_at DateTime

    Completion date for this program enrollment

Fetch list of enrollments (learners) in a program

GET /api/author/programs/:program_id/learners

Response Codes

  • 200 OK

Parameters

  • program_id Integer Required

    Path parameter. Program id for the learners we want

  • updated_after DateTime

    Query parameter. Filters list to only include learners updated after the given RFC 3339 compliant timestamp.

  • created_after DateTime

    Query parameter. Filters list to only include learners created after the given RFC 3339 compliant timestamp.

  • deleted_after DateTime

    Query parameter. Filters list to only include learners deleted after the given RFC 3339 compliant timestamp.

  • updated_before DateTime

    Query parameter. Filters list to only include learners updated before the given RFC 3339 compliant timestamp.

  • created_before DateTime

    Query parameter. Filters list to only include learners created before the given RFC 3339 compliant timestamp.

  • deleted_before DateTime

    Query parameter. Filters list to only include learners deleted before the given RFC 3339 compliant timestamp.

  • only_deleted Boolean

    Filters list to only include deleted learners.

  • with_deleted Boolean

    Filters list to also include deleted learners.

  • sort String [ name, progress, course_due_date, due_date, renew_date ]

    Query parameter causes list to be returned in ascending order. Values may be prepended with - for descending order.

  • search String

    Find enrollments with learner matching values in first name, last name, uid, or email.

  • user_id Integer

    Find enrollments belonging to a specific learner.

Example Response

{
  "meta": {
    "next": "http://bridge.bridgeapp.com/api/author/programs/1/learners?after=eyJ0eXAiOiJKV1QiLCJhSDiQQ"
  },
  "enrollments": [
    "{API::ProgramEnrollmentResponse}"
  ]
}

Enroll learner into program

POST /api/author/programs/:program_id/learners

No documentation available yet.

Update program enrollment

PATCH /api/author/programs/:program_id/learners/:id
PUT /api/author/programs/:program_id/learners/:id

Response Codes

  • 200 OK

Parameters

  • program_id Integer Required

    Path parameter. Program id for the learners we want

  • program_enrollment_id Integer Required

    Path parameter. Program enrollment id for the learner

  • payload JSON Required

    Request body. Must include an ‘enrollments’ field with updated data.

Example Request

{
  "enrollments": [
    {
      "end_at": "2017-12-31 07:00:00",
      "expires_at": "2018-12-31 07:00:00"
    }
  ]
}
curl \
  -X PATCH \
  -H "Authorization: Bearer $TOKEN" \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -d '{"enrollments":[{"end_at":"2017-12-31 07:00:00","expires_at":"2018-12-31 07:00:00"}]}' \
  http://<bridge>/api/author/programs/:program_id/learners/:id
    

Example Response

{
  "meta": {},
  "enrollments": [
    "{API::ProgramEnrollmentResponse}"
  ]
}

Remove learner from program

DELETE /api/author/programs/:program_id/learners/:id

No documentation available yet.

Author - Program Sections API

Fetches, creates, and deletes program sections

Object Synopses

ProgramSectionRequest

  • title String

    Title of program section.

  • description String

    Description of program section.

ProgramSectionsResponse

  • id String

    Program Section id

  • title String

    The title of the section

  • description String

    A description of the section

Create program section

POST /api/author/program_sections

Response codes

  • 201 Created
  • 400 Bad Request
  • 403 Forbidden
  • 422 Unprocessable Entity

Parameters

  • program ProgramSectionRequest[] Required

    sections Body parameter. An array of {API::ProgramSectionRequest} to be created.

  • title String

    Title of the program section.

  • description String

    Description of the program section

Example Request

{"program_sections": [
    {"title": "Title-1", "description": "Description 1"},
    {"title": "Title-2", "description": "Description 2"}
  ]
}
curl \
  -X POST \
  -H "Authorization: Bearer $TOKEN" \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -d '{"program_sections":[{"title":"Title-1","description":"Description 1"},{"title":"Title-2","description":"Description 2"}]}' \
  http://<bridge>/api/author/program_sections
    

Example Response

{
  "meta": {},
  "programs_sections": [
    {
       "id": "17",
       "title": "Title-1",
       "description": "Description 1"
    },
    {
       "id": "18",
       "title": "Title-2",
       "description": "Description 2"
    }
  ]
}

Show program BETA

GET /api/author/program_sections/:id

BETA: This API endpoint is not finalized, and there could be breaking changes before its final release.

Response Codes

  • 200 OK
  • 403 Forbidden
  • 404 Not Found

Parameters

  • id Integer Required

    The program section id.

Example Response

{
  "program_sections": [{
    "id": "1",
    "title": "Live Trainings",
    "description": "A series of mandatory live trainings"
  }]
}

Update a program section

PATCH /api/author/program_sections/:id
PUT /api/author/program_sections/:id

Response Codes

  • 200 OK
  • 403 Forbidden
  • 404 Not Found
  • 422 Unprocessable Entity

Parameters

  • program ProgramSectionRequest Required

    section Body parameter. A {API::ProgramSectionRequest} containing the fields to be updated.

Example Request

{
  "program_section": "{API::ProgramSectionRequest}"
}
curl \
  -X PATCH \
  -H "Authorization: Bearer $TOKEN" \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -d '{"program_section":"{API::ProgramSectionRequest}"}' \
  http://<bridge>/api/author/program_sections/:id
    

Example Response

{
  "meta": {},
  "program_sections": [
    {
      "id": "1",
      "title": "My Test Program Section",
      "description": "My Test Program Section Description"
    }
  ]
}

Delete a program section

DELETE /api/author/program_sections/:id

Response codes

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

Parameters

  • id Integer Required

    Path parameter. Program Section ID.

Author - Programs API

This endpoint controls the creation and maintenance of programs

Object Synopses

CreateProgramRequest

  • title String

    Title of program.

  • description String

    Description of program.

ProgramItem

  • item_type String Required

    The type of the item in the program.

  • item_id Integer Required

    The id of the item in the program.

UpdateProgramRequest

  • title String

    Title of program.

  • description String

    Description of program.

  • step_notifications Boolean

    Send Notification at Each Step

  • open_enrollment Boolean

    Indicates if enrollment is open to all users with enroll_url.

  • external_id String

    Optional. Identifier for linking to external systems.

  • default_days_until_due Integer

    Number of days from assignment to a learner until program is due.

  • default_due_on_date String

    Date on which all enrollments will be due.

  • expires Boolean

    Indicates if this program expires and must be retaken periodically.

  • auto_re_enroll Boolean

    Indicates if Bridge will re-enroll the learner automatically before expiration.

  • default_days_until_expiration Integer

    Number of days from assignment to a learner until program is expired.

  • re_enrollment_period Integer

    Number of days before expiration when Bridge will automatically re-enroll.

  • has_certificate Boolean

    Indicates if certificate is issued when program is successfully completed.

  • Items in the program, in order.

ProgramSubAccount

  • id Integer

    SubAccount id

  • name String

    The name of the subaccount

  • is_root Boolean

    Is this the root account

  • not_current Boolean

    Is this program outside the current subaccount

List programs

GET /api/author/programs

Note: the deleted_at element in the returned object is present only if deleted records were requested.

Response Codes

  • 200 OK
  • 304 Not Modified

Parameters

  • updated_after DateTime

    Query parameter. Filters list to only include courses updated after the given RFC 3339 compliant timestamp.

  • created_after DateTime

    Query parameter. Filters list to only include courses created after the given RFC 3339 compliant timestamp.

  • deleted_after DateTime

    Query parameter. Filters list to only include courses deleted after the given RFC 3339 compliant timestamp.

  • updated_before DateTime

    Query parameter. Filters list to only include courses updated before the given RFC 3339 compliant timestamp.

  • created_before DateTime

    Query parameter. Filters list to only include courses created before the given RFC 3339 compliant timestamp.

  • deleted_before DateTime

    Query parameter. Filters list to only include courses deleted before the given RFC 3339 compliant timestamp.

  • only_deleted Boolean

    Filters list to only include deleted programs.

  • with_deleted Boolean

    Filters list to also include deleted programs.

  • sort String [ newest, title, updated ]

    Query parameter. Applies a sort to the result list.

  • filters[] String [ unpublished, no_enrollments ]

    Query parameter. This argument may occur multiple times.

  • search String

    Query parameter. Search program titles for a match with the given string.

Example Response

{
  "meta": {},
  "programs": [
   {
      "id": "6",
      "title": "finish me",
      "created_at": "2018-10-30T23:37:07.864Z",
      "updated_at": "2018-11-28T09:58:33.000Z",
      "deleted_at": "2018-12-05T19:27:54.010Z",
      "description": "A program to finish",
      "course_count": 3,
      "item_count": 4,
      "is_published": true,
      "publishable": true,
      "has_unpublished_changes": false,
      "step_notifications": true,
      "has_certificate": false,
      "external_id": null,
      "direct_messaging_enabled": true,
      "has_shared_enrollments": false,
      "unfinished_learners_count": 2,
      "sub_account": {
        "id": "1",
        "name": "Acme, Co",
        "is_root": true,
        "sub_accounts_exist": true,
        "not_current": false,
        "tac_type": "domestic",
        "tac_custom_body_markup": null,
        "tac_updated_at": "2018-02-28T17:55:41.463Z"
      },
      "due_date_type": "relative",
      "default_due_on_date": null,
      "default_days_until_due": 14
    }
  ]
}

Create program

POST /api/author/programs

Response codes

  • 201 Created
  • 400 Bad Request
  • 401 Unauthorized

Parameters

  • programs CreateProgramRequest[] Required

    Body parameter. An array of {API::CreateProgramRequest} to be created.

Example Request

{"programs": [
    {"title": "Title-1"},
    {"title": "Title-2"}
  ]
}
curl \
  -X POST \
  -H "Authorization: Bearer $TOKEN" \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -d '{"programs":[{"title":"Title-1"},{"title":"Title-2"}]}' \
  http://<bridge>/api/author/programs
    

Example Response

{
  "meta": {},
  "programs": [
    {
      "id": "7",
      "title": "Title-1",
      "description": "Description 1",
      "course_count": 0,
      "item_count": 0,
      "is_published": false,
      "publishable": true,
      "has_unpublished_changes": false,
      "step_notifications": true,
      "has_certificate": false,
      "external_id": null,
      "direct_messaging_enabled": true,
      "unfinished_learners_count": 0,
      "sub_account": {
        "id": "1",
        "name": "Acme, Co",
        "is_root": true,
        "sub_accounts_exist": true,
        "not_current": false,
        "tac_type": "domestic",
        "tac_custom_body_markup": null,
        "tac_updated_at": "2018-02-28T17:55:41.463Z"
      },
      "is_non_linear": false,
      "has_shared_content": false,
      "is_shared": false,
      "due_date_type": "relative",
      "default_due_on_date": null,
      "default_days_until_due": null
    },
    {
      "id": "18",
      "title": "Title-2",
      "description": "Description 2",
      "course_count": 0,
      "item_count": 0,
      "is_published": false,
      "publishable": true,
      "has_unpublished_changes": false,
      "step_notifications": true,
      "has_certificate": false,
      "external_id": null,
      "direct_messaging_enabled": true,
      "unfinished_learners_count": 0,
      "sub_account": {
        "id": "1",
        "name": "Acme, Co",
        "is_root": true,
        "sub_accounts_exist": true,
        "not_current": false,
        "tac_type": "domestic",
        "tac_custom_body_markup": null,
        "tac_updated_at": "2018-02-28T17:55:41.463Z"
      },
      "is_non_linear": false,
      "has_shared_content": false,
      "is_shared": false,
      "due_date_type": "relative",
      "default_due_on_date": null,
      "default_days_until_due": null
    }
  ]
}

Publish program

POST /api/author/programs/:id/publish

Makes a program visible to non-authors

Response Codes

  • 200 OK

Parameters

  • id Integer Required

    Path parameter. Program id.

Example Response

{
  "meta": {},
  "programs": [
    {
      "id": "7",
      "title": null,
      "description": null,
      "course_count": 2,
      "item_count": 2,
      "is_published": true,
      "publishable": true,
      "has_unpublished_changes": false,
      "step_notifications": true,
      "has_certificate": false,
      "external_id": null,
      "direct_messaging_enabled": true,
      "unfinished_learners_count": 0,
      "enrollment_counts": {
        "all": 0,
        "overdue": 0,
        "not_finished": 0,
        "finished": 0
      },
      "sub_account": {
        "id": "1",
        "name": "Acme, Co",
        "is_root": true,
        "sub_accounts_exist": true,
        "not_current": false,
        "tac_type": "domestic",
        "tac_custom_body_markup": null,
        "tac_updated_at": "2018-02-28T17:55:41.463Z"
      },
      "items": [
        {
          "id": "19",
          "item_type": "CourseTemplate",
          "title": "tedt",
          "description": null,
          "default_days_until_due": 7,
          "default_due_on_date": null,
          "editable": true,
          "estimated_time": 0,
          "is_published": true,
          "passing_threshold": 80,
          "sessions_count": 0,
          "max_quiz_attempts": null,
          "continuing_education_credits": null,
          "default_approver": null,
          "requires_approval": false,
          "requires_evidence": false,
          "icon": null
        }
      ],
      "course_templates": [
        {
          "id": "19",
          "estimated_time": 0,
          "passing_threshold": 80,
          "max_quiz_attempts": null,
          "continuing_education_credits": null,
          "default_days_until_due": 7,
          "title": "tedt",
          "description": null,
          "is_published": true,
          "published_at": "2018-03-23T14:25:59.530-06:00",
          "has_certificate": false,
          "course_type": "bridge",
          "external_id": null
        }
      ],
      "graphic": {
        "gradient": 0,
        "image": null
      },
      "is_non_linear": false,
      "estimated_time": 0,
      "open_enrollment": false,
      "uuid": "16e9f256",
      "enroll_url": "http://acme.bridgeapp.com/learner/programs/16e9f256/enroll",
      "has_shared_content": false,
      "is_shared": false,
      "due_date_type": "relative",
      "default_due_on_date": null,
      "default_days_until_due": null,
      "expires": false,
      "default_days_until_expiration": null,
      "auto_re_enroll": false,
      "re_enrollment_period": 14
    }
  ]
}

Delete a program

DELETE /api/author/programs/:id

Response codes

  • 204 No Content On successful deletion

Parameters

  • id Integer Required

    Path parameter. Program id.

Discard changes

POST /api/author/programs/:id/discard_changes

Discards unpublished changes to the program.

Response Codes

  • 200 OK

Parameters

  • id Integer Required

    Path parameter. Program id.

Example Response

{
  "meta": {},
  "programs": [
    {
      "id": "7",
      "title": null,
      "description": null,
      "course_count": 2,
      "item_count": 2,
      "is_published": true,
      "publishable": true,
      "has_unpublished_changes": false,
      "step_notifications": true,
      "has_certificate": false,
      "external_id": null,
      "direct_messaging_enabled": true,
      "unfinished_learners_count": 0,
      "enrollment_counts": {
        "all": 0,
        "overdue": 0,
        "not_finished": 0,
        "finished": 0
      },
      "sub_account": {
        "id": "1",
        "name": "Acme, Co",
        "is_root": true,
        "sub_accounts_exist": true,
        "not_current": false,
        "tac_type": "domestic",
        "tac_custom_body_markup": null,
        "tac_updated_at": "2018-02-28T17:55:41.463Z"
      },
      "items": [
        {
          "id": "19",
          "item_type": "CourseTemplate",
          "title": "tedt",
          "description": null,
          "default_days_until_due": 7,
          "default_due_on_date": null,
          "editable": true,
          "estimated_time": 0,
          "is_published": true,
          "passing_threshold": 80,
          "sessions_count": 0,
          "max_quiz_attempts": null,
          "continuing_education_credits": null,
          "default_approver": null,
          "requires_approval": false,
          "requires_evidence": false,
          "icon": null
        }
      ],
      "course_templates": [
        {
          "id": "19",
          "estimated_time": 0,
          "passing_threshold": 80,
          "max_quiz_attempts": null,
          "continuing_education_credits": null,
          "default_days_until_due": 7,
          "title": "tedt",
          "description": null,
          "is_published": true,
          "published_at": "2018-03-23T14:25:59.530-06:00",
          "has_certificate": false,
          "course_type": "bridge",
          "external_id": null
        }
      ],
      "graphic": {
        "gradient": 0,
        "image": null
      },
      "is_non_linear": false,
      "estimated_time": 0,
      "open_enrollment": false,
      "uuid": "16e9f256",
      "enroll_url": "http://acme.bridgeapp.com/learner/programs/16e9f256/enroll",
      "has_shared_content": false,
      "is_shared": false,
      "due_date_type": "relative",
      "default_due_on_date": null,
      "default_days_until_due": null,
      "expires": false,
      "default_days_until_expiration": null,
      "auto_re_enroll": false,
      "re_enrollment_period": 14
    }
  ]
}

Show program

GET /api/author/programs/:id

Response Codes

  • 200 OK
  • 304 Not Modified

Parameters

  • id Integer Required

    The program id.

Example Response

{
  "meta": {},
  "programs": [
    {
      "id": "1",
      "title": "My Test Program",
      "description": "My Test Program Description",
      "course_count": 3,
      "item_count": 4,
      "publishable": true,
      "is_published": true,
      "has_unpublished_changes": false,
      "step_notifications": true,
      "item_count": 3,
      "unfinished_learners_count": 1,
      "external_id": null,
      "has_certificate": false,
      "enrollment_counts": {
        "all": 4,
        "overdue": 0,
        "not_finished": 2,
        "finished": 2
      },
      "sub_account": {
        "id": 1,
        "name": "Acme, Co",
        "sub_accounts_exist": true,
        "is_root": true,
        "not_current": false,
        "tac_type": "domestic",
        "tac_custom_body_markup": null,
        "tac_updated_at": "2018-02-28T17:55:41.463Z"
      },
      "items": [
        {
          "id": "4",
          "item_type": "CourseTemplate",
          "title": "test program final course",
          "description": null,
          "default_days_until_due": 7,
          "default_due_on_date": null,
          "editable": true,
          "estimated_time": 0,
          "is_published": true,
          "passing_threshold": 80,
          "sessions_count": 0,
          "max_quiz_attempts": null,
          "continuing_education_credits": null,
          "default_approver": null,
          "requires_approval": false,
          "requires_evidence": false,
          "blocks_progress": false,
          "icon": null
        }
      ],
      "course_templates": [
        {
          "id": "4",
          "estimated_time": 0,
          "passing_threshold": 80,
          "max_quiz_attempts": null,
          "continuing_education_credits": null,
          "default_days_until_due": 7,
          "title": "test program final course",
          "description": null,
          "is_published": true,
          "published_at": "2017-12-07T10:29:09.247-07:00",
          "has_certificate": false,
          "course_type": "bridge",
          "external_id": null
        }
      ],
      "graphic": {
        "gradient": 3,
        "image": null
      },
      "is_non_linear": false,
      "estimated_time": 1,
      "open_enrollment": false,
      "uuid": "2d3a2312",
      "enroll_url": "http://acme.bridgeapp.com/learner/programs/2d3a2312/enroll",
      "has_shared_content": false,
      "is_shared": false,
      "due_date_type": "relative",
      "default_due_on_date": null,
      "default_days_until_due": 14,
      "expires": true,
      "default_days_until_expiration": null,
      "auto_re_enroll": true,
      "re_enrollment_period": 14
    }
  ]
}

Update a program

PATCH /api/author/programs/:id
PUT /api/author/programs/:id

Response Codes

  • 200 OK

Parameters

  • program UpdateProgramRequest Required

    Body parameter. A {API::UpdateProgramRequest} containing the fields to be updated.

Example Request

{
  "program": "{API::UpdateProgramRequest}"
}
curl \
  -X PATCH \
  -H "Authorization: Bearer $TOKEN" \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -d '{"program":"{API::UpdateProgramRequest}"}' \
  http://<bridge>/api/author/programs/:id
    

Example Response

{
  "meta": {},
  "programs": [
    {
      "id": "1",
      "title": "My Test Program",
      "description": "My Test Program Description",
      "course_count": 3,
      "item_count": 4,
      "publishable": true,
      "is_published": true,
      "has_unpublished_changes": false,
      "step_notifications": true,
      "item_count": 3,
      "unfinished_learners_count": 1,
      "external_id": null,
      "has_certificate": false,
      "enrollment_counts": {
        "all": 4,
        "overdue": 0,
        "not_finished": 2,
        "finished": 2
      },
      "sub_account": {
        "id": 1,
        "name": "Acme, Co",
        "sub_accounts_exist": true,
        "is_root": true,
        "not_current": false,
        "tac_type": "domestic",
        "tac_custom_body_markup": null,
        "tac_updated_at": "2018-02-28T17:55:41.463Z"
      },
      "items": [
        {
          "id": "4",
          "item_type": "CourseTemplate",
          "title": "test program final course",
          "description": null,
          "default_days_until_due": 7,
          "default_due_on_date": null,
          "editable": true,
          "estimated_time": 0,
          "is_published": true,
          "passing_threshold": 80,
          "sessions_count": 0,
          "max_quiz_attempts": null,
          "continuing_education_credits": null,
          "default_approver": null,
          "requires_approval": false,
          "requires_evidence": false,
          "icon": null
        }
      ],
      "course_templates": [
        {
          "id": "4",
          "estimated_time": 0,
          "passing_threshold": 80,
          "max_quiz_attempts": null,
          "continuing_education_credits": null,
          "default_days_until_due": 7,
          "title": "test program final course",
          "description": null,
          "is_published": true,
          "published_at": "2017-12-07T10:29:09.247-07:00",
          "has_certificate": false,
          "course_type": "bridge",
          "external_id": null
        }
      ],
      "graphic": {
        "gradient": 3,
        "image": null
      },
      "is_non_linear": false,
      "estimated_time": 1,
      "open_enrollment": false,
      "uuid": "2d3a2312",
      "enroll_url": "http://acme.bridgeapp.com/learner/programs/2d3a2312/enroll",
      "has_shared_content": false,
      "is_shared": false,
      "due_date_type": "relative",
      "default_due_on_date": null,
      "default_days_until_due": 14,
      "expires": true,
      "default_days_until_expiration": null,
      "auto_re_enroll": true,
      "re_enrollment_period": 14
    }
  ]
}

Clone a program

POST /api/author/programs/:id/clone

Response Codes

  • 200 OK
  • 401 Unauthorized
  • 403 Forbidden

Parameters

  • id Integer Required

    Path parameter. Program id.

Example Response

{
  "meta": {},
  "programs": [
    {
      "id": "1",
      "title": "My Test Program",
      "description": "My Test Program Description",
      "course_count": 3,
      "item_count": 4,
      "publishable": true,
      "is_published": true,
      "has_unpublished_changes": false,
      "step_notifications": true,
      "item_count": 3,
      "unfinished_learners_count": 1,
      "external_id": null,
      "has_certificate": false,
      "enrollment_counts": {
        "all": 4,
        "overdue": 0,
        "not_finished": 2,
        "finished": 2
      },
      "sub_account": {
        "id": 1,
        "name": "Acme, Co",
        "sub_accounts_exist": true,
        "is_root": true,
        "not_current": false,
        "tac_type": "domestic",
        "tac_custom_body_markup": null,
        "tac_updated_at": "2018-02-28T17:55:41.463Z"
      },
      "items": [
        {
          "id": "4",
          "item_type": "CourseTemplate",
          "title": "test program final course",
          "description": null,
          "default_days_until_due": 7,
          "default_due_on_date": null,
          "editable": true,
          "estimated_time": 0,
          "is_published": true,
          "passing_threshold": 80,
          "sessions_count": 0,
          "max_quiz_attempts": null,
          "continuing_education_credits": null,
          "default_approver": null,
          "requires_approval": false,
          "requires_evidence": false,
          "blocks_progress": false,
          "icon": null
        }
      ],
      "course_templates": [
        {
          "id": "4",
          "estimated_time": 0,
          "passing_threshold": 80,
          "max_quiz_attempts": null,
          "continuing_education_credits": null,
          "default_days_until_due": 7,
          "title": "test program final course",
          "description": null,
          "is_published": true,
          "published_at": "2017-12-07T10:29:09.247-07:00",
          "has_certificate": false,
          "course_type": "bridge",
          "external_id": null
        }
      ],
      "graphic": {
        "gradient": 3,
        "image": null
      },
      "is_non_linear": false,
      "estimated_time": 1,
      "open_enrollment": false,
      "uuid": "2d3a2312",
      "enroll_url": "http://acme.bridgeapp.com/learner/programs/2d3a2312/enroll",
      "has_shared_content": false,
      "is_shared": false,
      "due_date_type": "relative",
      "default_due_on_date": null,
      "default_days_until_due": 14,
      "expires": true,
      "default_days_until_expiration": null,
      "auto_re_enroll": true,
      "re_enrollment_period": 14
    }
  ]
}

Archive a program

PUT /api/author/programs/:id/archive

Response Codes

  • 200 OK
  • 401 Unauthorized
  • 403 Forbidden
  • 422 Unprocessable Entity

Parameters

  • id Integer Required

    Path parameter. Program id.

Unarchive a program

PUT /api/author/programs/:id/unarchive

Response codes

  • 200 OK On successful un-archive
  • 422 Unprocessable Entity On unsuccessful un-archive

Parameters

  • id Integer Required

    Path parameter. Program id.

Author - Roles API

Manage user roles by issuing and revoking tokens.

Fetch All Roles

GET /api/author/roles

This endpoint returns list of current roles

Response codes

  • 200 OK
  • 401 Unauthorized

Parameters

  • excludes[] String [ custom ]

    Query parameter. Excludes described roles from results.

  • include_deprecated String

    Query parameter. Includes deprecated roles in results.

Example Response

{
  "roles": [
    {
      "id": "author",
      "name": "Author",
      "permissions": null
    },
    {
      "id": "manager",
      "name": "Manager",
      "permissions": null
    },
    {
      "id": "support",
      "name": "Support",
      "permissions": [
        "sub_account_view",
        "sub_account_create",
        "sub_account_update",
        "sub_account_destroy",
        "account_self_view",
        "account_self_update",
        "dashboard_view"
      ],
      "is_computed": true
    }
  ]
}

Fetch a Role

GET /api/author/roles/:id

This endpoint returns about the given roleId

Response codes

  • 200 OK
  • 401 Unauthorized

Example Response

{
  "roles": [
    {
      "id": "support",
      "name": "Support",
      "permissions": [
        "sub_account_view",
        "sub_account_create",
        "sub_account_update",
        "sub_account_destroy",
        "account_self_view",
        "account_self_update",
        "dashboard_view"
      ],
      "is_computed": true
    }
  ]
}

Create a Role

POST /api/author/roles

This endpoint creates a role

Response codes

  • 200 OK
  • 401 Unauthorized

Parameters

  • name String Required

    Body parameter. Name of the new role.

  • basis_role_id String Required

    Body parameter. ID of the role to base the new role on, copying its assigned permissions.

  • shared Boolean

    Body parameter. Indicates whether the new role should be available in subaccounts. Defaults to false.

Example Request

{
  "name": "tester",
  "basis_role_id": "admin",
  "shared": false
}
curl \
  -X POST \
  -H "Authorization: Bearer $TOKEN" \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -d '{"name":"tester","basis_role_id":"admin","shared":false}' \
  http://<bridge>/api/author/roles
    

Example Response

{
  "roles": [
    {
      "id": "72c2c9d5-11a4-4093-857f-7c5dc3b0d8cb",
      "name": "tester",
      "permissions": [
        "role_view",
        "user_view",
        "user_create",
        "user_update",
        "user_destroy",
        "user_self_update",
        "user_uid_update",
        "group_create",
        "group_update",
        "group_view",
        "group_destroy",
        "membership_create",
        "membership_destroy",
        "group_enrollment_create",
        "live_course_group_enrollment_create",
        "program_group_enrollment_create"
      ],
      "is_computed": false
    }
  ]
}

Delete The Role

DELETE /api/author/roles/:id

This endpoint deletes a role

Response codes

  • 204 No Content
  • 401 Unauthorized

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

Author - Sub Accounts API

Fetch subaccounts

GET /api/author/sub_accounts

No documentation available yet.

Author - Survey API

Fetch survey distribution

GET /api/author/surveys/:survey_id/distributions

No documentation available yet.

Fetch (show) survey distribution

GET /api/author/survey_distributions/:id

No documentation available yet.

Create survey distribution

POST /api/author/surveys/:survey_id/distributions

No documentation available yet.

Delete survey distribution

DELETE /api/author/survey_distributions/:id

No documentation available yet.

Author - Survey Group Results API

Fetch survey results for groups

GET /api/author/surveys/:survey_id/distributions/:distribution_id/group_results

No documentation available yet.

Author - Survey Questions API

Fetch Survey Questions

GET /api/author/surveys/:survey_id/questions

No documentation available yet.

Create Survey Questions

POST /api/author/surveys/:survey_id/questions

No documentation available yet.

Update Survey Questions

PATCH /api/author/survey_questions/:id
PUT /api/author/survey_questions/:id

No documentation available yet.

Delete Survey Questions

DELETE /api/author/survey_questions/:id

No documentation available yet.

Author - Surveys API

Object Synopses

LinkObject

  • author Integer

    The author id of the survey

SurveyObject

  • id Integer

    The survey id

  • title String

    The survey title

  • anonymous Boolean

    The survey type

  • publish_results Boolean

    Shows results

  • distribution_count Integer

    The distribution count of the survey

  • is_locked Boolean

    If the survey is locked

  • links LinkObject

    Links to other entities

Index

GET /api/author/surveys

Response Codes

  • 200 OK
  • 401 Unauthorized

Parameters

  • sort String [ title, due_date, newest ]

    Query parameter.

  • filter String [ unpublished, recently_closed ]

    Query parameter.

Example Response

{
  "meta": {},
  "surveys": [
    "API::SurveyObject"
  ]
}

Show

GET /api/author/surveys/:id

Response Codes

  • 304 Not Modified

Parameters

  • survey_id Integer Required

    Path parameter. Survey Id

Example Response

{
  "meta": {},
  "surveys": [
    "API::SurveyObject"
  ]
}

Create

POST /api/author/surveys

Response Codes

  • 201 Created

Parameters

Example Request

{
  "surveys": [
    "API::SurveyObject"
  ]
}
curl \
  -X POST \
  -H "Authorization: Bearer $TOKEN" \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -d '{"surveys":["API::SurveyObject"]}' \
  http://<bridge>/api/author/surveys
    

Example Response

{
  "meta": {},
  "surveys": [
    "API::SurveyObject"
  ]
}

Update

PATCH /api/author/surveys/:id
PUT /api/author/surveys/:id

Response Codes

  • 200 OK
  • 400 Bad Request

Parameters

  • survey_id Integer Required

    Path parameter. Survey Id

  • survey String Required

    Body parameter.

Example Request

{
   "survey": "API::SurveyObject"
}
curl \
  -X PATCH \
  -H "Authorization: Bearer $TOKEN" \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -d '{"survey":"API::SurveyObject"}' \
  http://<bridge>/api/author/surveys/:id
    

Example Response

{
  "meta": {},
  "surveys": [
    "API::SurveyObject"
  ]
}

Destroy

DELETE /api/author/surveys/:id

Response Codes

  • 204 No Content

Parameters

  • survey_id Integer Required

    Path parameter. Survey Id

Clone

POST /api/author/surveys/:id/clone

Response Codes

  • 200 OK
  • 400 Bad Request

Parameters

  • survey_id Integer Required

    Path parameter. Survey Id

Example Response

{
  "meta": {},
  "surveys": [
    "API::SurveyObject"
  ]
}

Author - Taggable Items API

Search for items that are able to be tagged with the given tag that don't already have it.

GET /api/author/tags/:tag_id/taggable_items

Returns objects eligible to have the given tag applied to them and match the given search term.

Example Request

{
  "tag_id": 1,
  "search": "Brand"
}
curl \
  -X GET \
  -H "Authorization: Bearer $TOKEN" \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -d '{"tag_id":1,"search":"Brand"}' \
  http://<bridge>/api/author/tags/:tag_id/taggable_items
    

Example Response

{
  "taggable_items": [
    {"id":"231","type":"CourseTemplate","title":"Introduction to Brand Marketing"},
    {"id":"14","type":"CourseTemplate","title":"Building a Brand"}
  ]
}

Author - Tagged Items API

List all taggings for a given tag

GET /api/author/tags/:tag_id/taggings

Returns all objects associated with a given tag

Example Request

{
  "tag_id": 1
}
curl \
  -X GET \
  -H "Authorization: Bearer $TOKEN" \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -d '{"tag_id":1}' \
  http://<bridge>/api/author/tags/:tag_id/taggings
    

Example Response

{
  "taggings": [
    {"id":"1","tag_id":"1","taggable_id":"1","taggable_type":"CourseTemplate","data":{"title":"Course 1","tags":["1","one","Course"]}},
    {"id":"16","tag_id":"1","taggable_id":"2","taggable_type":"CourseTemplate","data":{"title":"Course 2","tags":["2","two","Course"]}},
    {"id":"21","tag_id":"1","taggable_id":"3","taggable_type":"CourseTemplate","data":{"title":"Course 3","tags":["Course","three","3"]}}
  ]
}

Tag an item with the given tag

POST /api/author/tags/:tag_id/taggings

Returns the resulting tagging.

Example Request

{
  "tag_id": 1,
  "context_id": 42,
  "context_type": "course_template"
}
curl \
  -X POST \
  -H "Authorization: Bearer $TOKEN" \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -d '{"tag_id":1,"context_id":42,"context_type":"course_template"}' \
  http://<bridge>/api/author/tags/:tag_id/taggings
    

Example Response

{
  "taggings": [
    {"id":"1","tag_id":"1","taggable_id":"42","taggable_type":"CourseTemplate","data":{"title":"Course 1","tags":["1","one","Course"]}}
  ]
}

Remove the given Tag from an item.

DELETE /api/author/tags/:tag_id/taggings

Returns nothing.

Example Request

{
  "tag_id": 1,
  "context_id": 42,
  "context_type": "course_template"
}
curl \
  -X DELETE \
  -H "Authorization: Bearer $TOKEN" \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -d '{"tag_id":1,"context_id":42,"context_type":"course_template"}' \
  http://<bridge>/api/author/tags/:tag_id/taggings
    

Author - Tags API

Object Synopses

TagCompletions

  • tags String[]

    Array of possible tag completions.

Tagging

  • name String Required

    The name of a tag.

  • context_id Integer Required

    The ID of the object the tag is for.

  • context_type String Required

    The type of the object the tag is for. May only be set to ‘course_template’ at this time.

Taggings

Fetch list of tags

GET /api/author/tags

No documentation available yet.

Fetch specific tag

GET /api/author/tags/:id

No documentation available yet.

Update tags

PATCH /api/author/tags/:id
PUT /api/author/tags/:id

No documentation available yet.

Convert specific tag to a cateogry

POST /api/author/tags/:id/convert

No documentation available yet.

Delete tag

DELETE /api/author/tags/:id

No documentation available yet.

Create tag

POST /api/author/tags

No documentation available yet.

List possible autocomplete values for a search term.

GET /api/author/taggings

Locates possible tag names given a search term and an object that can be tagged. Any tag names that have already been associated with the object are omitted from the results. Returns an Author - Tags::TagCompletions object.

Parameters

  • term String Required

    The term to use to search possible tag names.

  • context_id Integer Required

    The ID of the object the tag is for.

  • context_type String [ course_template ] Required

    The type of the object the tag is for.

Example Request

{
  "term": "tec",
  "context_id": 3,
  "context_type": "course_template"
}
curl \
  -X GET \
  -H "Authorization: Bearer $TOKEN" \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -d '{"term":"tec","context_id":3,"context_type":"course_template"}' \
  http://<bridge>/api/author/taggings
    

Example Response

{
  "tags": [
    "technical training",
    "tectonic measurement",
    "technical certification"
  ]
}

Possible Errors:

Your request may be rejected with an HTTP status code and an error message from the following set:

Response Code Details
400 Bad Request "invalid_context_type"

An unsupported context type was passed.

Tag an object

POST /api/author/taggings

Parameters

  • taggings Taggings Required

    An object representing a set of tags to add.

Possible Errors:

Your request may be rejected with an HTTP status code and an error message from the following set:

Response Code Details
400 Bad Request "invalid_context_type"

An unsupported context type was passed.

This endpoint returns HTTP 204: No Content on success.

Author - Users API

Object Synopses

UserResponse

  • id Integer

    User id

  • uid String

    Unique login id

  • first_name String

    First name of user

  • last_name String

    Last name of user

  • email String

    Email of user

  • bio String

    Short bio (biography) of user

  • locale String

    The user’s language code

  • roles String[]

    Array of roles

  • name string

    Full name of user

  • avatar_url String

    URL to avatar image

  • deleted_at DateTime or null

    Date and time of deletion

  • updated_at DateTime

    Date and time of last update

  • unsubscribed Boolean

    Whether the user has unsubscribed from Bridge emails

  • hire_date Date

    Date that user was hired

  • job_title string

    Job title of user

  • links Object

    Provides links to additional detail in response object

  • meta Object

    Map of additional values

  • next_due_date DateTime or null

    Returned only if includes[]=course_summary was set in query string.

  • completed_courses_count Integer

    Returned only if includes[]=course_summary was set in query string.

  • manager_name String

    Returned only if includes[]=manager was set in query string.

  • manager_id Integer

    Returned only if includes[]=manager was set in query string.

  • current_session Object

    Returned only if includes[]=current_session was set in query string.

CustomFieldValueRequest

  • id String

    The custom field value to update. An id is required to update a currently existing value. If no id is included, a new custom field value object will be created, if possible.

  • custom_field_id String

    The custom field to which this value is attached.

  • value String

    The value to be displayed in the custom field.

Fetch all users

GET /api/author/users

This endpoint returns a list of extant (active, not deleted) users

Response Codes

  • 200 OK
  • 304 Not Modified

Parameters

  • sort String [ name, complete_courses_count, next_due_date ]

    Query parameter causes list to be returned in ascending order. Values may be prepended with - for descending order.

  • search String

    Finds users with matching values in first name, last name, uid, or email.

  • includes[] String [ course_summary, custom_fields ]

    Indicates additional information to be returned. Course_summary includes the next due date and completed courses count in the response, and custom_fields includes linked custom field values and custom fields in the response.

  • only_deleted Boolean

    Filters list to only include deleted users.

  • with_deleted Boolean

    Filters list to also include deleted users.

  • role String [ account_admin, admin, author ]

    Filters list to only include users with having role.

  • updated_after DateTime

    Filters list to only include users updated after the given RFC 3339 compliant timestamp.

  • created_after DateTime

    Filters list to only include users created after the given RFC 3339 compliant timestamp.

  • deleted_after DateTime

    Filters list to only include users deleted after the given RFC 3339 compliant timestamp.

  • updated_before DateTime

    Filters list to only include users updated before the given RFC 3339 compliant timestamp.

  • created_before DateTime

    Filters list to only include users created before the given RFC 3339 compliant timestamp.

  • deleted_before DateTime

    Filters list to only include users deleted before the given RFC 3339 compliant timestamp.

  • only_deleted Boolean

    Filters list to only include deleted users.

  • with_deleted Boolean

    Filters list to also include deleted users.

  • only_managers Boolean

    Filters list to only include users who are managers.

Example Response

{
  "meta": {
    "next": "http://bridge.bridgeapp.com/api/author/users?after=eyJ0eXAiOiJKV1QiLCJhSDiQQ"
  },
  "linked": {
    "custom_fields": [
      {
        "id": "1",
        "name": "Title"
      }
    ],
    "custom_field_values": [
      {
        "id": "2",
        "value": "Senator",
        "links": {
          "custom_field": {
            "id": "1",
            "type": "custom_fields"
          }
        }
      }
    ]
  },
  "users": [
    "{API::UserResponse}"
  ]
}

Fetch an existing user

GET /api/author/users/:id

This endpoint returns a user listing

Response Codes

  • 200 OK if the request was successful.

Parameters

  • id Integer Required

    The ID of an existing user. Alternatively, a user’s uid, prefixed with “uid:” or a user’s HRIS ID, prefixed with “hris:”.

  • includes[] String [ course_summary, custom_fields ]

    Indicates additional information to be returned. Course_summary includes the next due date and completed courses count in the response, and custom_fields includes linked custom field values and custom fields in the response.

Example Response

{
  "meta": {},
  "linked": {
    "custom_fields": [
      {
        "id": "1",
        "name": "Title"
      }
    ],
    "custom_field_values": [
      {
        "id": "2",
        "value": "Senator",
        "links": {
          "custom_field": {
            "id": "1",
            "type": "custom_fields"
          }
        }
      }
    ]
  },
  "users": [
    "{API::UserResponse}"
  ]
}

Update a user

PATCH /api/author/users/:id
PUT /api/author/users/:id

Response Codes

  • 200 OK if user was updated
  • 404 Not Found if user no longer exists

Parameters

  • id Integer Required

    The unique Bridge id of the user to update. Alternatively, a user’s uid, prefixed with “uid:”.

  • includes[] String [ course_summary, custom_fields ]

    Indicates additional information to be returned. Course_summary includes the next due date and completed courses count in the response, and custom_fields includes linked custom field values and custom fields in the response.

  • user[uid] String

    The ID/login for the user

  • user[first_name] String

    The user’s first name

  • user[last_name] String

    The user’s last name

  • user[bio] String

    The user’s bio

  • user[manager_id] String

    The user ID of the user’s manager. Alternatively, the manager’s uid, prefixed with “uid:”.

  • user[hire_date] String

    The user’s hire date, formatted YYYY-MM-DD

  • user[job_title] String

    The user’s job title

  • user[custom_field_values] CustomFieldValueRequest[]

    Values for custom fields.

Example Request

{
  "user":
  {
    "email": "hrh.leia.organa@alderaan-gov.com",
    "uid": "lorgana",
    "first_name": "Leia",
    "last_name": "Organa",
    "bio": "Loves pepperoni pizza with jalapeños and long walks on the beach.",
    "locale": "en",
    "manager_id": "uid:mmothma",
    "hire_date": "2015-01-31",
    "job_title": "Software Engineer",
    "custom_field_values": [
      "{API::CustomFieldValueRequest}"
    ]
  }
}
curl \
  -X PATCH \
  -H "Authorization: Bearer $TOKEN" \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -d '{"user":{"email":"hrh.leia.organa@alderaan-gov.com","uid":"lorgana","first_name":"Leia","last_name":"Organa","bio":"Loves pepperoni pizza with jalapeños and long walks on the beach.","locale":"en","manager_id":"uid:mmothma","hire_date":"2015-01-31","job_title":"Software Engineer","custom_field_values":["{API::CustomFieldValueRequest}"]}}' \
  http://<bridge>/api/author/users/:id
    

Example Response

{
  "meta": {},
  "users": [
    "{API::UserResponse}"
  ]
}

Restore a user

POST /api/author/users/:id/restore

Response Codes

  • 200 OK if user was restored
  • 404 Not Found if user is not deleted
  • 422 Unprocessable Entity if user could not be restored

Parameters

  • id Integer Required

    The unique Bridge id of the user to restore. Alternatively, a user’s uid, prefixed with “uid:”.

  • includes[] String [ course_summary, custom_fields ]

    Indicates additional information to be returned. Course_summary includes the next due date and completed courses count in the response, and custom_fields includes linked custom field values and custom fields in the response.

Example Response

{
  "meta": {},
  "linked": {
    "custom_fields": [
      {
        "id": "1",
        "name": "Title"
      }
    ],
    "custom_field_values": [
      {
        "id": "2",
        "value": "Princess",
        "links": {
          "custom_field": {
            "id": "1",
            "type": "custom_fields"
          }
        }
      }
    ]
  },
  "users": [
    "{API::UserResponse}"
  ]
}

Downloads API

Controls the creation, polling, and retrieval of user-requested downloads.

Object Synopses

DownloadRequest

  • download_type String

    Required. The type of download

  • info Object

    Optional. Parameters for the download. Currently unused.

DownloadResponse

  • id String

    Unique identifier of the download

  • download_type String

    The type of download

  • user_id String

    The unique identifier of the originating user

  • state String

    The state of the download

  • url String

    The relative URL for the download’s file. Will be null if the fils is in any state but “done”

Show a download's details

GET /api/downloads/:id

Response Codes

  • 200 OK if resource is found
  • 403 Forbidden if the user isn’t the user who created the download or doesn’t have permissions to view the type of the download
  • 404 Not Found if the download doesn’t exist

Example Response

{
  "download": "{API::DownloadResponse}"
}

Create a new download

POST /api/downloads

Response Codes

  • 201 Created if resource is created
  • 403 Forbidden if the user doesn’t have permissions to create the requested download type
  • 422 Unprocessable Entity if resource is not created

Parameters

  • download DownloadRequest Required

    Body parameter. A hash of download parameters.

Example Request

{
  "download": "{API::DownloadRequest}"
}
curl \
  -X POST \
  -H "Authorization: Bearer $TOKEN" \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -d '{"download":"{API::DownloadRequest}"}' \
  http://<bridge>/api/downloads
    

Example Response

{
  "download": "{API::DownloadResponse}"
}

Get the actual file associated with a download

GET /api/downloads/:id/file

Response Codes

  • 302 Found if resource exists
  • 403 Forbidden if the user isn’t the user who created the download or doesn’t have permissions to view the type of the download
  • 404 Not Found if the download doesn’t exist or it hasn’t finished processing

Feature Flags API

This endpoint lists the current feature flags and their states on this account.

List feature flags

GET /api/feature_flags

Response Codes

  • 200 OK
  • 304 Not Modified

Example Request

/api/feature_flags

Example Response

{
  "feature_flags": {
    "my_great_flag":true
  }
}

Learner - Approvals API

Object Synopses

LearnerApprovalController

  • id Integer

    The approval id

  • enrollable_id Integer

    The enrollable id

  • enrollable_type String

    Enrollment type of learner in this approval.

  • state String

    state of approval

Fetch an approval

GET /api/learner/approvals/:id

Response Codes

  • 200 OK
  • 403 Forbidden
  • 404 Not Found

Parameters

  • id Integer Required

    Id of the approval

Example Response

{
  "approvals": [
    "{API::LearnerApprovalController}"
  ]
}

Update an approval

PATCH /api/learner/approvals/:id
PUT /api/learner/approvals/:id

Response Codes

  • 200 OK
  • 400 Bad Request
  • 403 Forbidden
  • 404 Not Found

Parameters

  • id Integer Required

    Id of the approval

  • comment String Required

    Comment to be added to the approval

Example Request

{
  "comment": "Look at this again?"
}
curl \
  -X PATCH \
  -H "Authorization: Bearer $TOKEN" \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -d '{"comment":"Look at this again?"}' \
  http://<bridge>/api/learner/approvals/:id
    

Example Response

{
  "approvals": [
    "{API::LearnerApprovalController}"
  ]
}

Learner - ActivityEnrollment API

Handle enrollments for a user and an activity (learnable) identified by the activity’s type and the enrollment’s id.

Learner - Approval Events API

Retrieve a list of approval events for the specified approval

GET /api/learner/approvals/:approval_id/approval_events

Ordered to return newest events first

Response Codes

  • 200 OK
  • 403 Forbidden
  • 404 Not Found

Parameters

  • approval_id Integer Required

    Id of the approval to get events for

Example Response

{
  "approval_events": [
    {
      "event_type": "comment_added",
      "data": {
        "comment": "Please Approve"
      }
    }
  ]
}

Learner - Calendar Live Course Sessions API

List calendar live course sessions

GET /api/learner/calendar_live_course_sessions

No documentation available yet.

Learner - Categories API

Object Synopses

Category

  • id Integer

    Category id

  • name String

    The name of the category

  • relevance String

    Relevance level for category

List Relevant Categories

GET /api/learner/categories

Response Codes

  • 200 OK
  • 304 Not Modified

Example Response

{
  "meta": {},
  "categories": [
    {
      "id": "1",
      "name": "Category Name",
      "relevance": "recommended"
    }
  ]
}

Learner - Checkpoint API

Fetch Checkpoints

GET /api/learner/tasks/:id

Response Codes

Mark Checkpoint As Complete

POST /api/learner/tasks/:id/complete

Response Codes

Learner - Checkpoint Approval API

Request approval for a task

POST /api/learner/tasks/:task_id/approvals

Response Codes

  • 204 No Content
  • 404 Not Found
  • 422 Unprocessable Entity

Parameters

  • task_id Integer Required

    Id of the task to request the approval for

  • comment String

    Comment to add to the approval

Example Request

{
    "task_id": 1,
    "comment": "Please approve this."
}
curl \
  -X POST \
  -H "Authorization: Bearer $TOKEN" \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -d '{"task_id":1,"comment":"Please approve this."}' \
  http://<bridge>/api/learner/tasks/:task_id/approvals
    

Learner - Checkpoint Attachments API

Delete checkpoint attachment

DELETE /api/learner/tasks/:task_id/learners/:learner_id/attachments/:id

No documentation available yet.

Download checkpoint attachment

GET /api/learner/tasks/:task_id/learners/:learner_id/attachments/download

Redirect to the signed S3 url based on the file location

Learner - Courses API

WARNING: The index API has been deprecated in favor of the Learner - Learning Items controller.

This API controls learner interaction with courses and live courses.

Object Synopses

LearnerCourseResponse

  • id Integer

    The course id

  • is_enrolled Boolean

    Enrollment status of learner in this course.

  • progress Integer

    Current slide number.

  • slide_total Integer

    Total number of slides.

  • time_remaining Integer

    Estimated time to finish course in minutes.

  • location String

    Location of live training. Null for all other types of courses.

  • sessions_count Integer

    Number of future sessions offered for live training course. Null for other types of courses

  • next_session_start_at DateTime

    Date and time of next scheduled live training session. Null for other course types.

  • deleted_at DateTime

    Date and time at which course was deleted. Null if not deleted.

  • program_title String

    Program through which learner is enrolled in course. Null if learner is not enrolled through a program.

  • index_of_program Integer

    Position of this course within the program. Null if not enrolled though a program.

  • program_course_count Integer

    Total number of courses in program. Null if not enrolled through a program.

  • open_book Boolean

    Indicates if learners can navigate the course during quizzes.

  • completed_at DateTime

    Date and time when course was completed. Null if not completed.

  • end_at DateTime

    Date and time by which this course is due. Null if no due date was assigned.

  • estimated_time Integer

    Estimated length of course in minutes.

  • passing_threshold Integer

    Required score (out of 100) to pass.

  • required Boolean

    Indicates if course is required or optional.

  • score Integer

    Learners score (out of 100) in this course. Null for live trainings.

  • state String

    State of enrollment in course.

  • title String

    Course title.

  • has_certificate Boolean

    Indicates if course issues certificate when successfully completed.

  • course_type String

    Indicates course type. May be native bridge, SCORM, or live training.

  • attachments_count Integer

    Indicates the number of attachments the course has.

List courses

GET /api/learner/courses

Lists all courses in which the current learner is enrolled.

Response Codes

  • 200 OK

Example Response

{
  "courses": [
    "{API::LearnerCourseResponse}"
  ],
  "meta": {}
}

Course preview

GET /api/learner/courses/:id/preview

Returns course information for previewing

Response Codes

  • 200 OK

Parameters

  • id Integer Required

    Path parameter. Course id.

Example Response

{
  "courses": [
    "{API::LearnerCourseResponse}"
  ],
  "meta": {}
}

Show course

GET /api/learner/courses/:id

Response Codes

  • 200 OK

Parameters

  • id Integer Required

    Path parameter. A course id.

Example Response

{
  "courses": [
    "{API::LearnerCourseResponse}"
  ],
  "meta": {}
}

Complete Course

POST /api/learner/courses/:id/complete

A POST action for completing current_enrollment’s current attempt.

Response Codes

  • 200 OK
  • 401 Unauthorized

Parameters

  • id Integer Required

    Path parameter. Enrollment id.

Example Response

{
  "linked": {},
  "courses": [
    "{API::LearnerCourseResponse}"
  ],
  "meta": {}
}

Leave a Course

DELETE /api/learner/courses/:id

Learner may only leave optional courses.

Response Codes

  • 204 No Content

Parameters

  • id Integer Required

    Path parameter. Enrollment id.

Launch Url

GET|POST /api/learner/courses/:course_id/launch_url

Used to get the url to launch an external course.

Response Codes

  • 200 OK

Parameters

  • id Integer Required

    Path parameter. Enrollment id.

Example Response

{
  "url": "http://rebellion.bridgeapp.com/api/learner/courses/83/slides/current"
}

Mobile Scorm Launch Url

GET /api/learner/courses/:course_id/mobile_scorm_launch_url

Used to redirect mobile app directly to scorm course

Response Codes

  • 302 Found
  • 400 Bad Request

Parameters

  • id Integer Required

    Path parameter. Enrollment id.

External course info

GET /api/learner/courses/:id/external_info

Returns with all the external information for the course.

Response Codes

  • 400 Bad Request
  • 404 Not Found

Parameters

  • id Integer Required

    Path parameter. Enrollment id.

Learner - Credits API

List all credits for the current learner

GET /api/learner/credits

Response Codes

  • 200 OK
  • 304 Not Modified

Parameters

  • search String

    Search credits based on passed search term

  • scope String

    Accepted values: library. Filters the returned list of credits by a given scope

Example Response

{
  "meta": {},
  "credits": [
    {
      "id": "2",
      "name": "Space"
    }
  ]
}

Learner - Enrollment API

Enroll user for the course.

Enroll user for an open enrollment enabled course

Create enrollment

POST /api/learner/courses/:course_id/enrollment

This endpoint enrolls the user to a given course

Response codes

  • 201 Created
  • 400 Bad Request

Fetch list of enrollments

GET /api/learner/courses/:course_id/enrollment

This endpoint lists enrollments for a given course

Response codes

  • 200 OK
  • 404 Not Found

Create an enrollment

POST /api/learner/open_courses/:open_course_id/enrollment

This endpoint enrolls the user to a given course with open enrollment or manual re-enroll enabled.

Response codes

  • 201 Created
  • 400 Bad Request

Retrieve an enrollment

GET /api/learner/open_courses/:open_course_id/enrollment

This endpoint returns the enrollments for the user for the given course UUID.

Learner - Enrollment Configurations API

Fetch specific enrollment configuration

GET /api/learner/courses/:course_id/enrollment_config

No documentation available yet.

Update enrollment configuration

PATCH /api/learner/courses/:course_id/enrollment_config
PUT /api/learner/courses/:course_id/enrollment_config

No documentation available yet.

Learner - Groups API

This API handles group requests for a learner.

Find group memberships for the current user

GET /api/learner/groups/current

Response Codes

  • 200 OK

Example Response

{
  "meta": {},
  "groups": [
    {
      "id": "1"
    }
  ]
}

Learner - Learning Items API

Deprecated: Use Bridge Analytics (or the Learner transcript) instead.

List learning items

GET /api/learner/learning_items

Deprecated: Use Bridge Analytics (or the Learner transcript) instead.

Show learning item

GET /api/learner/learning_items/:id

Deprecated: Use Bridge Analytics (or the Learner transcript) instead.

Delete optional learning items

DELETE /api/learner/learning_items/:id

Learner may only leave optional courses.

Response Codes

  • 204 No Content

Parameters

  • id Integer Required

    Path parameter. A learning item id.

Learner - Library Items API

Object Synopses

LibraryItem

  • id Integer

    User id

  • item_type String

    The type of object in the library

  • item_id Integer

    The id of the object in the library

  • title String

    The title of the item

  • description String

    The description of the item

  • data Object

    Misc, schemaless data associated with the item

  • estimated_time Integer

    The time estimated to complete the item

  • features Array

    A list of features that the item has

  • tags Array

    A list of tags for the library item

  • matching_tags Array

    Tags matching the search query for the item

  • cover_slide_data CoverSlideData

    Cover slide information for the item

  • created_at DateTime or null

    Date and time created

  • updated_at DateTime or null

    Date and time updated

  • is_enrolled Boolean

    Whether the user is enrolled in the item

  • progress Integer

    The percentage of progress completed the item

  • completed_at DateTime or null

    The date the item was completed

  • state String or null

    The state that the item is in

CoverSlideData

  • backgroundImageUrl String

    URL link to the image used for the cover slide

  • backgroundImageOpacity Float

    The opacity level of the image against the background

  • backgroundColor String

    The color to display behind the image

  • primaryColor String

    The primary color for buttons and UI

  • dark Boolean

    Show the cover slide image against a dark background

  • heading String

    The header statement for the cover slide

  • intro String

    The intro statement for the cover slide

List library items

GET /api/learner/library_items

Response Codes

  • 200 OK
  • 304 Not Modified

Parameters

  • sort String [ added, duration, title ]

    Query parameter. Applies a sort to the result list.

  • filters[] String [ content_type, duration, other ]

    Query parameter. This argument may occur multiple times.

  • search String

    Query parameter. Search item titles for a match with the given string.

  • ids Array

    Query parameter. Filter items by a list of IDs

  • tags String

    Query parameter. Filter items by a comma-separated list of tag IDs.

Example Response

{
  "meta": {},
  "library_items": [
    {
      "id": "1",
      "item_type": "CourseTemplate",
      "item_id": "1",
      "title": "Sales Training Course",
      "estimated_time": 20,
      "features": ["has_video", "has_images", "scorm"],
      "tags": ["sales", "training"],
      "matching_tags": ["sales"],
      "cover_slide_data": {
        "backgroundImageUrl": "http://example.com/the-image.jpeg",
        "backgroundImageOpacity": 0.7,
        "backgroundColor": "#071931",
        "dark": true,
        "heading": "Learn All About Midmarket Sales",
        "intro": "One of our most important segments",
        "primaryColor": "#3A9CFE"
      },
      "created_at": "2015-05-04T12:35:00.000-06:00",
      "updated_at": "2015-05-04T12:35:00.000-06:00",
      "is_enrolled": true,
      "progress": 20,
      "completed_at": "2015-05-04T12:35:00.000-06:00",
      "state": "completed"
    }
  ]
}

Show a specific Library Item

GET /api/learner/library_items/:id

Response Codes

  • 200 OK
  • 304 Not Modified
  • 404 Not Found

Parameters

  • id Integer Required

    The database id of the library item.

Example Response

{
  "library_item": {
    "id": 1,
    "API Change: id":  "id will be changing to a string after July 31, 2019",
    "item_type": "CourseTemplate",
    "item_id": "1",
    "title": "Sales Training Course",
    "description": "This is a sales training course",
    "data": {
      "has_certificate": null,
      "passing_threshold": 80,
      "uuid": "3ea2058f"
    },
    "estimated_time": 20,
    "features": ["has_images"],
    "cover_slide_data": {
      "backgroundImageUrl": "http://example.com/the-image.jpeg",
      "backgroundImageOpacity": 0.7,
      "backgroundColor": "#071931",
      "dark": true,
      "heading": "Learn All About Midmarket Sales",
      "intro": "One of our most important segments",
      "primaryColor": "#3A9CFE"
    },
    "created_at": "2015-05-04T12:35:00.000-06:00",
    "updated_at": "2015-05-04T12:35:00.000-06:00",
    "is_enrolled": true,
    "progress": 0.2,
    "completed_at": "2015-05-04T12:35:00.000-06:00",
    "state": "completed"
  }
}

Compact learning library response for mobile devices

GET /api/learner/library_items/mobile

This endpoint returns all library sections (all categories plus uncategorized section) along with the library items that they contain.

Response Codes

  • 200 OK
  • 304 Not Modified
  • 404 Not Found

Parameters

  • search String

    Query parameter. Search item titles and descriptions for a match with the given string.

  • sort String [ added, duration, title ]

    Query parameter. Applies a sort to the result list.

  • filters[] String [ content_type, duration, other ]

    Query parameter. This argument may occur multiple times.

  • limit Integer

    Query parameter. Limits the number of returned elements for every section. If not specified, the limit is 10

Example Response

{
  "result": [
    {
      "items_in_category": 1,
      "category": {
        "id": 21,
        "name": "Example category",
        "taggings_count": 0,
        "domain_id": 1,
        "sub_account_id": 1,
        "created_at": "2019-09-29T11:28:29.393-06:00",
        "updated_at": "2020-01-31T09:53:33.004-07:00",
        "deleted_at": null,
        "tag_type": "category",
        "image_url": null,
        "external_id": null,
        "content_provider_id": null,
        "locale": null,
        "_user_relevance": [
          0
        ]
      },
      "library_items": [
        {
          "id": "1",
          "item_type": "CourseTemplate",
          "item_id": "1",
          "title": "Sales Training Course",
          "estimated_time": 20,
          "features": ["has_video", "has_images", "scorm"],
          "tags": ["sales", "training"],
          "matching_tags": ["sales"],
          "cover_slide_data": {
            "backgroundImageUrl": "http://example.com/the-image.jpeg",
            "backgroundImageOpacity": 0.7,
            "backgroundColor": "#071931",
            "dark": true,
            "heading": "Learn All About Midmarket Sales",
            "intro": "One of our most important segments",
            "primaryColor": "#3A9CFE"
          },
          "created_at": "2015-05-04T12:35:00.000-06:00",
          "updated_at": "2015-05-04T12:35:00.000-06:00",
          "is_enrolled": true,
          "progress": 20,
          "completed_at": "2015-05-04T12:35:00.000-06:00",
          "state": "completed"
        }
      ]
    },
    {
      "items_in_category": 1,
      "category": null,
      "library_items": [
        {
          "id": "2",
          "item_type": "CourseTemplate",
          "item_id": "2",
          "title": "Uncategorized Sales Training Course",
          "estimated_time": 20,
          "features": ["has_video", "has_images", "scorm"],
          "tags": ["sales", "training"],
          "matching_tags": ["sales"],
          "cover_slide_data": {
            "backgroundImageUrl": "http://example.com/the-image.jpeg",
            "backgroundImageOpacity": 0.7,
            "backgroundColor": "#071931",
            "dark": true,
            "heading": "Learn All About Midmarket Sales",
            "intro": "One of our most important segments",
            "primaryColor": "#3A9CFE"
          },
          "created_at": "2015-05-04T12:35:00.000-06:00",
          "updated_at": "2015-05-04T12:35:00.000-06:00",
          "is_enrolled": true,
          "progress": 20,
          "completed_at": "2015-05-04T12:35:00.000-06:00",
          "state": "completed"
        }
      ]
    }
  ]
}

Learner - Link Item Launch Controller API

Get the launch URL and data for launching LTI Link Items

GET /api/learner/lti_link_item_launch

Response Codes

  • 200 OK
  • 404 Not Found

Parameters

  • lti_content_item_id String Required

    The id of the LTI Content Item to supply the config info

  • program_id String

    The id of the Program that contains the LTI Content Item

Example Response

{
  "lti_content_item_id": "1",
  "program_id": "2",
  "launch_url": "http://example.com/launch",
  "launch_data": {
    "context_id": "1673cd0f-f043-4d34-bfbc-c13fd5cce99a",
    "context_label": "bridge",
    "custom_field": "value",
    "launch_presentation_document_target": "iframe",
    "launch_presentation_return_url": "https://bridge.local.bridgeops.sh:3000/lti/content_item/1",
    "lis_person_contact_email_primary": "user@example.com",
    "lis_person_name_family": "Last",
    "lis_person_name_full": "First Last",
    "lis_person_name_given": "First",
    "lti_message_type": "basic-lti-launch-request",
    "lti_version": "LTI-1p2",
    "oauth_callback": "about:blank",
    "oauth_consumer_key": "key",
    "oauth_nonce": "534b94655fc5f8ebaa9c97344ea7b953",
    "oauth_signature": "7CgFfsQ14XFAJSM2o8GT6pg8C7w=",
    "oauth_signature_method": "HMAC-SHA1",
    "oauth_timestamp": "1490312905",
    "oauth_version": "1.0",
    "resource_link_description": "This is a Sample Tool Provider.",
    "resource_link_id": "8169f5e122e9dafafd1f02c9e15eb4ab",
    "roles": "learner",
    "tool_consumer_info_product_family_code": "Bridge",
    "tool_consumer_instance_guid": "bridge.local.bridgeops.sh:3000",
    "tool_consumer_instance_name": "Bridge",
    "tool_consumer_instance_url": "http://bridge.local.bridgeops.sh:3000",
    "user_id": "c74cff31-603b-4c01-832e-1810ee54bf91"
  }
}

Learner - Live Course Enrollments API

Enroll learner in a live course with open enrollment enabled

Create Enrollment

POST /api/learner/open_live_courses/:open_live_course_id/enrollment

This endpoint enrolls the current user in a live course specified by UUID (as opposed to standard ids). We use UUIDs here to prevent learners from guessing the enrollment URLs of other open live courses.

Response codes

  • 201 Created
  • 404 Not Found

Learner - Live Course Registrations API

This endpoint allows learners to register and unregister for live course sessions in live courses in which they are enrolled.

Register

POST /api/learner/live_course_sessions/:live_course_session_id/registration

If the user is already registered for a session, this will unregister them from it.

Response codes

  • 201 Created

Parameters

  • id Integer Required

    Path parameter. Live course session id.

Update

PATCH /api/learner/live_course_sessions/:live_course_session_id/registration
PUT /api/learner/live_course_sessions/:live_course_session_id/registration

Allows a user to modify certain aspects of their registration, such as marking attendance if self-attendance is allowed.

Response codes

  • 204 No Content
  • 400 Bad Request
  • 404 Not Found

Parameters

  • id Integer Required

    Path parameter. Live course session id.

  • attended Boolean

    May only be set to true to mark a user attended if the session allows self-attendance. A user may not mark themselves unattended. If the user is already marked attended, this will not update their existing attendance timestamp.

Unregister

DELETE /api/learner/live_course_sessions/:live_course_session_id/registration

Response codes

  • 200 OK

Parameters

  • id Integer Required

    Path parameter. Live course session id.

Learner - Live Course Session Waitlist API

This API allows the learner to create and destroy their own waitlist enrollment.

Create a new waitlist enrollment

POST /api/learner/live_course_sessions/:live_course_session_id/waitlist_enrollment

Response Codes

  • 201 No Content
  • 400 Bad Request

Parameters

  • live_course_session_id Integer Required

    Path parameter. Live course session id.

Delete a waitlist enroillment

DELETE /api/learner/live_course_sessions/:live_course_session_id/waitlist_enrollment

Response Codes

  • 204 No Content on successful deletion
  • 404 Not Found if live_course_session_id is invalid

Parameters

  • live_course_session_id Integer Required

    Path parameter. Live course id.

Learner - Live Course Sessions API

Object Synopses

SessionResponse

  • id Integer

    Live course session id

  • start_at DateTime or null

    Scheduled starting date and time

  • end_at DateTime or null

    Scheduled ending date and time

  • location String

    The physical location of the live course session

  • seats Integer

    Enrollment cap

  • seats_remaining Integer

    Number of available seats

  • is_open Boolean

    Whether the session is open for registration

  • is_registered Boolean

    Whether the user is registered for the session

  • parts_count Integer

    Number of parts in a multi-part session

  • parent_id Integer

    The id of the live course session part’s parent

  • concluded_at DateTime or null

    Date and time at which the live course session concluded

  • instuctors Array

    Objects representing the instuctors for this session.

List Live Course Sessions as a Learner

GET /api/learner/live_courses/:live_course_id/sessions

Response Codes

  • 200 OK
  • 404 Not Found

Example Response

{
  "sessions": [
    "{API::SessionResponse}"
  ]
}

Show a single live course session as a learner

GET /api/learner/live_courses/:live_course_id/sessions/:id

Response Codes

  • 200 OK
  • 404 Not Found

Example Response

{
  "sessions": [
    "{API::SessionResponse}"
  ]
}

Learner - Live Courses API

Fetch live course

GET /api/learner/live_courses/:id

No documentation available yet.

Learner - Lti Content Items API

This API controls learner interaction with lti content items

Object Synopses

LearnerLtiContentItemResponse

  • id Integer

    The lti content item id

  • title String

    The lti content item title

  • description String

    The lti content item description

Show Lti Content Item

GET /api/learner/lti/content_items/:id

Response Codes

  • 200 OK

argument [Required, Integer] id

Path parameter. An Lti Content Item id.

Example Response

{
  "lti_content_items": [
    "{API::LearnerLtiContentItemResponse}"
  ]
}

Complete Lti Content Item

POST /api/learner/lti/content_items/:id/complete

A POST action for completing the user’s enrollment in the Lti Content Item.

Response Codes

  • 204 No Content
  • 401 Unauthorized
  • 404 Not Found

Parameters

  • id Integer Required

    Path parameter. Lti Content Item Id.

Learner - Notifications API

This endpoint enables getting, changing and deleting learner notifications

Fetch notifications

GET /api/learner/notifications

Response Codes

  • 200 OK

Example Response

{
  "notifications": [
    {
      "id": 254,
      "user_id": 6094,
      "subject": "You have a goal that was overdue on Friday August 4.",
      "body": ["span"],
      "sent_at": "2017-08-05T00:25:00.314Z",
      "read": false
    }
  ]
}

Update notification

PATCH /api/learner/notifications/:id
PUT /api/learner/notifications/:id

Response Codes

  • 200 OK

Delete notification

DELETE /api/learner/notifications/:id

Response Codes

  • 204 No Content

Learner - Open Courses API

Object Synopses

LearnerCourseResponse

  • id Integer

    The course id

  • is_enrolled Boolean

    Enrollment status of learner in this course.

  • progress Integer

    Current slide number.

  • slide_total Integer

    Total number of slides.

  • time_remaining Integer

    Estimated time to finish course in minutes.

  • location String

    Location of live training. Null for all other types of courses.

  • sessions_count Integer

    Number of future sessions offered for live training course. Null for other types of courses

  • next_session_start_at DateTime

    Date and time of next scheduled live training session. Null for other course types.

  • deleted_at DateTime

    Date and time at which course was deleted. Null if not deleted.

  • program_title String

    Program through which learner is enrolled in course. Null if learner is not enrolled through a program.

  • index_of_program Integer

    Position of this course within the program. Null if not enrolled though a program.

  • program_course_count Integer

    Total number of courses in program. Null if not enrolled through a program.

  • open_book Boolean

    Indicates if learners can navigate the course during quizzes.

  • completed_at DateTime

    Date and time when course was completed. Null if not completed.

  • end_at DateTime

    Date and time by which this course is due. Null if no due date was assigned.

  • estimated_time Integer

    Estimated length of course in minutes.

  • passing_threshold Integer

    Required score (out of 100) to pass.

  • required Boolean

    Indicates if course is required or optional.

  • score Integer

    Learners score (out of 100) in this course. Null for live trainings.

  • state String

    State of enrollment in course.

  • title String

    Course title.

  • has_certificate Boolean

    Indicates if course issues certificate when successfully completed.

  • course_type String

    Indicates course type. May be native bridge, SCORM, or live training.

  • attachments_count Integer

    Indicates the number of attachments the course has.

Show a course with open enrollment enabled using a UUID

GET /api/learner/open_courses/:id

Response Codes

  • 200 OK
  • 404 Not Found

Parameters

  • id String Required

    Path parameter. An open course uuid.

Example Response

{
  "courses": [
    "{API::LearnerCourseResponse}"
  ],
  "meta": {}
}

Learner - Open Enrollment API

Enroll user for an open enrollment enabled course

Enroll user for an open enrollment enabled course

Create enrollment

POST /api/learner/open_tasks/:open_task_id/enrollment

This endpoint enrolls the user into a given program with open enrollment enabled.

Response codes

  • 201 Created
  • 400 Bad Request

Fetch enrollments

GET /api/learner/open_tasks/:open_task_id/enrollment

This endpoint fetches any enrollments the user has on the given open-enrollment-enabled program.

Response codes

  • 200 OK

Create enrollment

POST /api/learner/open_programs/:open_program_id/enrollment

This endpoint enrolls the user into a given program with open enrollment enabled.

Response codes

  • 201 Created
  • 400 Bad Request

Fetch enrollments

GET /api/learner/open_programs/:open_program_id/enrollment

This endpoint fetches any enrollments the user has on the given open-enrollment-enabled program.

Response codes

  • 200 OK

Learner - Open Live Course Sessions API

List Open Live Course Sessions as a learner

GET /api/learner/open_live_courses/:open_live_course_id/sessions

Response Codes

  • 200 OK
  • 404 Not Found

Example Response

{
  "sessions": [
    {
      "id": "3",
      "start_at": "2016-04-29T00:00:00.000-06:00",
      "end_at": "2016-04-29T01:00:00.000-06:00",
      "concluded_at": null,
      "location": "Tatooine",
      "seats_remaining": 2,
      "is_open": true,
      "is_registered": false
    },
    {
      "id": "4",
      "start_at": "2016-05-28T00:00:00.000-06:00",
      "end_at": "2016-05-28T01:00:00.000-06:00",
      "concluded_at": null,
      "location": "Coruscant",
      "seats_remaining": 10,
      "is_open": true,
      "is_registered": false
    }
  ]
}

Show a single open live course session as a learner

GET /api/learner/open_live_courses/:open_live_course_id/sessions/:id

Response Codes

  • 200 OK
  • 404 Not Found

Example Response

{
  "sessions": [
    {
      "id": "3",
      "start_at": "2016-04-29T00:00:00.000-06:00",
      "end_at": "2016-04-29T01:00:00.000-06:00",
      "concluded_at": null,
      "location": "Tatooine",
      "seats_remaining": 2,
      "is_open": true,
      "is_registered": false
    }
  ]
}

Learner - Open Live Courses API

Show a live course with open enrollment enabled using a UUID

GET /api/learner/open_live_courses/:id

Response Codes

  • 200 OK
  • 404 Not Found

Parameters

  • id String Required

    Path parameter. An open live course uuid.

Example Response

{
  "live_courses": [
    {
      "id": "1",
      "title": "Course Number One",
      "description": "An open live course"
    }
  ],
  "meta": {}
}

Learner - Open Programs API

Object Synopses

LearnerProgramResponse

  • id String

    The program id

  • title String

    The title of the program.

  • description String

    The description of the program.

  • program_items_count Integer

    Total number of program items.

  • completed_program_items_count Integer

    Total number of completed program items.

  • time_remaining Integer

    Estimated time to finish the program in minutes.

Show a program with open enrollment enabled using a UUID

GET /api/learner/open_programs/:id

Response Codes

  • 200 OK
  • 404 Not Found

Parameters

  • id String Required

    Path parameter. An open program uuid.

Example Response

{
  "programs": [
    "{API::LearnerProgramResponse}"
  ],
  "meta": {}
}

Learner - Placement Launch Controller API

Get the launch URL and data for launching an LTI placement

GET /api/learner/lti_placement_launch

Response Codes

  • 200 OK
  • 404 Not Found

Parameters

  • placement_id String Required

    The id of the LTI placement to launch

Example Response

{
  "placement_id": "1",
  "tool_id": "2",
  "launch_url": "http://example.com/launch",
  "params": {},
  "launch_data": {
     "context_id": "1673cd0f-f043-4d34-bfbc-c13fd5cce99a",
     "context_label": "bridge",
     "custom_field": "value",
     "launch_presentation_document_target": "iframe",
     "launch_presentation_return_url": "http://bridge.local.bridgeops.sh:3000/learner/courses",
     "lis_person_contact_email_primary": "user@example.com",
     "lis_person_name_family": "Last",
     "lis_person_name_full": "First Last",
     "lis_person_name_given": "First",
     "lti_message_type": "basic-lti-launch-request",
     "lti_version": "LTI-1p2",
     "oauth_callback": "about:blank",
     "oauth_consumer_key": "key",
     "oauth_nonce": "534b94655fc5f8ebaa9c97344ea7b953",
     "oauth_signature": "7CgFfsQ14XFAJSM2o8GT6pg8C7w=",
     "oauth_signature_method": "HMAC-SHA1",
     "oauth_timestamp": "1490312905",
     "oauth_version": "1.0",
     "resource_link_description": "This is a Sample Tool Provider.",
     "resource_link_id": "8169f5e122e9dafafd1f02c9e15eb4ab",
     "roles": "learner",
     "tool_consumer_info_product_family_code": "Bridge",
     "tool_consumer_instance_guid": "bridge.local.bridgeops.sh:3000",
     "tool_consumer_instance_name": "Bridge",
     "tool_consumer_instance_url": "http://bridge.local.bridgeops.sh:3000",
     "user_id": "c74cff31-603b-4c01-832e-1810ee54bf91"
  }
}

Learner - Policies API

Gets and updates info about an account’s Acceptable Use Policy and Privacy Policy

List the two policies for the current domain (AUP/PP)

GET /api/learner/policies

This endpoint is public, and intentionally NOT authenticated. The reason for this is that Privacy Policy and Acceptable Use Policy info need to be accessible even for non-logged-in users. We have links to these pages on the login screen, so we cannot enforce any authorization on this endpoint. Same goes for #show.

Response Codes

  • 200 OK

Example Response

{
  "policies": [
    {
      "custom_body": null,
      "custom_body_markup": null,
      "display_on_login": true,
      "domain_id": "75",
      "id": "42",
      "policy_type": "acceptable_use",
      "region_type": "domestic",
      "updated_at": "2017-08-04T23:33:38.847931Z"
    },
    {
      "custom_body": "<div>custom stuff</div>",
      "custom_body_markup": "<div>custom stuff</div>",
      "display_on_login": false,
      "domain_id": "75",
      "id": "43",
      "policy_type": "privacy",
      "region_type": "custom",
      "updated_at": "2017-08-05T23:33:38.847931Z"
    }
  ]
}

Get a single Policy object

GET /api/learner/policies/:id

Response Codes

  • 200 OK

Example Response

{
  "policy": {
    "custom_body": null,
    "custom_body_markup": null,
    "display_on_login": true,
    "domain_id": "75",
    "id": "42",
    "policy_type": "acceptable_use",
    "region_type": "domestic",
    "updated_at": "2017-08-04T23:33:38.847931Z"
  }
}

A PATCH action with json payload to update a Policy

PATCH /api/learner/policies

Request payload is a json object of a Policy. It must contain the id of the Policy, and it must fit the schema of a Policy (lest you get a 400 Bad Request), but otherwise you can provide as many or as little fields as you want to update.

It will only allow you to update these fields: custom_body display_on_login region_type

Only support users are authorized to hit this endpoint and update Policies. If you are a non-support user you will get a 401.

Responds with the updated Policy object.

Response Codes

  • 200 OK
  • 400 Bad Request
  • 401 Unauthorized

Example Requests

{
  "id": "42",
  "region_type": "international"
}
curl \
  -X PATCH \
  -H "Authorization: Bearer $TOKEN" \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -d '{"id":"42","region_type":"international"}' \
  http://<bridge>/api/learner/policies
    
{
  "id": "42",
  "display_on_login": true
}
curl \
  -X PATCH \
  -H "Authorization: Bearer $TOKEN" \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -d '{"id":"42","display_on_login":true}' \
  http://<bridge>/api/learner/policies
    

Example Response

{
  "customBody": "sand",
  "customBodyMarkup": "<p>sand</p>",
  "displayOnLogin": false,
  "domainId": "24",
  "id": "42",
  "policyType": "privacy",
  "regionType": "domestic",
  "updatedAt": "2017-08-04T23:33:38.847931Z"
}

Learner - Profile API

Manage profile information for learner.

Resets password

PUT /api/learner/profile/password

A PUT action with json payload to reset password. All sessions tied to the user (except any with the specified refresh_token) will be deleted.

Response Codes

  • 200 OK
  • 401 Unauthorized

Parameters

  • current_password String Required

    Body parameter

  • new_password String Required

    Body parameter

  • refresh_token String

    Body parameter. If specified, any sessions with this refresh_token won’t be deleted after the reset.

Example Request

{
  "current_password" : "blahblah",
  "new_password": "hahahaha",
  "refresh_token": "85a1efb4cf2a1bcd101a65a96f97c4fdf39"
}
curl \
  -X PUT \
  -H "Authorization: Bearer $TOKEN" \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -d '{"current_password":"blahblah","new_password":"hahahaha","refresh_token":"85a1efb4cf2a1bcd101a65a96f97c4fdf39"}' \
  http://<bridge>/api/learner/profile/password
    

Example Responses

{
  "meta": {"success": false},
  "errors":["invalid_password"]
}
{
  "meta": {"success": true},
  "errors":[]
}

Updates profile information

PUT /api/learner/profile

A PUT action with json payload to update profile information

Response Codes

  • 200 OK

Parameters

  • tagline String

    Body parameter

  • avatar_url String

    Body parameter

  • locale String

    Body parameter. Changes datetime and language preference.

Example Requests

{ "tagline": "ad mogul"}
curl \
  -X PUT \
  -H "Authorization: Bearer $TOKEN" \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -d '{"tagline":"ad mogul"}' \
  http://<bridge>/api/learner/profile
    
{ "avatar_url": "https://subaccount.s3.amazonaws.com/uploads%2F1%2F8d3f6c88-41ef-47bf-8fef-a6f708a5540c.png"}
curl \
  -X PUT \
  -H "Authorization: Bearer $TOKEN" \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -d '{"avatar_url":"https://subaccount.s3.amazonaws.com/uploads%2F1%2F8d3f6c88-41ef-47bf-8fef-a6f708a5540c.png"}' \
  http://<bridge>/api/learner/profile
    
{ "locale": "en"}
curl \
  -X PUT \
  -H "Authorization: Bearer $TOKEN" \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -d '{"locale":"en"}' \
  http://<bridge>/api/learner/profile
    
{ "avatar_url": ""}
curl \
  -X PUT \
  -H "Authorization: Bearer $TOKEN" \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -d '{"avatar_url":""}' \
  http://<bridge>/api/learner/profile
    
{ "a11y": true }
curl \
  -X PUT \
  -H "Authorization: Bearer $TOKEN" \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -d '{"a11y":true}' \
  http://<bridge>/api/learner/profile
    

Example Response

{
  "id": 1,
  "avatar_url": "https://subaccount.s3.amazonaws.com/uploads%2F1%2F8d3f6c88-41ef-47bf-8fef-a6f708a5540c.png",
  "tagline": "ad mogul",
  "locale": "en",
  "a11y": true
}

Learner - Program Enrollments API

Fetch specific program enrollment

GET /api/learner/programs/:program_id/enrollments

No documentation available yet.

Learner - Program Items API

This API controls learner interactions with program items.

Object Synopses

LearnerProgramItemResponse

  • id String

    The unique ID of the program item.

  • index String

    The index of the program item.

  • learnable_id String

    The ID of the course template associated with the program item.

  • course_type String

    The type of Bridge course.

  • description String

    The description of the program item.

  • estimated_time Integer

    Estimated time to finish the program item.

  • has_certificate Boolean

    Does this program item have a certificate?

  • passing_threshold Integer

    The passing score for the program item

  • slide_total Integer

    The number of published slides for the program item

  • third_party_course_id String

    The external ID of a course.

  • title String

    The title of the program item.

  • completed_at DateTime or null

    DateTime that the item was completed.

  • deleted_at DateTime or null

    DateTime that the item was deleted.

  • end_at DateTime or null

    DateTime that the item was due.

  • expires_at DateTime or null

    DateTime that the item completion expires.

  • is_enrolled Boolean

    Is the learner enrolled in this item?

  • progress Float

    Progress of item finished.

  • renew_by DateTime or null

    DateTime by which the item must be re-enrolled.

  • score Integer or null

    Learners score (out of 100) in this item. Null for live trainings.

  • state String or null

    The state of the learner’s enrollment in the program item.

  • time_remaining Integer

    Estimated time to finish the item in minutes.

List program items

GET /api/learner/programs/:program_id/items

Response Codes

  • 200 OK

Parameters

  • program_id Integer Required

    Path parameter. A program id.

Example Response

{
  "program_items": [
    "{API::LearnerProgramItemResponse}"
  ]
}

Learner - Programs API

This API controls learner interaction with programs.

Object Synopses

LearnerProgramResponse

  • id String

    The program id

  • title String

    The title of the program.

  • description String

    The description of the program.

  • program_items_count Integer

    Total number of program items.

  • completed_program_items_count Integer

    Total number of completed program items.

  • time_remaining Integer

    Estimated time to finish the program in minutes.

Show program

GET /api/learner/programs/:id

Response Codes

  • 200 OK

Parameters

  • id Integer Required

    Path parameter. A program id.

Example Response

{
  "programs": [
    "{API::LearnerProgramResponse}"
  ],
  "meta": {}
}

Learner - Retain Questions API

Fetch retain question

GET /api/learner/retain_quizzes/:retain_quiz_id/questions/:id

No documentation available yet.

Fetch current retain question

GET /api/learner/retain_quizzes/:retain_quiz_id/questions/current

No documentation available yet.

Learner - Retain Quizzes API

Object Synopses

RetainQuiz

  • id Integer

    The retain quiz ID.

  • course_id Integer

    The ID of the course the retain quiz was generated from.

  • enrollment_id Integer

    The ID of the enrollment for the learner in the course.

  • state String

    The state of the retain quiz. Possible states are ‘scheduled’, ‘current’, and ‘complete’.

  • progress Float

    A number between 0 and 1 indicating how far though the retain quiz the learner has progressed.

  • score Integer

    An integer between 0 and 100 indicating the user’s score based on the number of retain questions answered correctly.

  • current_question_id String

    The ID of current retain question that the user has progressed to in the retain quiz.

  • started_at DateTime

    The time at which the learner started the retain quiz.

  • ended_at DateTime

    The time at which the learner finished the retain quiz.

Show retain quiz

GET /api/learner/retain_quizzes/:id

Response Codes

  • 200 OK

Parameters

  • id Integer Required

    Path parameter. A retain quiz id.

Example Response

{
  "quizzes": [
    "{API::RetainQuiz}"
  ]
}

Update Quiz

PATCH /api/learner/retain_quizzes/:id
PUT /api/learner/retain_quizzes/:id

A POST action for updating a given retain quiz. Currently only updating the started_at attribute is supported

Response Codes

  • 200 OK
  • 401 Unauthorized

Parameters

  • id Integer Required

    Path parameter. A retain quiz id.

Example Response

{
  "quizzes": [
    "{API::RetainQuiz}"
  ]
}

Complete Quiz

POST /api/learner/retain_quizzes/:id/complete

A POST action for completing the given retain quiz

Response Codes

  • 200 OK
  • 401 Unauthorized

Parameters

  • id Integer Required

    Path parameter. A retain quiz id.

Example Response

{
  "quizzes": [
    "{API::RetainQuiz}"
  ]
}

Learner - Retain Responses API

Create retain quiz response

POST /api/learner/retain_questions/:retain_question_id/responses

No documentation available yet.

Learner - Skills API

List all skills for the current learner

GET /api/learner/skills

Response Codes

  • 200 OK
  • 304 Not Modified

{ “skills”: [ { “id”: 7850, “title”: “Data Abstraction” }, { “id”: 7851, “title”: “Data Access” } ] }

Parameters

  • search String

    Search SKILLS based on passed search term

  • scope String

    Accepted values: library. Filters the returned list of skills by a given scope

Learner - Slide Comments API

Enables fetching, creating, updating, deleting, and upvoting slide comments

Fetch slide comments

GET /api/learner/courses/:course_id/slides/:slide_id/comments

No documentation available yet.

Fetch specific slide comment

GET /api/learner/courses/:course_id/slides/:slide_id/comments/:id

No documentation available yet.

Create slide comment

POST /api/learner/courses/:course_id/slides/:slide_id/comments

No documentation available yet.

Update slide comment

PATCH /api/learner/courses/:course_id/slides/:slide_id/comments/:id
PUT /api/learner/courses/:course_id/slides/:slide_id/comments/:id

No documentation available yet.

Delete slide comment

DELETE /api/learner/courses/:course_id/slides/:slide_id/comments/:id

No documentation available yet.

Upvote slide comment

POST /api/learner/courses/:course_id/slides/:slide_id/comments/:comment_id/rate

No documentation available yet.

Learner - Slide Responses API

Create slide response

POST /api/learner/slides/:slide_id/responses

No documentation available yet.

Fetch slide response

POST /api/learner/slides/:slide_id/responses/preview

No documentation available yet.

Learner - Survey API

Completion of a survey for a user

Complete

PATCH /api/learner/survey/distributions/:distribution_id/submissions/complete

This endpoint completes the survey for the user.

Response codes

  • 200 OK
  • 400 Bad Request

Example Response

{
  "meta":{},
  "submissions":[
    {
      "id":"1",
      "distribution_id":"1",
      "recipient_id":"4",
      "created_at":"2015-10-21T12:06:42.331-06:00",
      "submitted_at":"2015-10-21T12:07:21.514-06:00"
    }
  ]
}

Learner - Tags API

List all tags for the current learner

GET /api/learner/tags

Response Codes

  • 200 OK
  • 304 Not Modified

Parameters

  • search String

    Search tags based on passed search term

  • scope String

    Accepted values: library. Filters the returned list of tags by a given scope

Example Response

{
  "meta": {},
  "tags": [
    {
      "id": "2",
      "name": "Space"
    }
  ]
}

Learner - View Course Certificate API

List the certifications of the user for a given course id.

View Course Certificate

GET /api/learner/courses/:course_id/certificate(/:learner_id)

This endpoint lists the certifications of the user for a given course id.

Response codes

  • 200 OK
  • 401 Unauthorized

Example Response

{
  "certificates": [
    {
      "issuer": "Bridge",
      "learnable_title": "Crs_02",
      "earned_at": "2015-08-25T10:21:39.041-06:00",
      "recipient": "Bruce Lee",
      "score": 100,
      "course": "Crs_02"
    }
  ]
}

Learner - View Live Course Certificate API

List the certificates of the user for a given live course id.

View Live Course Certificate

GET /api/learner/live_courses/:live_course_id/certificate(/:learner_id)

This endpoint lists the certificates of the user for a given live course id.

Response codes

  • 200 OK
  • 401 Unauthorized

Example Response

{
  "certificates": [
    {
      "issuer": "Bridge",
      "learnable_title": "Live Course 1",
      "earned_at": "2015-08-25T10:21:39.041-06:00",
      "recipient": "Bruce Lee",
      "instructor": "Ip Man",
      "expires_at": 10
    }
  ]
}

Learner - View Program Certificate API

List the certifications of the user for a given program id.

View Program Certificate

GET /api/learner/programs/:program_id/certificate(/:learner_id)

This endpoint lists the certifications of the user for a given program id.

Response codes

  • 200 OK
  • 401 Unauthorized

Example Response

{
  "certificates": [
    {
      "issuer": "Bridge",
      "learnable_title": "Program 1",
      "earned_at": "2015-08-25T10:21:39.041-06:00",
      "recipient": "Bruce Lee",
      "course": "Program 1"
    }
  ]
}

Learner - View Task Certificate API

List the certificates of the user for a given task id.

View Task Certificate

GET /api/learner/tasks/:task_id/certificate(/:learner_id)

This endpoint lists the certificates of the user for a given task id.

Response codes

  • 200 OK
  • 401 Unauthorized

Example Response

{
  "certificates": [
    {
      "issuer": "Bridge",
      "learnable_title": "Task 1",
      "earned_at": "2015-08-25T10:21:39.041-06:00",
      "recipient": "Bruce Lee"
    }
  ]
}

Locks API

This endpoint allows for manipulation of mutex locks on resources that should be modified by only one Bridge user at a time (currently only implemented for CourseTemplate objects).

Object Synopses

Lockable

  • id String

    A UUID to uniquely identify this exact lock object

  • lockable_type String

    Entity type of the object being locked (currently only CourseTemplate)

  • lockable_id String

    Database ID of the resource referred to by this lock

  • holder_id String

    Reference to Bridge user_id who created/holds this lock

  • expires_in Integer

    Time (in seconds) until this lock will automatically expire

  • updated_at DateTime

    DateTime at which the object being locked was last updated on the server

Get lock status of a lockable resource

GET /api/author/course_templates/:id/lock
GET /api/author/tasks/:id/lock

Response Codes

  • 200 OK
  • 403 Forbidden
  • 404 Not Found

Parameters

  • id Integer Required

    Query parameter. This is the id of the course template resource you are trying to view the lock status of.

Example Response

{
  "lock": {
    "lockable_id": 10,
    "lockable_type": "CourseTemplate",
    "holder_id": "1",
    "expires_in": 900
  }
}

Create a new lock on a resource

POST /api/author/course_templates/:id/lock
POST /api/author/tasks/:id/lock

Response Codes

  • 200 OK
  • 403 Forbidden
  • 409 Conflict
  • 422 Unprocessable Entity

Parameters

  • id Integer Required

    Query parameter. This is the id of the course template resource you are creating a lock for.

Example Response

{
  "lock": {
    "id": "bf45ef52-b1a7-46a1-b96d-27a9c8dd43ef",
    "lockable_id": 10,
    "lockable_type": "CourseTemplate",
    "holder_id": "1",
    "updated_at": "2016-06-17T12:41:82.000-06:00"
  }
}

Renew a new lock on a resource (resets the expires_at time)

PUT /api/author/course_templates/:id/lock
PUT /api/author/tasks/:id/lock

Note: The UUID (unique ID of the existing lock) must be provided as an HTTP header X-Lock-Id:

Response Codes

  • 204 No Content
  • 403 Forbidden
  • 409 Conflict
  • 422 Unprocessable Entity

Parameters

  • id Integer Required

    Query parameter. This is the id of the course template resource you are renewing the lock for.

Release a lock on a resource

DELETE /api/author/course_templates/:id/lock
DELETE /api/author/tasks/:id/lock

Note: The UUID (unique ID of the existing lock) must be provided as an HTTP header X-Lock-Id:

Response Codes

  • 204 No Content
  • 403 Forbidden
  • 409 Conflict
  • 422 Unprocessable Entity

Parameters

  • id Integer Required

    Query parameter. This is the id of the course template resource you are releasing the lock for.

Mobile Learner - Courses API

This endpoint controls the mobile course endpoints

List of the user's course templates with the corresponding enrollment

GET /api/mobile/learner/courses

Response Codes

  • 200 OK
  • 400 Bad Request

Parameters

  • course_template_ids Array Required

    An array of Integer course_template_ids to be fetched by this request.

Example Requests

with comma separated course_template_ids
/api/mobile/learner/courses?course_template_ids=1,2,3
with array course_template_ids
/api/mobile/learner/courses?course_template_ids[]=1&course_template_ids[]=2&course_template_ids[]=3

Example Response

{
  "items": [
    {
      "enrollment": null,
      "enrollment_profile": {
        "enroll_url": "http://bridge.learn.local.bridgeops.sh/learner/courses/1afa4c6c/enroll",
        "has_certificate": false,
        "open_enrollment": true,
        "uuid": "1afa4c6c"
      },
      "template": {
        "id": 1,
        "course_type": "bridge",
        "description": null,
        "estimated_time": 1,
        "has_quizzes": false,
        "external_info": null,
        "title": "Course1",
        "cover_slide_data": {
          "background_image_url": "https://s3-us-east-2.amazonaws.com/bridge-learn-file-store-edge-cmh/1/1/uploads/ab6ea96d-05d5-46ac-b863-043d6acf990a.png"
        },
        "launch_url": "http://bridge.learn.local.bridgeops.sh/learner/courses/1/launch"
      }
    },
    {
      "enrollment": {
        "id": 1,
        "completed_at": null,
        "end_at": "2023-07-25T05:59:59.999Z",
        "learning_item_id": 1,
        "required": true,
        "score": 0,
        "state": "active",
        "time_remaining": 1
      },
      "enrollment_profile": {
        "enroll_url": "http://bridge.learn.local.bridgeops.sh/learner/courses/6f925e23/enroll",
        "has_certificate": false,
        "open_enrollment": false,
        "uuid": "6f925e23"
      },
      "template": {
        "id": 2,
        "course_type": "bridge",
        "description": null,
        "estimated_time": 1,
        "has_quizzes": false,
        "external_info": null,
        "title": "Course2",
        "launch_url": "http://bridge.learn.local.bridgeops.sh/learner/courses/2/launch"
      }
    },
    {
      "enrollment": null,
      "enrollment_profile": {
        "enroll_url": "http://bridge.learn.local.bridgeops.sh/learner/courses/68685524/enroll",
        "has_certificate": false,
        "open_enrollment": false,
        "uuid": "68685524"
      },
      "template": {
        "id": 3,
        "course_type": "scorm",
        "description": "",
        "estimated_time": null,
        "has_quizzes": false,
        "external_info": {
          "available_offline": false,
          "external_learning_standard": "SCORM_2004_3RD_EDITION",
          "external_version": 0
        },
        "title": "SCORM1 - RunTimeAdvancedCalls_SCORM20043rdEdition",
        "launch_url": "http://bridge.learn.local.bridgeops.sh/learner/courses/3/mobile_scorm_launch"
      }
    }
  ]
}

Course template with the corresponding enrollment

GET /api/mobile/learner/courses/:id

Response Codes

  • 200 OK
  • 400 Bad Request

Example Request

/api/mobile/learner/courses/1

Example Response

{
  "enrollment": null,
  "enrollment_profile": {
    "enroll_url": "http://bridge.learn.local.bridgeops.sh/learner/courses/1afa4c6c/enroll",
    "has_certificate": false,
    "open_enrollment": true,
    "uuid": "1afa4c6c"
  },
  "type": "CourseTemplate",
  "template": {
    "id": 1,
    "course_type": "bridge",
    "description": null,
    "estimated_time": 1,
    "has_quizzes": false,
    "external_info": null,
    "title": "Course1",
    "cover_slide_data": {
      "background_image_url": "https://s3-us-east-2.amazonaws.com/bridge-learn-file-store-edge-cmh/1/1/uploads/ab6ea96d-05d5-46ac-b863-043d6acf990a.png"
    },
    "launch_url": "http://bridge.learn.local.bridgeops.sh/learner/courses/1/launch"
  }
}

Mobile Learner - List program items API

This endpoint controls the mobile live courses endpoints

Get a program's items with their enrollments if possible

GET /api/mobile/learner/programs/:program_id/items

Response Codes

  • 200 OK
  • 400 Bad Request
  • 404 Not Found

Example Request

/api/mobile/learner/programs/1/items

Mobile Learner - Live Courses API

This endpoint controls the mobile live courses endpoints

List of the user's live courses with the corresponding enrollment

GET /api/mobile/learner/live_courses

Response Codes

  • 200 OK
  • 400 Bad Request

Parameters

  • live_course_ids Array Required

    An array of Integer live_course_ids to be fetched by this request.

Example Response

{
  "items": [
    {
      "enrollment": {
        "id": 2,
        "completed_at": null,
        "end_at": "2023-07-25T08:00:00.969Z",
        "required": true,
        "state": "registered",
        "registered": true,
        "multi_part": false,
        "registered_session_start_at": "2023-07-25T07:00:00.969Z",
        "registered_session_end_at": "2023-07-25T08:00:00.969Z",
        "registered_session_parts": []
      },
      "enrollment_profile": {
        "has_certificate": false,
        "open_enrollment": false,
        "uuid": "d7483698"
      },
      "template": {
        "id": 1,
        "description": null,
        "title": "lt1 - no multi part sessions",
        "cover_slide_data": {
          "background_image_url": null
        },
        "launch_url": "http://bridge.learn.local.bridgeops.sh/learner/calendar?liveCourseId=1"
      }
    }
  ]
}

LiveCourse template with the corresponding enrollment

GET /api/mobile/learner/live_courses/:id

Response Codes

  • 200 OK
  • 400 Bad Request

Example Request

/api/mobile/learner/live_courses/1

Example Response

{
  "enrollment": {
    "id": 2,
    "completed_at": null,
    "end_at": "2023-07-25T08:00:00.969Z",
    "required": true,
    "state": "registered",
    "registered": true,
    "multi_part": false,
    "registered_session_start_at": "2023-07-25T07:00:00.969Z",
    "registered_session_end_at": "2023-07-25T08:00:00.969Z",
    "registered_session_parts": []
  },
  "enrollment_profile": {
    "has_certificate": false,
    "open_enrollment": false,
    "uuid": "d7483698"
  },
  "type": "LiveCourse",
  "template": {
    "id": 1,
    "description": null,
    "title": "lt1 - no multi part sessions",
    "cover_slide_data": {
      "background_image_url": null
    },
    "launch_url": "http://bridge.learn.local.bridgeops.sh/learner/calendar?liveCourseId=1"
  }
}

Mobile Learner - Programs API

This endpoint controls the mobile program endpoints

List of the user's programs with the corresponding enrollment

GET /api/mobile/learner/programs

Response Codes

  • 200 OK
  • 400 Bad Request

Parameters

  • program_ids Array Required

    An array of Integer program_ids to be fetched by this request.

Example Requests

with comma separated program_ids
/api/mobile/learner/programs?program_ids=1,2
with array task_ids
/api/mobile/learner/programs?program_ids[]=1&program_ids[]=2

Example Response

{
  "items": [
    {
      "enrollment": {
        "completed_at": null,
        "completed_item_count": 1,
        "end_at": null,
        "id": 1,
        "learning_item_id": 1,
        "required": true,
        "state": "active"
      },
      "enrollment_profile": {
        "enroll_url": "http://bridge.learn.local.bridgeops.sh/learner/programs/490248be/enroll",
        "has_certificate": false,
        "open_enrollment": true,
        "uuid": "490248be"
      },
      "template": {
        "cover_slide_data": {
          "background_image_url": "https://s3-us-east-2.amazonaws.com/bridge-learn-file-store-edge-cmh/1/1/uploads/1de0413c-6c59-4a0b-b58a-da2a73d5bbab.png?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAR3HDTVET7VEVOX6W%2F20230719%2Fus-east-2%2Fs3%2Faws4_request&X-Amz-Date=20230719T125912Z&X-Amz-Expires=1800&X-Amz-SignedHeaders=host&X-Amz-Signature=34d124c1132be10c1c65a5578f108afb568711307b6c5429dc345a31e7c59dba"
        },
        "description": null,
        "id": 1,
        "item_count": 3,
        "launch_url": "http://bridge.learn.local.bridgeops.sh/learner/programs/1",
        "title": "Program1"
      }
    },
    {
      "enrollment": null,
      "enrollment_profile": {
        "enroll_url": "http://bridge.learn.local.bridgeops.sh/learner/programs/e2d38c57/enroll",
        "has_certificate": false,
        "open_enrollment": false,
        "uuid": "e2d38c57"
      },
      "template": {
        "cover_slide_data": {
          "background_image_url": null
        },
        "description": null,
        "id": 2,
        "item_count": 1,
        "launch_url": "http://bridge.learn.local.bridgeops.sh/learner/programs/2",
        "title": "Program2"
      }
    }
  ]
}

Program template with the corresponding enrollment

GET /api/mobile/learner/programs/:id

Response Codes

  • 200 OK
  • 400 Bad Request

Example Request

/api/mobile/learner/programs/1

Example Response

{
  "enrollment": null,
  "enrollment_profile": {
    "enroll_url": "http://bridge.learn.local.bridgeops.sh/learner/programs/e2d38c57/enroll",
    "has_certificate": false,
    "open_enrollment": false,
    "uuid": "e2d38c57"
  },
  "type": "Program",
  "template": {
    "cover_slide_data": {
      "background_image_url": null
    },
    "description": null,
    "id": 2,
    "item_count": 1,
    "launch_url": "http://bridge.learn.local.bridgeops.sh/learner/programs/2",
    "title": "Program2"
  }
}

Mobile Learner - Tasks API

This endpoint controls the mobile task endpoints

List of the user's tasks with the corresponding enrollment

GET /api/mobile/learner/tasks

Response Codes

  • 200 OK
  • 400 Bad Request

Parameters

  • task_ids Array Required

    An array of Integer task_ids to be fetched by this request.

Example Requests

with comma separated task_ids
/api/mobile/learner/tasks?task_ids=1,2
with array task_ids
/api/mobile/learner/tasks?task_ids[]=1&task_ids[]=2

Example Response

{
  "items": [
    {
      "enrollment": {
        "id": 1,
        "end_at": "2023-08-01T05:59:59.999Z",
        "required": true,
        "state": "assigned",
        "approval": {
          "id": 1,
          "state": "incomplete"
        }
      },
      "enrollment_profile": {
        "has_certificate": false,
        "open_enrollment": false,
        "uuid": "5efcf4b6"
      },
      "template": {
        "id": 1,
        "attachments_count": 0,
        "description": null,
        "title": "Task1",
        "cover_slide_data": {
          "background_image_url": null
        },
        "launch_url": "http://bridge.learn.local.bridgeops.sh/learner/checkpoints/1",
        "requires_approval": true,
        "requires_evidence": true
      }
    },
    {
      "enrollment": {
        "id": 2,
        "end_at": "2023-08-02T05:59:59.999Z",
        "required": true,
        "state": "assigned",
        "approval": null
      },
      "enrollment_profile": {
        "has_certificate": false,
        "open_enrollment": false,
        "uuid": "3bb3c718"
      },
      "template": {
        "id": 2,
        "attachments_count": 0,
        "description": null,
        "title": "Task2",
        "cover_slide_data": {
          "background_image_url": null
        },
        "launch_url": "http://bridge.learn.local.bridgeops.sh/learner/checkpoints/2",
        "requires_approval": false,
        "requires_evidence": false
      }
    }
  ]
}

Task template with the corresponding enrollment

GET /api/mobile/learner/tasks/:id

Response Codes

  • 200 OK
  • 400 Bad Request

Example Request

/api/mobile/learner/tasks/1

Example Response

{
  "enrollment": {
    "id": 2,
    "end_at": "2023-08-02T05:59:59.999Z",
    "required": true,
    "state": "assigned",
    "approval": null
  },
  "enrollment_profile": {
    "has_certificate": false,
    "open_enrollment": false,
    "uuid": "3bb3c718"
  },
  "type": "Task",
  "template": {
    "id": 2,
    "attachments_count": 0,
    "description": null,
    "title": "Task2",
    "cover_slide_data": {
      "background_image_url": null
    },
    "launch_url": "http://bridge.learn.local.bridgeops.sh/learner/checkpoints/2",
    "requires_approval": false,
    "requires_evidence": false
  }
}

Scorm - Upload Controller API

Visit Ruby Sample Code - File Upload to learn how to upload a file and get the url

Create a Scorm course

POST /api/scorm/upload

The response contains the id of the new bridge course.

Response Codes

  • 201 Created
  • 400 Bad Request

Parameters

  • title String Required

    The title of the course.

  • url String Required

    The url of the course that was uploaded to S3

Example Request

{
  "title": "Awesome title",
  "url": "https://abc.instructure.s3.amazonaws.com/1/1%2Fuploads%2F45718ec0-a3f6-46a2-9536-805aeebd5.zip"
}
curl \
  -X POST \
  -H "Authorization: Bearer $TOKEN" \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -d '{"title":"Awesome title","url":"https://abc.instructure.s3.amazonaws.com/1/1%2Fuploads%2F45718ec0-a3f6-46a2-9536-805aeebd5.zip"}' \
  http://<bridge>/api/scorm/upload
    

Example Response

{
  "id": 105
}