Users

The Users API allows you to get information about users on your account.

Get a user

GET

/users/:userid

Example request with cURL

curl "https://yoursubdomain.deploybot.com/api/v1/users/42" \
  -X GET \
  -H "X-Api-Token: api-token"

Response

id integer ID of user
first_name string First name of user
last_name string Last name of user
timezone string Timezone of user
email string Email of user
created_at string Creation timestamp
updated_at string Last update timestamp
is_admin boolean Indicates whether a user is admin or not

Example response

HTTP/1.1 200 OK
Content-Type: application/json
{ 
  "id": 2,
  "first_name": "John",
  "last_name": "Smith",
  "timezone": "Bogota",
  "email": "support@deploybot.com",
  "created_at": "2015/02/18 17:05:04 +0000",
  "updated_at": "2015/03/09 22:21:49 +0000",
  "is_admin": true
}

List users

Querystring parameters

limit Max number of users to return per request (default 50, max 50)
after ID of last user returned by previous request. Used for paging results.
GET

/users

Example request with cURL

curl "https://yoursubdomain.deploybot.com/api/v1/users?limit=2&after=42" \
  -X GET \
  -H "X-Api-Token: api-token"

Response

meta object
meta/next integer Next page’s after parameter’s value
meta/next_uri string Next page’s URI when the query results do not fit on a single page
meta/total integer Total number of users
entries array List of users matching the query
entries/id integer ID of user
entries/first_name string First name of user
entries/last_name string Last name of user
entries/timezone string Timezone of user
entries/email string Email of user
entries/is_admin boolean Indicates whether a user is admin or not
entries/created_at string Creation timestamp
entries/updated_at string Last update timestamp
designer string

Example response

HTTP/1.1 200 OK
Content-Type: application/json
{ 
  "meta": {
    "next": 48,
    "next_uri": "/users?after=48&limit=2",
    "total": 3
  },
  "entries": [
    {
      "id": 44,
      "first_name": "Cheryl",
      "last_name": "Sugar",
      "timezone": "London",
      "email": "support@deploybot.com",
      "is_admin": true,
      "created_at": "2015/02/18 17:05:04 +0000",
      "updated_at": "2015/03/09 22:21:49 +0000"
    }
  ],
  "designer": "Eugene"
}