Users
This resource provides access to users.
Description | |
|---|---|
Resource | /api/v2/users/ |
Returned entry | User |
Supported methods | |
Supported sub-resources |
|
User object
Represents a user entity in the LMS.
User fields
The table describes fields of the User object.
Field | Type | Description |
|---|---|---|
id | integer | The unique identifier of the user in the LMS. |
address | string | Part of the user's address: address line 1. |
address2 | string | Part of the user's address: address line 2. |
city | string | Part of the user's address: city. |
country | string | Part of the user's address: country. ISO 3166-1 alpha-2 (see link). |
createdDate | datetime | User creation date. |
string | User's email. | |
externalId | string | A unique identifier in the external system. Can be used by the caller to simplify integration with the LMS. |
firstName | string | User's first name. |
lastName | string | User's last name. |
loginName | string | User's login name. |
state | string | Part of the user's address: state. 2-letter US state or territory abbreviation code from the ANSI standard INCITS 38:2009 (see link). |
updatedDate | string | User update date. |
zip | string | User's address postal code. |
Read user list
Get a list of users.
Request
Request parameters
Parameter | Type | Description |
|---|---|---|
offset | integer | The number of records to skip before starting to collect the result set. |
limit | integer | The number of records to return. |
groupId | integer | Selects only users belonging to this group or its subgroups. |
createdAfter | string ($ISO 8601 UTC) | Select only records created after the specified date. |
updatedAfter | string ($ISO 8601 UTC) | Select only records updated after the specified date. |
Response
The method returns an array of User objects.
Examples
Request URL
Curl
Get user
Read a specific user information.
Request
Request parameters
Parameter | Type | Description |
|---|---|---|
id | integer | User ID. |
Example
This is an example of reading information about a specific user account.
Request URL
Response body
Curl
Create user
Add a new user account.
Required fields: email, firstName, lastName, loginName.
Request
Request body
The body of the request is a User object. You must include all required fields. Optional fields can be omitted from the request.
Response
The method returns a User object containing all fields.
Example
This is an example of creating a user John Smith with login jsmith and email address jsmith@example.com.
Request URL
Request body
Response body
Curl
Update user
Update an existing user account.
Required fields: email, firstName, lastName, loginName.
Request
Request parameters
Parameter | Type | Description |
|---|---|---|
id | integer | User ID. |
Request body
The body of the request is a User object. You must include all required fields. Optional fields can be omitted from the request.
Response
The method returns a user object containing all fields.
Example
This is an example of updating a user's city field.
Request URL
Request body
Response body
Curl
Delete user
This method marks the user account as deleted.
Request
Request parameters
Parameter | Type | Description |
|---|---|---|
id | integer | User ID. |
Response
The method returns HTTP code 204 if the user account was successfully deleted.
Example
This is an example of deleting a user account.