Returns a list of enrolments for an assignment.

Prev Next
Get
/assignments/{assignmentId}/enrolments

An endpoint to return the list of enrolments by assignmentId

Security
HTTP
Type basic

HTTP Basic authentication using your Tenant ID and API secret.

  • Username is the Tenant ID (i.e. eu-west-2_AbcdEfghI)
  • Password is the API secret you would have received.

You can also authenticate using OAuth 2.0 client credentials (oauth2 security scheme) instead of Basic auth.

OAuth

OAuth 2.0 client credentials authentication.

Use the following token endpoints (replace :tenantId with your Tenant ID):

  • Public API access tokens

    • Staging: https://public.api.learnstaging.link/oauth2/token/:tenantId
    • Production: https://public.api.learn.link/oauth2/token/:tenantId
    • Staging MEA: https://public.api.meastaging.learn.tech/oauth2/token/:tenantId
    • Production MEA: https://public.api.mea.learn.tech/oauth2/token/:tenantId
  • Webhooks access tokens

    • Staging: https://user.api.learnstaging.link/oauth2/token/:tenantId
    • Production: https://user.api.learn.link/oauth2/token/:tenantId
    • Staging MEA: https://user.api.meastaging.learn.tech/oauth2/token/:tenantId
    • Production MEA: https://user.api.mea.learn.tech/oauth2/token/:tenantId

All access tokens must be sent using the Authorization: Bearer <access_token> header.

Scopes

For API access (non-webhooks), the following scopes are available:

  • api/all – Full read and write access to the API.
  • api/read – Read-only access to the API.
  • api/write – Write access to the API.

For webhooks, the following scopes are available:

  • api/webhooks – Access to webhook functionality.
  • api/all – Full read and write access to the API, including webhooks.

Tokens must include appropriate scopes for the endpoints you wish to call.

FlowClient Credentials
Token URLhttps://public.api.learn.link/oauth2/token/:tenantId
Path parameters
assignmentId
stringRequired

The assignment ID

Example63f57d805d8ecbf46f5b5278
Query parameters
updatedAtFrom
string (date-time)

The start date to filter enrolments from in ISO 8601 format, e.g., 2023-01-01T00:00:00Z

Example2023-01-01T00:00:00Z
updatedAtTo
string (date-time)

The date to filter enrolments up to in ISO 8601 format, e.g., 2025-01-01T00:00:00Z. Requires the updatedAtFrom parameter.

Example2025-01-01T00:00:00Z
status
string

Enrolment statuses

Valid values[ "archived", "complete", "open", "overdue", "scheduled", "unassigned" ]
page
integer (int64)

Set the current page of results

Minimum1.0
Default1
perPage
integer (int64)

Used in combination with the page parameter to page through the data, will be prioritised over limit.

Allowed values: 1–100

Minimum1.0
Maximum100.0
Default100
limit
integer (int64)

Set the number of items to retrieve per page

Minimum1.0
Maximum100.0
Default100
Responses
200

get enrolments for an assignment

Array of object
object

A record associated with a specific user and a specific assignment to track the completion process.

id
string

The enrolment ID

Example63f8c80136c4d82bba43efa0
userId
string

The assignee user ID

Example63feb359efcdc6f51a621bcd
assignmentId
string

The assignment ID

Example63feb35e1124643b940eeeca
audienceId
string

The audience ID

Example63feb36222c0c0685b9d1eb7
primaryContentId
string

The assigned content ID

Example63feb366c1fcc8d6a4a8abc7
status
string

Enrolment statuses:

  • Archived is a status where the enrolment is no longer relevant to the user
  • Complete is a status where the enrolment has a recorded completion before the due date
  • Open is where the enrolment becomes active for completion
  • Overdue is where the assignment has no completion recorded but has exceeded the due date
  • Scheduled is where the assignment has been scheduled for the current recurring period
  • Unassigned is a status set to 'previous status' in the eventLog when the enrolment is created
Valid values[ "archived", "complete", "open", "overdue", "scheduled", "unassigned" ]
availableDate
string (date-time)

The date on which a scheduled enrolment will become open

Example2023-08-23T09:09:16.076Z
dueDate
string (date-time)

The date after which a scheduled enrolment will become overdue

Example2023-09-23T09:09:16.076Z
lastCompletedAt
string (date-time)

The date on which a scheduled enrolment was last completed

Example2023-08-24T09:09:16.076Z
history
Array of object
object
type
string

The type of the event being logged for historical purposes.

Valid values[ "assignment-created", "assignment-removed", "assignment-updated", "audience-deleted", "completion-import", "completion-on-system", "content-archived", "content-deleted", "scheduled-check", "user-added-to-audience", "user-removed-from-audience", "user-suspended" ]
completionId
string

The completion ID

Example63f8c80136c4d82bba43efa0
previousStatus
string

Enrolment statuses:

  • Archived is a status where the enrolment is no longer relevant to the user
  • Complete is a status where the enrolment has a recorded completion before the due date
  • Open is where the enrolment becomes active for completion
  • Overdue is where the assignment has no completion recorded but has exceeded the due date
  • Scheduled is where the assignment has been scheduled for the current recurring period
  • Unassigned is a status set to 'previous status' in the eventLog when the enrolment is created
Valid values[ "archived", "complete", "open", "overdue", "scheduled", "unassigned" ]
nextStatus
string

Enrolment statuses:

  • Archived is a status where the enrolment is no longer relevant to the user
  • Complete is a status where the enrolment has a recorded completion before the due date
  • Open is where the enrolment becomes active for completion
  • Overdue is where the assignment has no completion recorded but has exceeded the due date
  • Scheduled is where the assignment has been scheduled for the current recurring period
  • Unassigned is a status set to 'previous status' in the eventLog when the enrolment is created
Valid values[ "archived", "complete", "open", "overdue", "scheduled", "unassigned" ]
createdAt
string (date-time)

The date on which the event was logged

Example2023-08-24T09:09:16.076Z
updatedAt
string (date-time)

The date on which the event was last modified

Example2023-08-24T09:09:16.076Z
updatedAt
string (date-time)

The date on which an enrolment was last updated

Example2023-08-24T09:09:16.076Z
401

Unauthorized

object

Unauthorized

status
number
Example401.0
error
string
ExampleUnauthorized
message
string
403

Forbidden

object

Forbidden

status
number
Example403.0
error
string
ExampleForbidden
message
string #deprecatedtemplate# #additional-property-template#
OneOf
string
string
object
object
404

Not Found

object

Not found

status
number
Example404.0
error
string
ExampleNot Found
message
string #deprecatedtemplate# #additional-property-template#
OneOf
string
string
object
object
422

Unprocessable Content

object

Unprocessable Content

status
number
Example422.0
error
string
ExampleUnprocessable Content
message
string #deprecatedtemplate# #additional-property-template#
OneOf
string
string
object
object
default

Internal Server Error

object

Internal Server Error

status
number
Example500.0
error
string
ExampleInternal Server Error
message
string