The Sauce Labs Cookbook

Sauce Headless

Front End Performance Testing

Insights

External Resources

More Info


Page tree
Skip to end of metadata
Go to start of metadata

These methods provide user account information and management.


What You'll Need

Get User

This method accesses basic account information.

GET /rest/v1/users/USERNAME
curl -u USERNAME:ACCESS_KEY https://saucelabs.com/rest/v1/users/USERNAME

Create a Subaccount

This method creates a subaccount.

Creating Users with UI

You can create your users using the Team Management user interface.

POST /rest/v1/users/USERNAME
Parameters

username

required


password

required


name

required

full name of subaccount user

email

required


concurrency

optional

positive integer

concurrency limit for the subaccount user

curl -X POST -u API_USERNAME:API_ACCESS_KEY \
-H 'Content-Type: application/json' \
-d '{
 "username": "subaccount-username", 
 "password": "subaccount-password", 
 "name": "subaccount-name", 
 "email": "subaccount-email-address"
}' \
https://saucelabs.com/rest/v1/users/API_USERNAME

Get List of subaccounts

This method gets a list of subaccounts associated with a parent account.

GET /rest/v1/users/USERNAME/list-subaccounts
Parameters

from

optional

positive integer

Pagination param.

Example values from=100 or from=200

limit

optional

positive integer, max: 100

 Number of results to return

curl -u USERNAME:ACCESS_KEY https://saucelabs.com/rest/v1/users/USERNAME/list-subaccounts

Get subaccount Information

This method gets information about subaccounts.

GET /rest/v1/users/USERNAME/subaccounts 
curl -u USERNAME:ACCESS_KEY https://saucelabs.com/rest/v1/users/USERNAME/subaccounts

Get List of Sibling Accounts

This mehtod gets a list of sibling accounts associated with the provided account.

GET /rest/v1.1/users/USERNAME/siblings
Parameters

page

optional

positive integer

Pagination param.

Example values page=1 or page=2

per_page

optional

positive integer, max: 50

 Number of results to return

curl -u USERNAME:ACCESS_KEY https://saucelabs.com/rest/v1/users/USERNAME/siblings

Update Access Key

This method changes the access key of your account.

Regenerating your access key means you have to update your access key value throughout your configuration. Tests containing your old access key will fail.

POST /rest/v1/users/USERNAME/accesskey/change
curl -X POST -u USERNAME:ACCESS_KEY https://saucelabs.com/rest/v1/users/USERNAME/accesskey/change