Skip to content

Commit ad0cb7e

Browse files
authored
Update api.md (#3320)
1 parent 1773a8f commit ad0cb7e

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

docs/dev/api.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ description: Introduction to basic principles of authentication, request/respons
88
import Tabs from '@theme/Tabs';
99
import TabItem from '@theme/TabItem';
1010

11-
Sauce Labs exposes a set of REST API endpoints that allow you to perform operations, manage accounts, and retrieve data programmatically so you can use the Sauce platform in the way that best suits your business logic.
11+
Sauce Labs exposes a set of REST API endpoints that let you perform operations, manage accounts, and retrieve data programmatically so you can use the Sauce platform in the way that best suits your business logic.
1212

1313
:::tip
1414
You can check the current accessibility of any Sauce Labs system on the [Sauce Labs Systems Status](https://status.saucelabs.com/) page.
@@ -22,9 +22,9 @@ You can check the current accessibility of any Sauce Labs system on the [Sauce L
2222

2323
## Accessing the APIs
2424

25-
The Sauce Labs APIs are organized around REST. Each endpoint is structured as a resource-oriented URL that accepts inline query parameters and form-encoded request bodies, then returns JSON-encoded responses.
25+
The Sauce Labs APIs are REST-based. Each endpoint is structured as a resource-oriented URL that accepts inline query parameters and form-encoded request bodies, and returns JSON-encoded responses.
2626

27-
Each endpoint is constructed from a `{base-url}` prefix that is based on the data center associated with the Sauce Labs account for which the request is relevant, plus the latest version for the given method. The following table provides the base URLs for each data center.
27+
Each endpoint is formed by a `{base-url}` prefix (which depends on the data-center associated with your Sauce Labs account) plus the version for the given method. The following table provides the base URLs for each data center.
2828

2929
| Data Center | API Base URL |
3030
| :---------- | :---------------------------------------- |
@@ -42,7 +42,7 @@ The Sauce Labs API uses API keys to authenticate requests. You can view and mana
4242

4343
Alternatively, you can use the username and access key of a [service account](/basics/acct-team-mgmt/managing-service-accounts) to authenticate API requests. Service account credentials are generated during [account creation](/basics/acct-team-mgmt/managing-service-accounts/#creating-a-service-account).
4444

45-
Authentication to the API is performed via [HTTP Basic Auth](http://en.wikipedia.org/wiki/Basic_access_authentication). Provide your username and API key as the basic auth username and password values, respectively. All requests must be made over HTTPS. Calls made over HTTP or without proper authentication will fail.
45+
Authentication is performed via [HTTP Basic Auth](http://en.wikipedia.org/wiki/Basic_access_authentication). PRovide your username as the basic username and your API key as the password. All requests must use HTTPS. Calls made over HTTP or without proper authentication will fail.
4646

4747
You can provide your authentication credentials as inline parameters of your request or using a Basic Header.
4848

@@ -58,7 +58,7 @@ curl -L -X GET 'https://api.us-west-1.saucelabs.com/team-management/v1/users/' \
5858

5959
### Versioning
6060

61-
The API is versioned by URL, each of which may be in a different stage of release. The currently published version of each endpoint is reflected in the URL itself, as demonstrated in the following two endpoints:
61+
The API is versioned via the URL, and different endpoints may be at different stages of release, The currently published version of each endpoint is visible in its URL, for example:
6262

6363
- `https://api.us-west-1.saucelabs.com/rest/v1/{username}/jobs`
6464
- `https://api.us-west-1.saucelabs.com/v2/performance/metrics/`
@@ -69,7 +69,7 @@ Unspecified method requests default to `GET`. All other supported request types
6969

7070
## Status Codes
7171

72-
Sauce Labs uses conventional HTTP response codes to indicate the success or failure of an API request. In general, codes in the `2xx` range indicate success, while codes in the `4xx` range indicate an error that caused the request to be denied. Codes in the `5xx` range indicate an error reaching the Sauce Labs server (which is rare). The following table provides a summary of response codes returned by the APIs.
72+
Sauce Labs uses conventional HTTP response codes to indicate the success or failure of an API request. In general, status codes in the `2xx` range indicate success, `4xx` indicate client-errors (e.g., invalid request), and `5xx` indicate server-errors at Sauce Labs (which are rare). The following table provides a summary of response codes returned by the APIs.
7373

7474
| Code | Description |
7575
| ----------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
@@ -114,14 +114,14 @@ Following are some sample error responses that include additional detail.
114114

115115
## Rate Limits
116116

117-
The Sauce Labs REST API places rate limits on some endpoints in order to prevent over-utilization.
117+
The Sauce Labs REST API imposes rate limits on some endpoints to prevent over-utilization.
118118

119119
For example:
120120

121121
- Incoming authenticated API requests have rate limits imposed against the individual account.
122122
- Incoming unauthenticated API requests have rate limits imposed against the IP addresses.
123123

124-
Requests received after the rate limit is reached return a [429 response code](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/429#:~:text=The%20HTTP%20429%20Too%20Many,before%20making%20a%20new%20request) indicating that the number of allowable requests has been exceeded.
124+
If you exceed the rate limit, requests will return a [429 response code](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/429#:~:text=The%20HTTP%20429%20Too%20Many,before%20making%20a%20new%20request), indicating that the allowable number of requests has been exceeded.
125125

126126
### Rate Limit Breakdown
127127

0 commit comments

Comments
 (0)