API: Users - TestRail

API: Users

Use the following API methods to request details about users.

get_user

Returns an existing user.

GET index.php?/api/v2/get_user/:user_id
:user_id The ID of the user

Response content

{
	"email": "[email protected]",
	"id": 1,
	"is_active": true,
	"name": "Alexis Gonzalez"
}

The following fields are included in the response

Name Type Description
email string The email address of the user as configured in TestRail
id int The unique ID of the user
is_active bool True if the user is active and false otherwise
name string The full name of the user

Response codes

200 Success, the user is returned as part of the response
400 Invalid or unknown user

get_user_by_email

Returns an existing user by his/her email address.

GET index.php?/api/v2/get_user_by_email&email=:email
:email The email address to get the user for

This method uses the same response format as get_user.

Response codes

200 Success, the user is returned as part of the response
400/404 Invalid or unknown email address

get_users

Returns a list of users.

GET index.php?/api/v2/get_users
:config_group_id The ID of the configuration group the configuration should be added to

 

Response content

[
	{ "id": 1, "name": "Alexis Gonzalez", .. },
	{ "id": 2, "name": "Ciaran Davenport", .. },
	..
]

The response includes an array of users. Each user in this list follows the same format as get_user.

Response codes

200 Success, the users are returned as part of the response