API - Users

Notes:

  • The user being used to authenticate against the API must have either the admin or account holder role assigned to them to be able to access these endpoints.

List

Description: Provides a paginated list of all users within an account.

Endpoint: <base_url>/users.json

Request: GET

Formats supported: JSON

Params:

  • page - {Integer} of the page (Default: 1)

Response

{
"pagination": { .... },
"users": [
{ .... },
{ .... }
]
}

Example ruby request

HTTParty.get('https://api.testlodge.com/v1/account/1/users.json', query: { page: 2 })

Example Response

Response code: 200

{
"pagination": {
"total_entries":40,
"total_pages":2,
"current_page":2,
"next_page":null,
"previous_page":1,
"per_page":20
},
"users":[{
"id":20,
"firstname":"Sarah",
"lastname":"jones",
"email":"Sarah@example.com",
"created_at":"2018-02-26T14:33:58Z",
"updated_at":"2018-02-26T14:33:58Z",
},
{ .... }]
}
Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

Comments

0 comments

Article is closed for comments.