Route | Description |
---|---|
GET /orgs/:orgId | Get details of the organization |
GET /orgs/:orgId/users | Get list of users with access to an organization |
PUT /users/:user | Update user details |
GET /users/:user/orgs | Get list of organizations a user has access to |
DELETE /users/:user | Delete user |
DELETE /orgs/:org/users/:user | Remove user’s access to organization |
POST /orgs/:org/users/:user | Grant user access to organization |
Get details of the organization
Get detail of the organization
GET /orgs/:orgId
Request Parameters
orgId
: ID of the organizationdown
: Whether to include full details on the org including list of test cases, etc. Defaults to true.
Sample Response
{
"data": {
"id": 2,
"createdAt": "2017-02-27T09:14:31.033Z",
"updatedAt": "2023-12-18T23:09:44.163Z",
"name": "demo@testable.io",
"email": "demo@testable.io",
"settings": {
"reassignOnFail": "true",
"percentiles": "50,90,95,99,99.9",
...
},
"public": false,
"shared": false,
"active": true,
"account": {
"id": 532,
"createdAt": "2022-05-02T15:28:02.174Z",
"updatedAt": "2024-04-11T13:44:55.548Z",
"balance": 0,
"balanceLimit": 7500,
"balanceAlertSent": false,
"limits": [],
"paymentGateway": "Manual",
"gatewayId": "yyy",
"locked": false,
"subscriptions": [],
"currentInvoice": {},
"primaryOrgId": 2,
"purchasedPlans": [],
"allocations": [],
"totalExecutions": 576,
"queuedExecutions": 55,
"totalQueuedTime": 292382830,
"failedQueuedExecutions": 11,
"firstVersion": false
},
"users": [
{
"user": {
"id": 1,
"createdAt": "2017-02-27T09:14:30.869Z",
"updatedAt": "2024-04-11T03:22:33.226Z",
"lastLoggedIn": "2024-04-11T03:22:33.226Z",
"name": "Demo Acct",
"email": "demo@testable.io",
"accessType": "Admin",
"confirmed": true,
"active": true,
"authSource": "Password",
"authSubdomain": "",
"hmac": "7D57E16D43F2966F79A229C9D47692A129D449EA86C4BFCABDD98804AD1CA325",
"orgAssociations": [],
"firstVersion": false
},
"userRole": "Admin"
}
],
"testCases": [],
"tokens": [],
"integrations": [],
"triggers": [],
"hasLinkedOrgs": true,
"todaySuccessHistory": [],
"yesterdaySuccessHistory": [],
"notifications": [],
"includedFeatures": [],
"excludedFeatures": [],
"firstVersion": false
}
}
Get list of users with access to an organization
Get the list of users with access to an organization.
GET /orgs/:orgId/users
Request Parameters
orgId
: ID of the organization
Sample Response
[
{
"user": {
"id": 1,
"createdAt": "2017-02-27T09:14:30.869Z",
"updatedAt": "2024-04-11T03:22:33.226Z",
"lastLoggedIn": "2024-04-11T03:22:33.226Z",
"name": "Demo Acct",
"email": "demo@testable.io",
"accessType": "Admin",
"confirmed": true,
"active": true,
"authSource": "Password",
"authSubdomain": "",
"hmac": "7D57E16D43F2966F79A229C9D47692A129D449EA86C4BFCABDD98804AD1CA325",
"orgAssociations": [],
"firstVersion": false
},
"userRole": "Admin"
},
{
"user": {
"id": 2,
"createdAt": "2017-07-16T04:33:21.804Z",
"updatedAt": "2023-03-15T22:10:35.988Z",
"lastLoggedIn": "2023-03-15T22:10:35.988Z",
"name": "Demo Two",
"email": "demo2@testable.io",
"accessType": "Regular",
"confirmed": true,
"active": true,
"authSource": "Saml",
"authSubdomain": "test",
"hmac": "CBD016FC2F66268E0EF4B856226E7D44BE37A33D4859B1B02D76DD1735910109",
"orgAssociations": [],
"firstVersion": false
},
"userRole": "Regular"
}
]
Update user details
Update user details like name and email or change the password (if not using SSO).
PUT /users/:user
Request Parameters
user
: The name, email, or ID of the user
Request Body
{
"name": "New Name",
"email": "newemail@foo.com",
"oldPassword": "Oldpass123",
"newPassword": "Newpass.123"
}
Sample Response
{
"id": 1,
"createdAt": "2017-02-27T09:14:30.869Z",
"updatedAt": "2024-04-11T03:22:33.226Z",
"lastLoggedIn": "2024-04-11T03:22:33.226Z",
"name": "Demo Acct",
"email": "demo@testable.io",
"accessType": "Admin",
"confirmed": true,
"active": true,
"authSource": "Password",
"authSubdomain": "",
"hmac": "7D57E16D43F2966F79A229C9D47692A129D449EA86C4BFCABDD98804AD1CA325",
"firstVersion": false
}
Get list of organizations a user has access to
Get the list of organizations a user has access to
GET /users/:users/orgs
Request Parameters
user
: The name, email, or ID of the user
Sample Response
[
{
"data": {
"id": 20,
"createdAt": "2018-12-11T19:24:31.327Z",
"updatedAt": "2018-12-11T19:25:01.353Z",
"name": "avi2@testable.io",
"email": "avi2@testable.io",
"settings": {},
"public": false,
"shared": false,
"active": true,
"account": {
"id": 542,
"createdAt": "2022-05-02T15:28:05.469Z",
"updatedAt": "2024-04-11T13:44:55.863Z",
"balance": 0,
"balanceLimit": 0,
"balanceAlertSent": false,
"limits": [],
"paymentGateway": "Stripe",
"locked": false,
"subscriptions": [],
"currentInvoice": {},
"primaryOrgId": 20,
"purchasedPlans": [],
"allocations": [],
"totalExecutions": 0,
"queuedExecutions": 0,
"totalQueuedTime": 0,
"failedQueuedExecutions": 0,
"firstVersion": false
},
"testCases": [],
"tokens": [],
"integrations": [],
"triggers": [],
"ipFilters": [],
"hasLinkedOrgs": false,
"todaySuccessHistory": [],
"yesterdaySuccessHistory": [],
"notifications": [],
"includedFeatures": [],
"excludedFeatures": [],
"firstVersion": false
},
"_links": {
"_self": "https://dev.testable.io:8080/users/9/orgs/20"
}
}
]
Delete user
Delete a user from Testable
DELETE /users/:user
Request Parameters
user
: The name, email, or ID of the user
Responds with a 201 status if successful with no body.
Remove user’s access to organization
Remove a user’s access to a particular organization.
DELETE /users/:user/orgs/:org
DELETE /orgs/:org/users/:user
Request Parameters
user
: The name, email, or ID of the userorg
: The ID of the organization
Grant user access to organization
Grant a user access to an organization
POST /users/:user/orgs/:org
POST /orgs/:org/users/:user
Request Parameters
user
: The name, email, or ID of the userorg
: The ID of the organization