-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbrowserbase-openapi.yml
More file actions
329 lines (329 loc) · 9.77 KB
/
browserbase-openapi.yml
File metadata and controls
329 lines (329 loc) · 9.77 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
openapi: 3.1.0
info:
title: Browserbase API
description: >-
Browserbase exposes managed headless Chromium browser sessions, contexts,
projects, recordings, logs, and downloads for AI agents and web automation.
Requests authenticate via the X-BB-API-Key header.
version: v1
contact:
name: Browserbase
url: https://docs.browserbase.com
servers:
- url: https://api.browserbase.com/v1
description: Production
security:
- ApiKeyAuth: []
tags:
- name: Sessions
- name: Contexts
- name: Projects
- name: Extensions
paths:
/sessions:
post:
summary: Create a session
operationId: createSession
tags: [Sessions]
requestBody:
required: true
content:
application/json:
schema: { $ref: "#/components/schemas/SessionCreate" }
responses:
"201":
description: Created
content:
application/json: { schema: { $ref: "#/components/schemas/Session" } }
get:
summary: List sessions
operationId: listSessions
tags: [Sessions]
parameters:
- { name: status, in: query, schema: { type: string, enum: [RUNNING, ERROR, TIMED_OUT, COMPLETED] } }
responses:
"200":
description: List of sessions
content:
application/json:
schema:
type: array
items: { $ref: "#/components/schemas/Session" }
/sessions/{id}:
parameters:
- { name: id, in: path, required: true, schema: { type: string } }
get:
summary: Get a session
operationId: getSession
tags: [Sessions]
responses:
"200":
description: Session
content:
application/json: { schema: { $ref: "#/components/schemas/Session" } }
post:
summary: Update a session
operationId: updateSession
tags: [Sessions]
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
status: { type: string, enum: [REQUEST_RELEASE] }
responses:
"200":
description: Session updated
content:
application/json: { schema: { $ref: "#/components/schemas/Session" } }
/sessions/{id}/logs:
parameters:
- { name: id, in: path, required: true, schema: { type: string } }
get:
summary: Get session logs
operationId: getSessionLogs
tags: [Sessions]
responses:
"200":
description: Logs
content:
application/json:
schema:
type: array
items: { type: object }
/sessions/{id}/recording:
parameters:
- { name: id, in: path, required: true, schema: { type: string } }
get:
summary: Get session recording
operationId: getSessionRecording
tags: [Sessions]
responses:
"200":
description: Recording events
content:
application/json:
schema:
type: array
items: { type: object }
/sessions/{id}/downloads:
parameters:
- { name: id, in: path, required: true, schema: { type: string } }
get:
summary: Get session downloads
operationId: getSessionDownloads
tags: [Sessions]
responses:
"200":
description: Downloads zipped
content:
application/zip:
schema: { type: string, format: binary }
/sessions/{id}/debug:
parameters:
- { name: id, in: path, required: true, schema: { type: string } }
get:
summary: Get session debug URLs
operationId: getSessionDebug
tags: [Sessions]
responses:
"200":
description: Debug URLs
content:
application/json:
schema:
type: object
properties:
debuggerUrl: { type: string, format: uri }
debuggerFullscreenUrl: { type: string, format: uri }
wsUrl: { type: string }
/contexts:
post:
summary: Create a context
operationId: createContext
tags: [Contexts]
requestBody:
required: true
content:
application/json:
schema:
type: object
required: [projectId]
properties:
projectId: { type: string }
responses:
"200":
description: Context created
content:
application/json: { schema: { $ref: "#/components/schemas/Context" } }
/contexts/{id}:
parameters:
- { name: id, in: path, required: true, schema: { type: string } }
get:
summary: Get a context
operationId: getContext
tags: [Contexts]
responses:
"200":
description: Context
content:
application/json: { schema: { $ref: "#/components/schemas/Context" } }
put:
summary: Update a context
operationId: updateContext
tags: [Contexts]
responses:
"200":
description: Context updated
content:
application/json: { schema: { $ref: "#/components/schemas/Context" } }
/projects:
get:
summary: List projects
operationId: listProjects
tags: [Projects]
responses:
"200":
description: Projects
content:
application/json:
schema:
type: array
items: { $ref: "#/components/schemas/Project" }
/projects/{id}:
parameters:
- { name: id, in: path, required: true, schema: { type: string } }
get:
summary: Get a project
operationId: getProject
tags: [Projects]
responses:
"200":
description: Project
content:
application/json: { schema: { $ref: "#/components/schemas/Project" } }
/projects/{id}/usage:
parameters:
- { name: id, in: path, required: true, schema: { type: string } }
get:
summary: Get project usage
operationId: getProjectUsage
tags: [Projects]
responses:
"200":
description: Usage
content:
application/json: { schema: { type: object } }
/extensions:
post:
summary: Upload an extension
operationId: uploadExtension
tags: [Extensions]
requestBody:
required: true
content:
multipart/form-data:
schema:
type: object
properties:
file: { type: string, format: binary }
responses:
"200":
description: Extension uploaded
content:
application/json:
schema:
type: object
properties:
id: { type: string }
/extensions/{id}:
parameters:
- { name: id, in: path, required: true, schema: { type: string } }
get:
summary: Get an extension
operationId: getExtension
tags: [Extensions]
responses:
"200":
description: Extension
content:
application/json: { schema: { type: object } }
delete:
summary: Delete an extension
operationId: deleteExtension
tags: [Extensions]
responses:
"204": { description: Deleted }
components:
securitySchemes:
ApiKeyAuth:
type: apiKey
in: header
name: X-BB-API-Key
schemas:
SessionCreate:
type: object
required: [projectId]
properties:
projectId: { type: string }
extensionId: { type: string }
browserSettings:
type: object
properties:
context:
type: object
properties:
id: { type: string }
persist: { type: boolean }
viewport:
type: object
properties:
width: { type: integer }
height: { type: integer }
blockAds: { type: boolean }
solveCaptchas: { type: boolean }
recordSession: { type: boolean }
logSession: { type: boolean }
advancedStealth: { type: boolean }
os: { type: string, enum: [windows, mac, linux, mobile, tablet] }
ignoreCertificateErrors: { type: boolean }
timeout: { type: integer, minimum: 60, maximum: 21600 }
keepAlive: { type: boolean }
proxies: { oneOf: [{ type: boolean }, { type: array, items: { type: object } }] }
region: { type: string, enum: [us-west-2, us-east-1, eu-central-1, ap-southeast-1] }
userMetadata: { type: object, additionalProperties: true }
Session:
type: object
properties:
id: { type: string }
connectUrl: { type: string }
seleniumRemoteUrl: { type: string }
signingKey: { type: string }
status: { type: string, enum: [PENDING, RUNNING, ERROR, TIMED_OUT, COMPLETED] }
createdAt: { type: string, format: date-time }
updatedAt: { type: string, format: date-time }
startedAt: { type: string, format: date-time }
expiresAt: { type: string, format: date-time }
projectId: { type: string }
region: { type: string }
keepAlive: { type: boolean }
Context:
type: object
properties:
id: { type: string }
uploadUrl: { type: string, format: uri }
publicKey: { type: string }
cipherAlgorithm: { type: string }
initializationVectorSize: { type: integer }
Project:
type: object
properties:
id: { type: string }
name: { type: string }
ownerId: { type: string }
defaultTimeout: { type: integer }
concurrency: { type: integer }
createdAt: { type: string, format: date-time }
updatedAt: { type: string, format: date-time }