Skip to content

Commit 63f8c81

Browse files
Merge pull request #14 from jatinbs/v4
https and changed where authentication is shown
2 parents 41d9c9b + d5e693f commit 63f8c81

1 file changed

Lines changed: 14 additions & 14 deletions

File tree

README.md

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,22 @@
11
# API Overview
2-
The following denotes the HTTP-based API for [BrowserStack](http://www.browserstack.com). It provides browser-as-a-service for automated cross-browser testing. The goal is to provide a simple service which can easily be used by any browser testing framework.
2+
The following denotes the HTTPS-based API for [BrowserStack](https://www.browserstack.com). It provides browser-as-a-service for automated cross-browser testing. The goal is to provide a simple service which can easily be used by any browser testing framework.
3+
4+
### Authentication
5+
All methods need to authenticate who you are. Before spawning browser workers and deleting a worker for example. Authentication is done using your username and the BrowserStack access key within the HTTP request. For example:
6+
7+
$ curl -u "username:access_key" https://api.browserstack.com/4
8+
9+
> A `401 Unauthorized` response is given if an unauthorized request is made.
310
411
### Schema
5-
All requests are made to `http://api.browserstack.com/VERSION/` and all returned data is done so in JSON-format. The version this documentation outlines is 3.
12+
All requests are made to `https://api.browserstack.com/VERSION/` and all returned data is done so in JSON-format. The version this documentation outlines is 4.
613

7-
$ curl -i http://api.browserstack.com/3
14+
$ curl -iu "username:access_key" https://api.browserstack.com/4
815

916
HTTP/1.1 200 OK
1017
Content-Type: application/json
1118
Status: 200 OK
12-
X-API-Version: 3
19+
X-API-Version: 4
1320
Content-Length: 3
1421

1522
{}
@@ -38,13 +45,6 @@ All requests are pre-processed and validated. This section outlines how we handl
3845
3946
Possible error codes are `required` and `invalid`.
4047
41-
### Authentication
42-
All methods need to authenticate who you are. Before spawning browser workers and deleting a worker for example. Authentication is done using your username and the BrowserStack access key within the HTTP request. For example:
43-
44-
$ curl -u "username:access_key" http://api.browserstack.com/3
45-
46-
> A `401 Unauthorized` response is given if an unauthorized request is made.
47-
4848
### HTTP Verbs
4949
The API is kept concise and simple by making use of relevant HTTP verbs on each requests. The specifications for these are vague and their use within this API is specific but in general we follow the following rules:
5050
@@ -253,7 +253,7 @@ A browser worker is simply a new browser instance. A user can start multiple bro
253253

254254
> This call requires authentication. A `401 Unauthorized` response is given if an unauthorized request is made.
255255
256-
Once a worker has been spawned you can then control this browser instance remotely. You can also look at the testing session status at the automate dashboard: <http://www.browserstack.com/automate>. This will provide you the general details about the session and a live preview of the remote machine.
256+
Once a worker has been spawned you can then control this browser instance remotely. You can also look at the testing session status at the automate dashboard: <https://www.browserstack.com/automate>. This will provide you the general details about the session and a live preview of the remote machine.
257257

258258
### Parameters
259259
A valid request must contain a `os`, `os_version`, and a `url`. `timeout` is optional but defaults to 300 seconds.
@@ -277,7 +277,7 @@ A valid browser version. List of supported browser versions are given using the
277277
#### (timeout=30)
278278
A number in seconds before the worker is terminated. The default value is 300 seconds. Timeout = 0 also defaults to 300 seconds.
279279

280-
> IMPORTANT! Irrespective of timeout parameter, a browser worker is alive for a maximum time of 3600 seconds.
280+
> IMPORTANT! Irrespective of timeout parameter, a browser worker is alive for a maximum time of 1800 seconds.
281281
282282
#### (url)
283283
A valid url to navigate the browser to.
@@ -297,7 +297,7 @@ The response will be returned when the worker has been setup and initialized. Th
297297

298298
HTTP/1.1 200 Success
299299
Content-Type: application/json
300-
X-API-Version: 3
300+
X-API-Version: 4
301301

302302
{
303303
"id": "da39a3ee"

0 commit comments

Comments
 (0)