Account Management API Endpoints
The Accounts API exposes the following endpoints related to individual and team account configuration and monitoring.
Refer to Getting Started for Authentication and Server information.
Team
Lookup Teams
GET /team-management/v1/teams/
ID
value, which may be a required parameter of other API calls related to a specific team.You can filter the results of your query using the name
parameter below.Parameters
id | | QUERY | OPTIONAL | STRING | Comma-separated team IDs. Allows to receive details of multiple teams at once. For example, |
name | | QUERY | OPTIONAL | STRING | Returns the set of teams that begin with the specified name value. For example, |
- United States
- Europe
curl -u "$SAUCE_USERNAME:$SAUCE_ACCESS_KEY" --location \
--request GET 'https://api.us-west-1.saucelabs.com/team-management/v1/teams?name=sauce' \
--header 'Content-Type: application/json' | json_pp
curl -u "$SAUCE_USERNAME:$SAUCE_ACCESS_KEY" --location \
--request GET 'https://api.eu-central-1.saucelabs.com/team-management/v1/teams?name=sauce' \
--header 'Content-Type: application/json' | json_pp
Responses
200 | Success. Team info returned. | |
404 | Not found. |
{
"links": {...},
"count": 1,
"results": [
{
"id": "**************",
"name": "Sauce-Docs",
"settings": {
"virtual_machines": 25,
"real_devices": 0,
"live_only": false
},
"group": {...},
"is_default": false,
"org_uuid": "**************",
"user_count": 1
}
]
}
Get a Specific Team
GET /team-management/v1/teams/{team_id}/
ID
of the team is the only valid unique identifier.Parameters
id | | PATH | REQUIRED | STRING | The unique identifier of the team. You can look up the IDs of teams in your organization using the Lookup Teams endpoint. |
- United States
- Europe
curl -u "$SAUCE_USERNAME:$SAUCE_ACCESS_KEY" --location \
--request GET 'https://api.us-west-1.saucelabs.com/team-management/v1/teams/<team-id>' \
--header 'Content-Type: application/json' | json_pp
curl -u "$SAUCE_USERNAME:$SAUCE_ACCESS_KEY" --location \
--request GET 'https://api.eu-central-1.saucelabs.com/team-management/v1/teams/<team-id>' \
--header 'Content-Type: application/json' | json_pp
Responses
200 | Success. Team info returned. | |
404 | Not found. |
{
"id": "80d69d16ebdb4c018cc9d81ea911761a",
"name": "Sauce-Docs",
"org_uuid": {
"id": "**********",
"name": "SLTC",
"created_at": "2020-10-05T16:21:01.513495Z",
"updated_at": "2020-11-09T23:46:47.752572Z",
"total_vm_concurrency": 46,
"settings": {...}
},
"group": {...},
"created_at": "2020-12-30T17:09:12.473388Z",
"updated_at": "2020-12-30T17:09:12.473415Z",
"settings": {
"virtual_machines": 25,
"real_devices": 0,
"live_only": false
},
"description": "Tech Content API Testing",
"is_default": false,
"links": {...}
}
Create a Team
POST /team-management/v1/teams/
Parameters
name | | BODY | REQUIRED | STRING | A name for the new team. |
settings | | BODY | REQUIRED | OBJECT | The settings object specifies the concurrency allocations for the team within the organization. The available attributes are:
The |
description | | BODY | OPTIONAL | STRING | A description to distinguish the team in the organization. |
- United States
- Europe
curl -u "$SAUCE_USERNAME:$SAUCE_ACCESS_KEY" --location \
--request POST 'https://api.us-west-1.saucelabs.com/team-management/v1/teams/' \
--header 'Content-Type: application/json' \
--data-raw '{
"name": "A-Team",
"settings": {
"virtual_machines": "10"
},
"description": "Docs QA Team"
}' | json_pp
curl -u "$SAUCE_USERNAME:$SAUCE_ACCESS_KEY" --location \
--request POST 'https://api.eu-central-1.saucelabs.com/team-management/v1/teams/' \
--header 'Content-Type: application/json' \
--data-raw '{
"name": "A-Team",
"settings": {
"virtual_machines": "10"
},
"description": "Docs QA Team"
}' | json_pp
Responses
201 | Success. Team created. | |
400 | Bad request. |
{
"id": "9d3460738c28491a81d7ea16704a9edd",
"name": "A-Team",
"org_uuid": "5f436681bbfc4d9ca4aef1eba49ea3b7",
"group": {...},
"created_at": "2021-04-02T17:52:42.578095Z",
"updated_at": "2021-04-02T17:52:42.578126Z",
"settings": {
"virtual_machines": 10,
"real_devices": 0,
"live_only": false
},
"description": "Docs QA Team",
"is_default": false
}
Delete a Team
DELETE /team-management/v1/teams/{team_id}/
Parameters
team_id | | PATH | REQUIRED | STRING | The unique identifier of the team. You can look up the IDs of teams in your organization using the Lookup Teams endpoint. |
- United States
- Europe
curl -u "$SAUCE_USERNAME:$SAUCE_ACCESS_KEY" --location \
--request DELETE 'https://api.us-west-1.saucelabs.com/team-management/v1/teams/<team-id>/' \
--header 'Content-Type: application/json' \
--data-raw '' | json_pp
curl -u "$SAUCE_USERNAME:$SAUCE_ACCESS_KEY" --location \
--request DELETE 'https://api.eu-central-1.saucelabs.com/team-management/v1/teams/<team-id>/' \
--header 'Content-Type: application/json' \
--data-raw '' | json_pp
Responses
204 | Success. No content returned. | |
404 | Not found. |
Update a Team
PUT /team-management/v1/teams/{team_id}/
Parameters
team_id | | PATH | REQUIRED | STRING | The unique identifier of the team. You can look up the IDs of teams in your organization using the Lookup Teams endpoint. |
name | | BODY | REQUIRED | STRING | The name of the team as it will be after the update. Pass the current value to keep the name unchanged. |
settings | | BODY | REQUIRED | OBJECT | The updated concurrency allocations for the team. The available attributes are:
The |
description | | BODY | OPTIONAL | STRING | A description to distinguish the team in the organization. If the previous team definition included a description, omitting the parameter in the update will delete it from the team record. |
- United States
- Europe
curl -u "$SAUCE_USERNAME:$SAUCE_ACCESS_KEY" --location \
--request PUT 'https://api.us-west-1.saucelabs.com/team-management/v1/teams/<team-id>' \
--header 'Content-Type: application/json' \
--data-raw '{
"name": "Doc-Team",
"settings": {
"virtual_machines": "10"
},
"description": "Docs Team"
}' | json_pp
curl -u "$SAUCE_USERNAME:$SAUCE_ACCESS_KEY" --location \
--request PUT 'https://api.eu-central-1.saucelabs.com/team-management/v1/teams/<team-id>' \
--header 'Content-Type: application/json' \
--data-raw '{
"name": "Doc-Team",
"settings": {
"virtual_machines": "10"
},
"description": "Docs Team"
}' | json_pp
Responses
201 | Success. Team updated. | |
400 | Bad request. | |
404 | Not found. |
{
"id": "b3de7078b79841b59d2e54127269afe3",
"name": "Doc-Team",
"org_uuid": "5f436681bbfc4d9ca4aef1eba49ea3b7",
"group": {...},
"created_at": "2020-10-05T17:13:56.580592Z",
"updated_at": "2021-04-05T13:49:22.107825Z",
"settings": {
"virtual_machines": 10,
"real_devices": 0,
"live_only": true
},
"description": "Docs Team",
"is_default": false
}
Partially Update a Team
PATCH /team-management/v1/teams/{team_id}/
Parameters
team_id | | PATH | REQUIRED | STRING | The unique identifier of the team. You can look up the ID of teams in your organization using the Lookup Teams endpoint. |
name | | BODY | OPTIONAL | STRING | An updated name for the team. |
settings | | BODY | OPTIONAL | OBJECT | The updated concurrency allocations for the team. The available attributes are:
|
description | | BODY | OPTIONAL | STRING | An updated description. |
- United States
- Europe
curl -u "$SAUCE_USERNAME:$SAUCE_ACCESS_KEY" --location \
--request PATCH 'https://api.us-west-1.saucelabs.com/team-management/v1/teams/<team-id>' \
--header 'Content-Type: application/json' \
--data-raw '{
"settings": {
"virtual_machines": "25"
}
}' | json_pp
curl -u "$SAUCE_USERNAME:$SAUCE_ACCESS_KEY" --location \
--request PATCH 'https://api.eu-central-1.saucelabs.com/team-management/v1/teams/<team-id>' \
--header 'Content-Type: application/json' \
--data-raw '{
"settings": {
"virtual_machines": "25"
}
}' | json_pp