Users API

List

Resource: /api/v2/users

HTTPS Request Method: GET

Description: The full list of users associated with the account.

Required Parameters:

  • api_key

Optional Parameters:

  • * page - (integer): if this parameter is passed, the results will be paginated by 1,000, and this parameter indicates the page you want. If not present, page 1 is assumed.
  • fields (list of comma delimited attribute names - only these attributes will be included in the response instead of having all the attributes returned; this can significantly speed up the response time)
  • user[id] - (integer)
  • user[code] - (string)
  • user[position_id] - (integer)
  • user[is_active] - (boolean)
  • user[authority] - (string)
  • user[login] - (string)
  • user[tzid] - (string)
  • user[hired_on] - (date)
  • user[manager_id] - (integer)
  • user[custom_a] - (string)
  • ...
  • user[custom_u] - (string)
  • user[email] - (string)
  • user[city] - (string)
  • user[state] - (string)
  • user[zip] - (string)
  • user[country] - (string)
  • user[state] - (string)
  • user[integration_id] - (integer)
  • user[last_login_at] - (string)
  • user[locale] - (string)
  • user[created_on] - (datetime)
  • user[updated_on] - (datetime)
  • user [facebook_id] - (string)

Dates and datetimes should be in YYYY-MM-DD or YYYY-MM-DD HH:MM:SS format and can be given as ranges if separated by a comma.

Example Request

curl -X GET -d '{"api_key": "123456", "fields":"id,first_name","user": {"created_on": "2010-01-01,2015-01-01"}}' -H "Content-type: application/json" -H "Accept: application/json" https://YOURSUBDOMAIN.exceedlms.com/api/v2/users


Example Response: 

[
{
"first_name": "David",
"id": 23
},
{
"first_name": "Alice",
"id": 100
}
]


Create

Resource: /api/v2/users

HTTPS Request Method: POST

Description: Creates a user based on the associated params. If the user is unable to be created, a HTTP 422 Unprocessable Entity response is returned. The HTTP response body will contain a list of error reasons in JSON or XML format. For more information concerning types of values accepted, see https://<your LMS website>/users/import.

Example Request:

curl -X POST -d '{"user": {"first_name": "tim", "last_name": "tim", "login": "tim", "password": "tim"}}' -H "Content-type: application/json" -H "Accept: application/json" https://YOURSUBDOMAIN.exceedlms.com/api/v2/users?api_key=123456


Required Parameters:

  • user[first_name]
  • user[last_name]
  • user[login]
  • user[password]
  • api_key


Optional Parameters:

  • user[code]
  • user[email]
  • user[hired_on]
  • user[position_id]
  • user[position_name]
  • user[address_one]
  • user[address_two]
  • user[country]
  • user[city]
  • user[is_active]
  • user[is_pass_reset_required]
  • user[manager_id]
  • user[phone_fax]
  • user[phone_home]
  • user[phone_mobile]
  • user[phone_work]
  • user[state]
  • user[zip]
  • user[custom_a]
  • user[custom_b]
  • user[custom_c]
  • user[custom_d]
  • user[custom_e]
  • user[custom_f]
  • user[custom_g]
  • user[custom_h]
  • user[custom_i]
  • user[custom_j]
  • * ...
  • * user[custom_u]
  • user [facebook_id] - (string)


Example Parameters: 

  • user[first_name]=tim
  • user[last_name]=tim
  • user[login]=tim
  • user[password]=tim
  • api_key=123456

Example Response:

<?xml version="1.0" encoding="UTF-8"?>
<user>
<account-id type="integer">2</account-id>
<address-one nil="true"></address-one>
<address-two nil="true"></address-two>
<authority>student</authority>
<city nil="true"></city>
<code nil="true"></code>
<country nil="true"></country>
<custom-a nil="true"></custom-a>
<custom-b nil="true"></custom-b>
<custom-c nil="true"></custom-c>
<custom-d nil="true"></custom-d>
<custom-e nil="true"></custom-e>
<custom-f nil="true"></custom-f>
<custom-g nil="true"></custom-g>
<custom-h nil="true"></custom-h>
<custom-i nil="true"></custom-i>
<custom-j nil="true"></custom-j>
<email nil="true"></email>
<first-name>tim</first-name>
<full-name>tim tim</full-name>
<hide-welcome-page type="boolean">false</hide-welcome-page>
<hired-on type="date" nil="true"></hired-on>
<id type="integer">5</id>
<integration-id type="integer" nil="true"></integration-id>
<is-account-owner type="boolean">false</is-account-owner>
<is-active type="boolean">true</is-active>
<is-instructor type="boolean">false</is-instructor>
<is-pass-reset-required type="boolean">false</is-pass-reset-required>
<last-name>tim</last-name>
<login>tim</login>
<manager-id type="integer" nil="true"></manager-id>
<password>tim</password>
<phone-fax nil="true"></phone-fax>
<phone-home nil="true"></phone-home>
<phone-mobile nil="true"></phone-mobile>
<phone-work nil="true"></phone-work>
<picture-id type="integer" nil=\"true\"></picture-id>
<position-id type="integer" nil=\"true\"></position-id>
<registration-id nil="true"></registration-id>
<state nil="true"></state>
<tzid nil="true"></tzid>
<updated-by type="integer" nil="true"></updated-by>
<updated-on type="datetime">2009-09-22T14:32:43Z</updated-on>
<zip nil="true"></zip>
</user>

 

Read

Resource: /api/v2/users/{id}

HTTPS Request Method: GET

Description: Lookup a user based on the user id.

Required Parameters:

  • api_key


Example Request:

curl -X GET -H "Content-type: application/json" -H "Accept: application/json" https://YOURSUBDOMAIN.exceedlms.com/api/v2/users/322?api_key=123456


Optional Parameters:

  • user[code]: lookup the user using the code. When this param is used the id parameter is ignored.


Example Response:

<?xml version="1.0" encoding="UTF-8"?>
<user>
<account-id type="integer">2</account-id>
<address-one></address-one>
<address-two></address-two>
<authority>superadmin</authority>
<city></city>
<code></code>
<country nil="true"></country>
<custom-a></custom-a>
<custom-b></custom-b>
<custom-c nil="true"></custom-c>
<custom-d nil="true"></custom-d>
<custom-e nil="true"></custom-e>
<custom-f nil="true"></custom-f>
<custom-g nil="true"></custom-g>
<custom-h nil="true"></custom-h>
<custom-i nil="true"></custom-i>
<custom-j nil="true"></custom-j>
<email>[email protected]</email>
<first-name>Sample</first-name>
<full-name>sample user</full-name>
<hide-welcome-page type="boolean" nil="true"></hide-welcome-page>
<hired-on type="date" nil="true"></hired-on>
<id type="integer">15834252</id>
<integration-id type="integer" nil="true"></integration-id>
<is-account-owner type="boolean">false</is-account-owner>
<is-active type="boolean">false</is-active>
<is-instructor type="boolean">false</is-instructor>
<is-pass-reset-required type="boolean">false</is-pass-reset-required>
<last-name>User</last-name>
<login>suser</login>
<manager-id type="integer" nil="true"></manager-id>
<password>demo</password>
<phone-fax></phone-fax>
<phone-home></phone-home>
<phone-mobile></phone-mobile>
<phone-work></phone-work>
<picture-id type="integer" nil="true"></picture-id>
<position-id type="integer" nil="true"></position-id>
<registration-id nil="true"></registration-id>
<state></state>
<tzid>Eastern Time (US & Canada)</tzid>
<updated-by type="integer" nil="true"></updated-by>
<updated-on type="datetime">2009-02-16T20:40:06Z</updated-on>
<zip></zip>
</user>

 

Update

Resource: /api/v2/users/{id}

HTTPS Request Method: PUT

Description: Update a user based on the user id.

Example Request:

curl -X PUT -d '{"user": {"first_name": "joe"}}' -H "Content-type: application/json" -H "Accept: application/json" https://YOURSUBDOMAIN.exceedlms.com/api/v2/users/2?api_key=123456


Required Parameters:

  • api_key

Optional Parameters:

  • user[code]: the user code cannot be updated. When this parameter is passed the LMS looks up the user using the code, and ignores the id parameter.
  • user[first_name]
  • user[last_name]
  • user[login]
  • user[password]
  • user[email]
  • user[hired_on]
  • user[position_id]
  • user[address_one]
  • user[address_two]
  • user[country]
  • user[city]
  • user[is_active]
  • user[is_pass_reset_required]
  • user[manager_id] user[phone_fax]
  • user[phone_home]
  • user[phone_mobile]
  • user[phone_work]
  • user[state]
  • user[zip]
  • user[custom_a]
  • user[custom_b]
  • user[custom_c]
  • user[custom_d]
  • user[custom_e]
  • user[custom_f]
  • user[custom_g]
  • user[custom_h]
  • user[custom_i]
  • user[custom_j]
  • user [facebook_id] - (string)


Response:

  • On successful update returns a 200 HTTP response code with an empty body



 

Have more questions? Submit a request

0 Comments

Article is closed for comments.