Top

Users

List users.
GET /users
Get the list of all users in the organization.
Get a user
GET /users/:user_id
Get the details of a user.
Get current user
GET /users/me
Get the details of the current user.
Create a user
POST /users
Create a user for your organization.
Update a user
PUT /users/:user_id
Update the details of a user.
Delete a user
DELETE /users/:user_id
Delete a user associated to the organization.
Invite a user
POST /users/:user_id/invite
Send invitation email to a user.
Mark user as active
POST /users/:user_id/active
Mark an inactive user as active.
Mark user as inactive
POST /users/:user_id/inactive
Mark an active user as inactive.

List users.

GET  /users

Get the list of all users in the organization.

Parameters

filter_by string Filter through users with user status.
Allowed Values: Status.All, Status.Active, Status.Inactive, Status.Invited and Status.Deleted
sort_column string Sort users.
Allowed Values: name, email, user_role and status

Sample Response

Status: 200 OK
Content Type: application/json;charset=UTF-8
{
  "code": 0,
  "message": "success",
  "users": [
    {
      "user_id": "460000000024003",
      "role_id": "460000000000619",
      "name": "John David",
      "email": "johndavid@zilliuminc.com",
      "user_role": "admin",
      "status": "active",
      "is_current_user": true
    },
    {
      "user_id": "460000000006001",
      "role_id": "460000000000619",
      "name": "John Smith",
      "email": "johnsmith@zilliuminc.com",
      "user_role": "admin",
      "status": "active",
      "is_current_user": false
    }
  ],
  "page_context": {
    "page": 1,
    "per_page": 200,
    "has_more_page": false,
    "report_name": "Users",
    "applied_filter": "Status.All",
    "sort_column": "name",
    "sort_order": "A"
  }
}

Get a user

GET  /users/:user_id

Get the details of a user.

Sample Response

Status: 200 OK
Content Type: application/json;charset=UTF-8
{
  "code": 0,
  "message": "success",
  "user": {
    "user_id": "460000000024003",
    "name": "John Smith",
    "email_ids": [
      {
        "is_selected": false,
        "email": "johnsmith@zilliuminc.com"
      }
    ],
    "status": "active",
    "user_role": "admin",
    "created_time": "2013-07-30T14:19:57+0530"
  }
}

Get current user

GET  /users/me

Get the details of the current user.

Sample Response

Status: 200 OK
Content Type: application/json;charset=UTF-8
{
  "code": 0,
  "message": "success",
  "user": {
    "user_id": "460000000024003",
    "name": "John David",
    "email_ids": [
      {
        "is_selected": false,
        "email": "johndavid@zilliuminc.com"
      }
    ],
    "status": "active",
    "user_role": "admin",
    "created_time": "2013-07-30T14:19:57+0530"
  }
}

Create a user

POST  /users

Create a user for your organization.

Request attributes

name* string
[200]
Name of the user.
email* string
[100]
Email address of the user.
user_role string Role of the user.Sets the privileges for a user.
Allowed Values: staff, admin and timesheetstaff

Sample Request

{
      "name": "John David",
      "email": "johndavid@zilliuminc.com",
      "user_role": "admin"
    }

Sample Response

Status: 201 Created
Content Type: application/json;charset=UTF-8
{
      "code": 0,
      "message": "Your invitation has been sent.",
      "user": {
        "user_id": "460000000024003",
        "name": "John David",
        "email_ids": [
          {
            "is_selected": false,
            "email": "johndavid@zilliuminc.com"
          }
        ],
        "status": "invited",
        "user_role": "admin",
        "created_time": "2013-07-30T14:19:57+0530"
      }
    }

Update a user

PUT  /users/:user_id

Update the details of a user.

Request attributes

name* string
[200]
Name of the user.
email* string
[100]
Email address of the user.
user_role string Role of the user.Sets the privileges for a user.
Allowed Values: staff, admin and timesheetstaff

Sample Request

{
      "name": "John David",
      "email": "johndavid@zilliuminc.com",
      "user_role": "admin"
    }

Sample Response

Status: 200 OK
Content Type: application/json;charset=UTF-8
{
      "code": 0,
      "message": "The user information has been updated",
      "user": {
        "user_id": "460000000024003",
        "name": "John David",
        "email_ids": [
          {
            "is_selected": false,
            "email": "johndavid@zilliuminc.com"
          }
        ],
        "status": "active",
        "user_role": "admin",
        "created_time": "2013-07-30T14:19:57+0530"
      }
    }

Delete a user

DELETE  /users/:user_id

Delete a user associated to the organization.

Sample Response

Status: 200 OK
Content Type: application/json;charset=UTF-8
{
  "code": 0,
  "message": "The user has been removed from your organization."
}

Invite a user

POST  /users/:user_id/invite

Send invitation email to a user.

Sample Response

Status: 200 OK
Content Type: application/json;charset=UTF-8
{
  "code": 0,
  "message": "Your invitation has been sent."
}

Mark user as active

POST  /users/:user_id/active

Mark an inactive user as active.

Sample Response

Status: 200 OK
Content Type: application/json;charset=UTF-8
{
  "code": 0,
  "message": "The user has been marked as active."
}

Mark user as inactive

POST  /users/:user_id/inactive

Mark an active user as inactive.

Sample Response

Status: 200 OK
Content Type: application/json;charset=UTF-8
{
  "code": 0,
  "message": "The user has been marked as inactive."
}