Client
Both clients and users support metadata
which can be used to store arbitrary key value pairs. Note that when updating a client or user, metadata
will replace the existing metadata and not be merged with it.
GET /api/v1/headless/clients
Use this endpoint to get a paginated list of client identifiers.
Query parameters
Field | Type | Description | Required | Default | Options |
---|
length | integer | Number of results to return | No | "100" | N/A |
page | integer | Page number | No | "0" | N/A |
Responses
Code | Description |
---|
200 | A list of client identifiers |
GET /api/v1/headless/users
Use this endpoint to get a paginated list of users. You can optionally filter by clientIdentifier
.
Query parameters
Field | Type | Description | Required | Default | Options |
---|
length | integer | Number of results to return | No | "100" | N/A |
page | integer | Page number | No | "0" | N/A |
clientIdentifier | string | Filter users by clientIdentifier | No | N/A | N/A |
Responses
Code | Description |
---|
200 | A list of users |
PUT /api/v1/headless/client/{identifier}
Use this endpoint to update a client’s metadata
.
Path parameters
Field | Description | Options |
---|
identifier | Client identifier | N/A |
Body properties
Field | Type | Description | Required | Options |
---|
metadata | object | Arbitrary key value pairs to set on the client | No | N/A |
Responses
Code | Description |
---|
200 | Client updated |
404 | Client not found |
DELETE /api/v1/headless/client/{identifier}
Use this endpoint to delete all objects associated with a clientIdentifier
.
Path parameters
Field | Description | Options |
---|
identifier | Client identifier | N/A |
Responses
Code | Description |
---|
200 | All related objects and creators deleted |
PUT /api/v1/headless/user/{identifier}
Use this endpoint to update a user’s metadata
.
Path parameters
Field | Description | Options |
---|
identifier | Identifier | N/A |
Body properties
Field | Type | Description | Required | Options |
---|
clientIdentifier | string | Client identifier to filter the user by | No | N/A |
metadata | object | Arbitrary key value pairs to set on the user | No | N/A |
Responses
Code | Description |
---|
200 | User updated |
404 | User not found |
DELETE /api/v1/headless/user/{identifier}
Use this endpoint to delete a user by their identifier. You can choose what to do with any courses associated with this identifier.
Path parameters
Field | Description | Options |
---|
identifier | Identifier | N/A |
Query parameters
Field | Type | Description | Required | Default | Options |
---|
action | string | How to handle courses allocated to this user | Yes | N/A | reallocate delete ignore |
reallocateTo | string | If action is reallocate, the identifier to reallocate to | No | N/A | N/A |
clientIdentifier | string | Optionally provide a clientIdentifier to filter the user by | No | N/A | N/A |
Responses
Code | Description |
---|
200 | Success |