|
169 | 169 | } |
170 | 170 | } |
171 | 171 | }, |
172 | | - "post": { |
| 172 | + "x-removed-buffered-post": { |
173 | 173 | "operationId": "uploadFile", |
174 | 174 | "summary": "Upload File", |
175 | 175 | "description": "Upload a file to a workspace as `multipart/form-data` with a single `file` field. The workspace — and the optional target `folderId` — are supplied as query parameters (not form fields) so authorization runs before the request body is buffered. Maximum file size is 100MB. A name already taken in the destination folder is **not** an error: the name is auto-suffixed (`data.csv` -> `data (1).csv`), matching the in-app uploader, so a `201` can come back with a `name` different from the one you sent — always read `name` from the response rather than assuming it. `409` is returned only if a unique name cannot be allocated after several attempts. Use `PATCH /api/v2/files/{fileId}` if you need a specific name to be exact-or-fail. Returns `201 Created`.\n\nPresigned upload is not part of the public API: it debits the storage quota only in a separate register step, so a caller that never registers would leave unaccounted bytes in storage. This buffered path debits inside the upload transaction.", |
|
315 | 315 | } |
316 | 316 | } |
317 | 317 | }, |
| 318 | + "/api/v2/files/uploads": { |
| 319 | + "post": { |
| 320 | + "operationId": "createFileUpload", |
| 321 | + "summary": "Create File Upload", |
| 322 | + "description": "Create a durable multipart upload session. Every file uses this flow; a small file is a single part. The maximum file size is 5 GB.", |
| 323 | + "tags": ["Files"], |
| 324 | + "requestBody": { |
| 325 | + "required": true, |
| 326 | + "content": { "application/json": { "schema": {} } } |
| 327 | + }, |
| 328 | + "responses": { |
| 329 | + "201": { |
| 330 | + "description": "The upload session.", |
| 331 | + "content": { "application/json": { "schema": {} } } |
| 332 | + }, |
| 333 | + "400": { "$ref": "#/components/responses/BadRequest" }, |
| 334 | + "401": { "$ref": "#/components/responses/Unauthorized" }, |
| 335 | + "403": { "$ref": "#/components/responses/Forbidden" }, |
| 336 | + "429": { "$ref": "#/components/responses/RateLimited" }, |
| 337 | + "500": { "$ref": "#/components/responses/InternalError" } |
| 338 | + } |
| 339 | + } |
| 340 | + }, |
| 341 | + "/api/v2/files/uploads/{uploadId}": { |
| 342 | + "get": { |
| 343 | + "operationId": "getFileUpload", |
| 344 | + "summary": "Get File Upload", |
| 345 | + "description": "Read the durable state of a file upload session.", |
| 346 | + "tags": ["Files"], |
| 347 | + "parameters": [ |
| 348 | + { |
| 349 | + "name": "uploadId", |
| 350 | + "in": "path", |
| 351 | + "required": true, |
| 352 | + "schema": { "type": "string" } |
| 353 | + }, |
| 354 | + { "$ref": "#/components/parameters/WorkspaceIdQuery" } |
| 355 | + ], |
| 356 | + "responses": { |
| 357 | + "200": { |
| 358 | + "description": "The upload session.", |
| 359 | + "content": { "application/json": { "schema": {} } } |
| 360 | + }, |
| 361 | + "401": { "$ref": "#/components/responses/Unauthorized" }, |
| 362 | + "404": { "$ref": "#/components/responses/NotFound" }, |
| 363 | + "429": { "$ref": "#/components/responses/RateLimited" }, |
| 364 | + "500": { "$ref": "#/components/responses/InternalError" } |
| 365 | + } |
| 366 | + }, |
| 367 | + "delete": { |
| 368 | + "operationId": "abortFileUpload", |
| 369 | + "summary": "Abort File Upload", |
| 370 | + "description": "Abort an incomplete upload and discard its provider parts.", |
| 371 | + "tags": ["Files"], |
| 372 | + "parameters": [ |
| 373 | + { |
| 374 | + "name": "uploadId", |
| 375 | + "in": "path", |
| 376 | + "required": true, |
| 377 | + "schema": { "type": "string" } |
| 378 | + }, |
| 379 | + { "$ref": "#/components/parameters/WorkspaceIdQuery" } |
| 380 | + ], |
| 381 | + "responses": { |
| 382 | + "200": { |
| 383 | + "description": "The aborted upload session.", |
| 384 | + "content": { "application/json": { "schema": {} } } |
| 385 | + }, |
| 386 | + "401": { "$ref": "#/components/responses/Unauthorized" }, |
| 387 | + "404": { "$ref": "#/components/responses/NotFound" }, |
| 388 | + "409": { "$ref": "#/components/responses/Conflict" }, |
| 389 | + "429": { "$ref": "#/components/responses/RateLimited" }, |
| 390 | + "500": { "$ref": "#/components/responses/InternalError" } |
| 391 | + } |
| 392 | + } |
| 393 | + }, |
| 394 | + "/api/v2/files/uploads/{uploadId}/parts": { |
| 395 | + "post": { |
| 396 | + "operationId": "createFileUploadPartUrls", |
| 397 | + "summary": "Create File Upload Part URLs", |
| 398 | + "description": "Issue short-lived signed PUT URLs for a bounded set of upload part numbers.", |
| 399 | + "tags": ["Files"], |
| 400 | + "parameters": [ |
| 401 | + { |
| 402 | + "name": "uploadId", |
| 403 | + "in": "path", |
| 404 | + "required": true, |
| 405 | + "schema": { "type": "string" } |
| 406 | + }, |
| 407 | + { "$ref": "#/components/parameters/WorkspaceIdQuery" } |
| 408 | + ], |
| 409 | + "requestBody": { |
| 410 | + "required": true, |
| 411 | + "content": { "application/json": { "schema": {} } } |
| 412 | + }, |
| 413 | + "responses": { |
| 414 | + "200": { |
| 415 | + "description": "Signed URLs for the requested parts.", |
| 416 | + "content": { "application/json": { "schema": {} } } |
| 417 | + }, |
| 418 | + "400": { "$ref": "#/components/responses/BadRequest" }, |
| 419 | + "401": { "$ref": "#/components/responses/Unauthorized" }, |
| 420 | + "404": { "$ref": "#/components/responses/NotFound" }, |
| 421 | + "409": { "$ref": "#/components/responses/Conflict" }, |
| 422 | + "429": { "$ref": "#/components/responses/RateLimited" }, |
| 423 | + "500": { "$ref": "#/components/responses/InternalError" } |
| 424 | + } |
| 425 | + } |
| 426 | + }, |
| 427 | + "/api/v2/files/uploads/{uploadId}/complete": { |
| 428 | + "post": { |
| 429 | + "operationId": "completeFileUpload", |
| 430 | + "summary": "Complete File Upload", |
| 431 | + "description": "Verify every part, assemble the object, and atomically register the workspace file.", |
| 432 | + "tags": ["Files"], |
| 433 | + "parameters": [ |
| 434 | + { |
| 435 | + "name": "uploadId", |
| 436 | + "in": "path", |
| 437 | + "required": true, |
| 438 | + "schema": { "type": "string" } |
| 439 | + }, |
| 440 | + { "$ref": "#/components/parameters/WorkspaceIdQuery" } |
| 441 | + ], |
| 442 | + "requestBody": { |
| 443 | + "required": true, |
| 444 | + "content": { "application/json": { "schema": {} } } |
| 445 | + }, |
| 446 | + "responses": { |
| 447 | + "200": { |
| 448 | + "description": "The completed upload and registered file.", |
| 449 | + "content": { "application/json": { "schema": {} } } |
| 450 | + }, |
| 451 | + "400": { "$ref": "#/components/responses/BadRequest" }, |
| 452 | + "401": { "$ref": "#/components/responses/Unauthorized" }, |
| 453 | + "404": { "$ref": "#/components/responses/NotFound" }, |
| 454 | + "409": { "$ref": "#/components/responses/Conflict" }, |
| 455 | + "429": { "$ref": "#/components/responses/RateLimited" }, |
| 456 | + "500": { "$ref": "#/components/responses/InternalError" } |
| 457 | + } |
| 458 | + } |
| 459 | + }, |
318 | 460 | "/api/v2/files/{fileId}": { |
319 | 461 | "get": { |
320 | 462 | "operationId": "downloadFile", |
|
0 commit comments