Project roles
GET
/project/{id}/roles
const url = 'https://testomato.com/api/project/5e9602e7a39e5a46428b457f/roles';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://testomato.com/api/project/5e9602e7a39e5a46428b457f/roles \ --header 'Authorization: Bearer <token>'Get an array of project roles
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”id
required
string
A unique project ID
Example
5e9602e7a39e5a46428b457fResponses
Section titled “Responses”List of Project Areas/Groups
Media typeapplication/json
Array<object>
object
id
string
users_id
string format: nullable
name
string
permissions
Array<string>
systemRole
boolean
permissionsSwitches
Project permissions for current user
object
read
Can the current user view results?
boolean
run
Can the current user run checks?
boolean
editTest
Can the current user edit tests?
boolean
edit
Can the current user edit project settings?
boolean
manageUsers
Can the current user manage other users?
boolean
apiKey
Can the current user view the API key?
boolean
leave
Can the current user leave the project?
boolean
Example
[ { "id": 4, "name": "project admin", "permissions": [ [ "read", "run", "editTests", "edit", "manageUsers", "apiKey" ] ], "systemRole": true, "permissionsSwitches": { "manageUsers": true, "apiKey": true, "leave": true } }]The API token is missing, malformed or expired. Request a new one from
POST /api/authenticate.
Media typeapplication/json
object
message
Error message text
string
code
Error code number
integer
ok
boolean
error
boolean
Example
{ "message": "Access denied! Please log in to access this resource.", "code": 401, "ok": false, "error": true}The token is valid but the operation is not allowed. Two distinct causes:
- the subscription plan does not include API access — every endpoint returns this, regardless of the resource
- the account lacks the required role on the project — reading needs
read, changing checks needseditTests, and so on. See Project permissions.
Media typeapplication/json
object
message
Error message text
string
code
Error code number
integer
ok
boolean
error
boolean
Example
{ "message": "Sorry! Your current plan does not support access to Testomato API.", "code": 403, "ok": false, "error": true}