Skip to content

Commit 219e9a8

Browse files
committed
adding api response file
1 parent 9163fec commit 219e9a8

File tree

1 file changed

+314
-0
lines changed

1 file changed

+314
-0
lines changed

internal/automate-v1.apib

Lines changed: 314 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,314 @@
1+
FORMAT: 1A
2+
3+
# BrowserStack Automate API
4+
5+
6+
## Auth Error [/current-auth-error]
7+
8+
Response format for errors.
9+
10+
### Auth Error Format [GET]
11+
12+
+ Response 401 (text/plain)
13+
14+
HTTP Basic: Access denied.
15+
16+
17+
## General Error Format [/error-format]
18+
19+
Response format for all errors.
20+
21+
### Auth Error Format [GET]
22+
23+
+ Response 401 (application/json)
24+
25+
{
26+
"error": {
27+
"code": 401,
28+
"message": "Access denied."
29+
}
30+
}
31+
32+
33+
## Account Usage [/automate/plan.json]
34+
35+
User Account usage.
36+
37+
### Get Account Usage [GET]
38+
39+
+ Response 200 (application/json)
40+
41+
{
42+
"automate_plan": "Basic",
43+
"parallel_sessions_running": 0,
44+
"parallel_sessions_max_allowed": 85
45+
}
46+
47+
## Browsers [/automate/browsers.json]
48+
49+
Browser Listing for Automate.
50+
51+
### Get Browsers [GET]
52+
53+
+ Response 200 (application/json)
54+
55+
[
56+
{
57+
"browser": "chrome",
58+
"device": null,
59+
"os": "Windows",
60+
"os_version": "XP",
61+
"browser_version": "14.0"
62+
}, {
63+
"browser": "chrome",
64+
"device": null,
65+
"os": "Windows",
66+
"os_version": "XP",
67+
"browser_version": "15.0"
68+
}
69+
]
70+
71+
72+
## Projects [/automate/projects.json]
73+
74+
### Get Projects [GET]
75+
76+
+ Response 200 (application/json)
77+
78+
[
79+
{
80+
"automation_project": {
81+
"group_id": 2,
82+
"updated_at": "2016-04-02T10:34:59Z",
83+
"user_id": 1333125,
84+
"name": "Untitled Project",
85+
"created_at": "2013-06-23T12:46:31Z",
86+
"id": 1
87+
}
88+
},
89+
{
90+
"automation_project": {
91+
"group_id": 2,
92+
"updated_at": "2014-04-06T17:49:25Z",
93+
"user_id": 289536,
94+
"name": "some",
95+
"created_at": "2013-06-24T07:37:46Z",
96+
"id": 3
97+
}
98+
}
99+
]
100+
101+
102+
## Project [/automate/projects/{project_id}.json]
103+
104+
## Get Project [GET]
105+
106+
+ Response 200 (application/json)
107+
108+
{
109+
"project": {
110+
"group_id": 2,
111+
"name": "Untitled Project",
112+
"created_at": "2013-06-23T12:46:31Z",
113+
"updated_at": "2016-04-02T10:34:59Z",
114+
"id": 1,
115+
"user_id": 1333125,
116+
"builds": [
117+
{
118+
"automation_build": {
119+
"hashed_id": "b9fbe57805168fc5a86860547a7458aff1fe621d",
120+
"automation_project_id": 1,
121+
"group_id": 2,
122+
"name": "JSTst",
123+
"status": "timeout",
124+
"created_at": "2014-07-15T08:25:39Z",
125+
"updated_at": "2016-04-01T16:06:23Z",
126+
"delta": false,
127+
"id": 806249,
128+
"duration": null,
129+
"tags": null,
130+
"user_id": 786930
131+
}
132+
},
133+
{
134+
"automation_build": {
135+
"hashed_id": "2b49772a1fcf4e09edb93d1e1d534ef3626ccf13",
136+
"automation_project_id": 1,
137+
"group_id": 2,
138+
"name": "Protractor",
139+
"status": "failed",
140+
"created_at": "2014-09-29T15:06:35Z",
141+
"updated_at": "2016-03-29T15:11:21Z",
142+
"delta": false,
143+
"id": 1215501,
144+
"duration": 47261086,
145+
"tags": null,
146+
"user_id": 788532
147+
}
148+
}
149+
]
150+
}
151+
}
152+
153+
154+
## Builds [/automate/builds.json]
155+
156+
### Get Builds [GET]
157+
158+
+ Response 200 (application/json)
159+
160+
[
161+
{
162+
"automation_build": {
163+
"status": "failed",
164+
"duration": 3122602,
165+
"hashed_id": "588e3b5df03e2184a68677ace8bb46d7b2b307a0",
166+
"name": "build"
167+
}
168+
},
169+
{
170+
"automation_build": {
171+
"status": "failed",
172+
"duration": null,
173+
"hashed_id": "a6101425773bab5dfb19e7b821c018b376913de2",
174+
"name": "Untitled Build"
175+
}
176+
}
177+
]
178+
179+
180+
## Build [/automate/builds/{build_id}.json]
181+
182+
### Get Build [GET]
183+
184+
+ Response 200 (application/json)
185+
186+
{
187+
"build": {
188+
"automation_build": {
189+
"name": "build",
190+
"hashed_id": "588e3b5df03e2184a68677ace8bb46d7b2b307a0",
191+
"status": "failed",
192+
"duration": 3122602
193+
},
194+
"sessions": [
195+
{
196+
"automation_session": {
197+
"name": null,
198+
"os_version": "7",
199+
"os": "Windows",
200+
"hashed_id": "5797d41492c4d425f5e8ecde6c7c87d5cabd271a",
201+
"status": "done",
202+
"browser": "ie",
203+
"duration": 29,
204+
"project_name": "Untitled Project",
205+
"build_name": "build",
206+
"device": null,
207+
"reason": null,
208+
"browser_version": "9.0"
209+
}
210+
},
211+
{
212+
"automation_session": {
213+
"name": null,
214+
"os_version": "El Capitan",
215+
"os": "OS X",
216+
"hashed_id": "613d6e68681dc8e595ebdb886616efd893402a92",
217+
"status": "done",
218+
"browser": "chrome",
219+
"duration": 23,
220+
"project_name": "Untitled Project",
221+
"build_name": "build",
222+
"device": null,
223+
"reason": null,
224+
"browser_version": "49.0"
225+
}
226+
}
227+
]
228+
}
229+
}
230+
231+
232+
## Sessions [/automate/builds/{build_id}/sessions.json]
233+
234+
### Get Build Sessions [GET]
235+
236+
+ Response 200 (application/json)
237+
238+
[
239+
{
240+
"automation_session": {
241+
"name": null,
242+
"os_version": "7",
243+
"video_url": "https://bs-video-logs-euw.s3-eu-west-1.amazonaws.com/5797d41492c4d425f5e8ecde6c7c87d5cabd271a/video-5797d41492c4d425f5e8ecde6c7c87d5cabd271a.mp4?AWSAccessKeyId=AKIAJRYJ4U7UXXFIHWLQ&Expires=1467661614&Signature=n7Tf9mI%2FeI%2Fsvu2RnonS3OKpS%2B0%3D&response-content-disposition=attachment&response-content-type=video%2Fmp4",
244+
"browser_url": "https://www.browserstack.com/automate/builds/588e3b5df03e2184a68677ace8bb46d7b2b307a0/sessions/5797d41492c4d425f5e8ecde6c7c87d5cabd271a",
245+
"os": "Windows",
246+
"hashed_id": "5797d41492c4d425f5e8ecde6c7c87d5cabd271a",
247+
"status": "done",
248+
"browser": "ie",
249+
"duration": 29,
250+
"project_name": "Untitled Project",
251+
"build_name": "build",
252+
"device": null,
253+
"logs": "https://www.browserstack.com/automate/builds/588e3b5df03e2184a68677ace8bb46d7b2b307a0/sessions/5797d41492c4d425f5e8ecde6c7c87d5cabd271a/logs",
254+
"reason": null,
255+
"browser_version": "9.0"
256+
}
257+
},
258+
{
259+
"automation_session": {
260+
"name": null,
261+
"os_version": "El Capitan",
262+
"video_url": "https://bs-video-logs-euw.s3-eu-west-1.amazonaws.com/613d6e68681dc8e595ebdb886616efd893402a92/video-613d6e68681dc8e595ebdb886616efd893402a92.mp4?AWSAccessKeyId=AKIAJRYJ4U7UXXFIHWLQ&Expires=1467661584&Signature=ILvEnyb1gRP7cfQL%2BYB8E190lzo%3D&response-content-disposition=attachment&response-content-type=video%2Fmp4",
263+
"browser_url": "https://www.browserstack.com/automate/builds/588e3b5df03e2184a68677ace8bb46d7b2b307a0/sessions/613d6e68681dc8e595ebdb886616efd893402a92",
264+
"os": "OS X",
265+
"hashed_id": "613d6e68681dc8e595ebdb886616efd893402a92",
266+
"status": "done",
267+
"browser": "chrome",
268+
"duration": 23,
269+
"project_name": "Untitled Project",
270+
"build_name": "build",
271+
"device": null,
272+
"logs": "https://www.browserstack.com/automate/builds/588e3b5df03e2184a68677ace8bb46d7b2b307a0/sessions/613d6e68681dc8e595ebdb886616efd893402a92/logs",
273+
"reason": null,
274+
"browser_version": "49.0"
275+
}
276+
}
277+
]
278+
279+
280+
## Session [/automate/sessions/{session_id}.json]
281+
282+
### Get Build Session [GET]
283+
284+
+ Response 200 (application/json)
285+
286+
{
287+
"automation_session": {
288+
"device": null,
289+
"duration": 29,
290+
"browser": "ie",
291+
"os_version": "7",
292+
"hashed_id": "5797d41492c4d425f5e8ecde6c7c87d5cabd271a",
293+
"browser_version": "9.0",
294+
"video_url": "https://bs-video-logs-euw.s3-eu-west-1.amazonaws.com/5797d41492c4d425f5e8ecde6c7c87d5cabd271a/video-5797d41492c4d425f5e8ecde6c7c87d5cabd271a.mp4?AWSAccessKeyId=AKIAJRYJ4U7UXXFIHWLQ&Expires=1467661614&Signature=n7Tf9mI%2FeI%2Fsvu2RnonS3OKpS%2B0%3D&response-content-disposition=attachment&response-content-type=video%2Fmp4",
295+
"logs": "https://www.browserstack.com/automate/builds/588e3b5df03e2184a68677ace8bb46d7b2b307a0/sessions/5797d41492c4d425f5e8ecde6c7c87d5cabd271a/logs",
296+
"name": null,
297+
"project_name": "Untitled Project",
298+
"browser_url": "https://www.browserstack.com/automate/builds/588e3b5df03e2184a68677ace8bb46d7b2b307a0/sessions/5797d41492c4d425f5e8ecde6c7c87d5cabd271a",
299+
"status": "done",
300+
"reason": null,
301+
"os": "Windows",
302+
"build_name": "build"
303+
}
304+
}
305+
306+
307+
## Session Logs [/automate/builds/{build_id}/sessions/{session_id}/logs]
308+
309+
### Get Build Session Logs [GET]
310+
311+
+ Response 200 (text/plain)
312+
313+
2016-04-03 03:03:34:396 REQUEST [2016-04-03 03:03:34:396] POST /session/5797d41492c4d425f5e8ecde6c7c87d5cabd271a/url {"url":"http://localhost:7357/8975/tests/index.html?hidepassed"}
314+
2016-04-03 03:03:34:396 RESPONSE {"state":"success","sessionId":"5797d41492c4d425f5e8ecde6c7c87d5cabd271a","status":0,"value":null}

0 commit comments

Comments
 (0)