You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/dev/api.md
+8-8Lines changed: 8 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,7 +8,7 @@ description: Introduction to basic principles of authentication, request/respons
8
8
import Tabs from '@theme/Tabs';
9
9
import TabItem from '@theme/TabItem';
10
10
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.
12
12
13
13
:::tip
14
14
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
22
22
23
23
## Accessing the APIs
24
24
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.
26
26
27
-
Each endpoint is constructed from a `{base-url}` prefix that is based on the datacenter 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.
@@ -42,7 +42,7 @@ The Sauce Labs API uses API keys to authenticate requests. You can view and mana
42
42
43
43
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).
44
44
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.
46
46
47
47
You can provide your authentication credentials as inline parameters of your request or using a Basic Header.
48
48
@@ -58,7 +58,7 @@ curl -L -X GET 'https://api.us-west-1.saucelabs.com/team-management/v1/users/' \
58
58
59
59
### Versioning
60
60
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:
@@ -69,7 +69,7 @@ Unspecified method requests default to `GET`. All other supported request types
69
69
70
70
## Status Codes
71
71
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.
@@ -114,14 +114,14 @@ Following are some sample error responses that include additional detail.
114
114
115
115
## Rate Limits
116
116
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.
118
118
119
119
For example:
120
120
121
121
- Incoming authenticated API requests have rate limits imposed against the individual account.
122
122
- Incoming unauthenticated API requests have rate limits imposed against the IP addresses.
123
123
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.
0 commit comments