Returns all users from a specified department.
Use this operation to get the information about users of the specified department.
To get information on a specific user, use the /depts/{DeptId}/users/{UserId} (GET)
operation.
Authentication
Basic authentication using a user’s login and password. See Authentication for details.
Security Rights
The authenticating user must have administrator privileges.
Request Format
To get information on users, send a GET request to the following URL:
offset : integer, default: 0
The number of users to skip before counting the returned users.The default value is 0, which is the offset of the first item. For details, see Paging Through Results Using Offset and Limit.
DeptId : integer, required
The ID of the needed department.
limit : integer, default: 25
The maximum number of users to return in the response.
filter : string
The filter expression to apply to the returned list. See Search Filters.
A sample request:
GET http://yourserver.com/rest-api/service/api/v1/depts/8162/users HTTP/1.1
Host: yourserver.com
Connection: keep-alive
Accept: application/json
Authorization: Basic am9obkBleGFtcGxlLmNvbTpwQHNzd29yZA==
A sample request made by using cURL:
curl -u [email protected]:p@ssword -H "Accept: application/json" http://yourserver.com/service/api/v1/depts/8162/users
Response Format
If successful, the operation responds with HTTP status code 200 and returns a JSON object with user information.
If the operation fails, it returns the appropriate status code and (optionally) the error description in the response body.
A sample response:
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 845
{
"metadata": {
"result_set": {
"count": 1,
"offset": 0,
"limit": 25,
"total": 1
},
"permissions": {
"acl": 7
}
},
"results": [
{
"id": 12345,
"first_name": "John",
"middle_name": "Hamish",
"last_name": "Watson",
"work_phone": "555-35-35",
"title": "",
"company_name": "ACME",
"grouping": "",
"sub_grouping": "",
"email: "[email protected]",
"email2": "",
"web_site": "",
"web_site2": "",
"is_logged_on": false,
"is_security_admin": true,
"is_active": true,
"date_last_logon": "2015-04-10T01:22:00.8430000",
"nbr_times_logon": 869,
"newsletters: "",
"contact_person": "",
"spouse_name": "",
"is_selected": false,
"comments": "",
"time_zone_code": "GMT London",
"update_user_id": 24674,
"date_created": "2015-04-10T01:22:00.8430000",
"date_updated": "2015-04-10T01:22:00.8430000",
"discount": 0,
"import_id": 0,
"primary_dept_id": 8162,
"logon_attempts": 0,
"is_a_d_account": false
}
]
}
Metadata about the user list.
Pagination information about the user list. (See Paging Through Results Using Offset and Limit.)
The number of returned users.
The offset of the first user requested.
The maximum number of users requested.
The total number of users.
The authenticating user’s rights to access the user list.
Access rights:
- 0 - None
- 1 - Read
- 2 - Update
- 3 - Read and update
- 4 - Delete
- 5 - Read and delete
- 7 - Full access
An array of available users.
The department ID.
The department name.
The project name.
The unique identifier of the project.
The ID of the last user who updated this user.
The date and time when the user was created.
The date and time when the user was last updated.
The scheduled date and time when work on the project started.
The actual date and time when work on the project started.
The scheduled date and time when work on the project will complete.
The actual date and time when work on the project completed.
Estimated hours required to complete the project.
Actual hours spent working on the project.
The estimated cost of working on the project.
The actual cost of working on the project.
True if the project cost is estimated automatically.
True if the user account is active, False otherwise.
The name of the last user, who updated the project, in the Lastname, Firstname format.
The number of notes attached to the project.
The number of calendar events attached to the project.
The number of files attached to the project.
The unique identifier of the user.
The first name of the user.
The middle name of the user.
The last name of the user.
The work phone of the user.
The title of the user.
The name of the company the user belongs to.
The name of the grouping the user belongs to.
The name of the sub grouping the user belongs to.
The primary email address of the user.
The secondary email address of the user.
The URL of the user's primary website.
The URL of the user's secondary website.
True if the user is logged on to QAComplete.
True if the user is the security administrator.
The number of times the user was logged in to QAComplete.
The information on the user's contact person.
The name of the user's spouse.
True if the user is selected for further actions, False otherwise.
Comments posted by the user.
The code of the user's time zone.
The information on the user's currently active discounts.
The unique import identifier of the user.
The unique identifier of the user's primary department.
The number of the user's logon attempts.
True if the user is using an Active Directory account, False otherwise.
The date this user last logged on.