UserListForWork

Use this resource to return a list of the users to whom the tasks can be assigned.

Method summary

HTTP Method Path Description
GET /scr/api/UserListForWork Returns a list of the users to whom the tasks can be assigned.

GET /scr/api/UserListForWork

Description
Use this method to return a list of the users to whom the tasks can be assigned.
Resource information
Requirements Description
Response format JSON
Requires authentication Yes
Supports OAuth 2 client credentials Yes using a User Service ID containing Work Management Category
Rate limited Not yet
Parameters
Name Location Description Required Type
X-On-Behalf-Of Header The user context. The value must be a username in the account. The user must have permission to perform the action in the account and in the specified parent space, if any. Required if Service ID OAuth credentials are used. Not required when using User Service ID OAuth credential. String
Response
Example input
  • Using User Service ID OAuth 2 client credentials:
    curl -i -H "Authorization: Bearer access_token" 
        "https://your_server_url/scr/api/UserListForWork"
  • Using Service ID OAuth 2 client credentials:
    curl -i -H "Authorization: Bearer access_token" 
        "https://your_server_url/scr/api/UserListForWork"
  • Using Service ID OAuth 2 client credentials with user context:
    curl -i -H "Authorization: Bearer access_token" 
        -H "X-On-Behalf-Of:user_name@domain.com" "https://your_server_url/scr/api/UserListForWork"
Example output
{
  "users":[
    {
      "name":"username1",
      "id":"7000f",
      "avatarId":"70010",
      "license":"Editor"
    },
    {
      "name":"username2",
      "id":"70022",
      "license":"Contributor"
    },
    {
      "name":"username3",
      "id":"70020",
      "license":"Editor",
      "avatarId":"7612738"
    }
  ]
}
Response properties
users
The array of user objects.
user.name
The full name of the user.
user.id
The ID of the user.
user.avatarId
The avatar ID of the user. This field is omitted if the user doesn't have an avatar.
user.license
Contains one of the following possible values:
  • Editor if the user is an editor
  • Contributor if the user is a contributor
The Community and the Viewer users are not returned because they can't get tasks assigned to them.
Response messages
HTTP code Reason
200

The request was completed successfully.

401

The user isn't authorized to make the request.