-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrunloop-objects-api-openapi.yml
More file actions
551 lines (551 loc) · 16.6 KB
/
runloop-objects-api-openapi.yml
File metadata and controls
551 lines (551 loc) · 16.6 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
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
openapi: 3.0.3
info:
title: Runloop Objects API
version: '0.1'
description: "Upload and manage Storage Objects \u2014 managed files with presigned download URLs that can be mounted into\
\ Devboxes or shared between agent runs."
contact:
name: Runloop AI Support
url: https://runloop.ai
email: support@runloop.ai
servers:
- url: https://api.runloop.ai
description: Runloop API
variables: {}
tags:
- name: objects
paths:
/v1/objects:
post:
tags:
- objects
summary: Create an Object.
description: Create a new Object with content and metadata. The Object will be assigned a unique ID.
operationId: createObject
parameters: []
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/ObjectCreateParameters'
required: false
responses:
'200':
description: Object created successfully. Returns the Object with metadata.
content:
application/json:
schema:
$ref: '#/components/schemas/ObjectView'
'400':
description: Bad request. Invalid content or parameters.
'401':
description: Unauthorized. Invalid or missing authentication.
'403':
description: Forbidden. Account does not have devbox capability.
'500':
description: Internal server error.
deprecated: false
get:
tags:
- objects
summary: List Objects.
description: List all Objects for the authenticated account with pagination support.
operationId: listObjects
parameters:
- name: limit
in: query
description: The limit of items to return. Default is 20. Max is 5000.
required: false
deprecated: false
allowEmptyValue: true
schema:
type: integer
format: int32
- name: starting_after
in: query
description: Load the next page of data starting after the item with the given ID.
required: false
deprecated: false
allowEmptyValue: true
schema:
type: string
- name: name
in: query
description: Filter storage objects by name (partial match supported).
required: false
deprecated: false
allowEmptyValue: true
schema:
type: string
- name: content_type
in: query
description: Filter storage objects by content type.
required: false
deprecated: false
allowEmptyValue: true
schema:
$ref: '#/components/schemas/ContentType'
- name: state
in: query
description: Filter storage objects by state.
required: false
deprecated: false
allowEmptyValue: true
schema:
$ref: '#/components/schemas/ObjectState'
- name: search
in: query
description: Search by object ID or name.
required: false
deprecated: false
allowEmptyValue: true
schema:
type: string
- name: include_total_count
in: query
description: If true (default), includes total_count in the response. Set to false to skip the count query for better
performance on large datasets.
required: false
deprecated: false
allowEmptyValue: true
schema:
type: boolean
responses:
'200':
description: Successfully retrieved list of Objects.
content:
application/json:
schema:
$ref: '#/components/schemas/ObjectListView'
'401':
description: Unauthorized. Invalid or missing authentication.
'403':
description: Forbidden. Account does not have devbox capability.
'500':
description: Internal server error.
deprecated: false
/v1/objects/list_public:
get:
tags:
- objects
summary: List Public Objects.
description: List all public Objects with pagination support.
operationId: listPublicObjects
parameters:
- name: limit
in: query
description: The limit of items to return. Default is 20. Max is 5000.
required: false
deprecated: false
allowEmptyValue: true
schema:
type: integer
format: int32
- name: starting_after
in: query
description: Load the next page of data starting after the item with the given ID.
required: false
deprecated: false
allowEmptyValue: true
schema:
type: string
- name: name
in: query
description: Filter storage objects by name (partial match supported).
required: false
deprecated: false
allowEmptyValue: true
schema:
type: string
- name: content_type
in: query
description: Filter storage objects by content type.
required: false
deprecated: false
allowEmptyValue: true
schema:
$ref: '#/components/schemas/ContentType'
- name: state
in: query
description: Filter storage objects by state.
required: false
deprecated: false
allowEmptyValue: true
schema:
$ref: '#/components/schemas/ObjectState'
- name: search
in: query
description: Search by object ID or name.
required: false
deprecated: false
allowEmptyValue: true
schema:
type: string
- name: include_total_count
in: query
description: If true (default), includes total_count in the response. Set to false to skip the count query for better
performance on large datasets.
required: false
deprecated: false
allowEmptyValue: true
schema:
type: boolean
responses:
'200':
description: Successfully retrieved list of public Objects.
content:
application/json:
schema:
$ref: '#/components/schemas/ObjectListView'
'401':
description: Unauthorized. Invalid or missing authentication.
'403':
description: Forbidden. Account does not have devbox capability.
'500':
description: Internal server error.
deprecated: false
/v1/objects/metadata/keys:
get:
tags:
- objects
summary: List available object metadata keys.
description: Returns a list of all available metadata keys that can be used for filtering objects.
operationId: getObjectMetadataKeys
parameters: []
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/MetadataKeysView'
deprecated: false
/v1/objects/metadata/keys/{key}/values:
get:
tags:
- objects
summary: List values for a specific object metadata key.
description: Returns a list of all values that exist for a specific metadata key across all objects.
operationId: getObjectMetadataValues
parameters:
- name: key
in: path
description: The metadata key to get values for.
required: true
deprecated: false
allowEmptyValue: false
schema:
type: string
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/MetadataValuesView'
'400':
description: Invalid metadata key provided.
deprecated: false
/v1/objects/{id}:
get:
tags:
- objects
summary: Get an Object.
description: Retrieve a specific Object by its unique identifier.
operationId: getObject
parameters:
- name: id
in: path
description: The unique identifier of the Object to retrieve.
required: true
deprecated: false
allowEmptyValue: false
schema:
type: string
responses:
'200':
description: Object retrieved successfully.
content:
application/json:
schema:
$ref: '#/components/schemas/ObjectView'
'401':
description: Unauthorized. Invalid or missing authentication.
'403':
description: Forbidden. Account does not have devbox capability.
'404':
description: Object not found.
'500':
description: Internal server error.
deprecated: false
/v1/objects/{id}/complete:
post:
tags:
- objects
summary: Complete Object Upload.
description: Mark an Object's upload as complete, transitioning it from UPLOADING to READ-only state.
operationId: completeObject
parameters:
- name: id
in: path
description: The unique identifier of the Object to complete.
required: true
deprecated: false
allowEmptyValue: false
schema:
type: string
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/EmptyRecord'
required: false
responses:
'200':
description: Object upload completed successfully. Returns the Object with updated state.
content:
application/json:
schema:
$ref: '#/components/schemas/ObjectView'
'401':
description: Unauthorized. Invalid or missing authentication.
'403':
description: Forbidden. Account does not have devbox capability.
'404':
description: Object not found.
'409':
description: Object is not in UPLOADING state.
'500':
description: Internal server error.
deprecated: false
/v1/objects/{id}/delete:
post:
tags:
- objects
summary: Delete an Object.
description: Delete an existing Object by ID. This action is irreversible and will remove the Object and all its metadata.
operationId: deleteObject
parameters:
- name: id
in: path
description: The unique identifier of the Object to delete.
required: true
deprecated: false
allowEmptyValue: false
schema:
type: string
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/EmptyRecord'
required: false
responses:
'200':
description: Object deleted successfully. Returns the deleted Object metadata.
content:
application/json:
schema:
$ref: '#/components/schemas/ObjectView'
'401':
description: Unauthorized. Invalid or missing authentication.
'403':
description: Forbidden. Account does not have devbox capability.
'404':
description: Object not found.
'500':
description: Internal server error.
deprecated: false
/v1/objects/{id}/download:
get:
tags:
- objects
summary: Generate Download URL for Object.
description: Generate a presigned download URL for an Object. The URL will be valid for the specified duration.
operationId: generateDownloadUrl
parameters:
- name: id
in: path
description: The unique identifier of the Object to generate download URL for.
required: true
deprecated: false
allowEmptyValue: false
schema:
type: string
- name: duration_seconds
in: query
description: 'Duration in seconds for the presigned URL validity (default: 3600).'
required: false
deprecated: false
allowEmptyValue: true
schema:
type: integer
format: int64
responses:
'200':
description: Download URL generated successfully.
content:
application/json:
schema:
$ref: '#/components/schemas/ObjectDownloadUrlView'
'400':
description: Bad request. Object is in deleted state or invalid parameters.
'401':
description: Unauthorized. Invalid or missing authentication.
'403':
description: Forbidden. Account does not have devbox capability.
'404':
description: Object not found.
'500':
description: Internal server error.
deprecated: false
components:
schemas:
ContentType:
type: string
enum:
- unspecified
- text
- binary
- gzip
- tar
- tgz
EmptyRecord:
type: object
additionalProperties: false
properties: {}
MetadataKeysView:
type: object
additionalProperties: false
properties:
keys:
type: array
items:
type: string
MetadataValuesView:
type: object
additionalProperties: false
properties:
key:
type: string
values:
type: array
items:
type: string
ObjectCreateParameters:
type: object
additionalProperties: false
description: Parameters required to create a new Object.
properties:
name:
type: string
description: The name of the Object.
content_type:
$ref: '#/components/schemas/ContentType'
description: The content type of the Object.
metadata:
type: object
additionalProperties:
type: string
nullable: true
description: User defined metadata to attach to the object for organization.
ttl_ms:
type: integer
format: int64
nullable: true
description: Optional lifetime of the object in milliseconds, after which the object is automatically deleted. Time
starts ticking after the object is created.
required:
- name
- content_type
ObjectDownloadUrlView:
type: object
additionalProperties: false
description: A response containing a presigned download URL for an Object.
properties:
download_url:
type: string
description: The presigned download URL for the Object.
required:
- download_url
ObjectListView:
type: object
additionalProperties: false
description: A paginated list of Objects.
properties:
objects:
type: array
items:
$ref: '#/components/schemas/ObjectView'
description: List of Object entities.
has_more:
type: boolean
description: True if there are more results available beyond this page.
total_count:
type: integer
format: int32
nullable: true
description: Total number of Objects across all pages.
required:
- objects
- has_more
ObjectState:
type: string
enum:
- UPLOADING
- READ_ONLY
- DELETED
- ERROR
ObjectView:
type: object
additionalProperties: false
description: An Object represents a stored data entity with metadata.
properties:
id:
type: string
description: The unique identifier of the Object.
name:
type: string
description: The name of the Object.
state:
$ref: '#/components/schemas/ObjectState'
description: The current state of the Object.
size_bytes:
type: integer
format: int64
nullable: true
description: The size of the Object content in bytes (null until uploaded).
content_type:
$ref: '#/components/schemas/ContentType'
description: The content type of the Object.
create_time_ms:
type: integer
format: int64
description: The creation time of the Object in milliseconds since epoch.
delete_after_time_ms:
type: integer
format: int64
nullable: true
description: The time after which the Object will be deleted in milliseconds since epoch.
metadata:
type: object
additionalProperties:
type: string
nullable: true
description: User defined metadata to attach to the Object for organization.
upload_url:
type: string
nullable: true
description: Presigned URL for uploading content to S3 (only present on create).
required:
- id
- name
- state
- content_type
- create_time_ms
securitySchemes:
bearerAuth:
scheme: bearer
type: http
security:
- bearerAuth: []