Create or idempotently resume a managed multipart upload.
using System.Net.Http.Headers;var client = new HttpClient();var request = new HttpRequestMessage{ Method = HttpMethod.Post, RequestUri = new Uri("https://example.com/api/workspace/files/uploads"), Content = new StringContent("{ \"TargetFolderId\": \"example\", \"RequestedFileName\": \"example\", \"DeclaredMimeType\": \"example\", \"DeclaredSizeBytes\": 1, \"ClientDeclaredSha256\": \"example\", \"IdempotencyKey\": \"example\", \"OwnerModuleKey\": \"example\", \"OwnerResourceKind\": \"example\", \"OwnerContextResourceId\": \"example\", \"OwnerResourceObjectId\": \"example\", \"Description\": \"example\" }") { Headers = { ContentType = new MediaTypeHeaderValue("application/json") } }};using (var response = await client.SendAsync(request)){ response.EnsureSuccessStatusCode(); var body = await response.Content.ReadAsStringAsync(); Console.WriteLine(body);}const url = 'https://example.com/api/workspace/files/uploads';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"TargetFolderId":"example","RequestedFileName":"example","DeclaredMimeType":"example","DeclaredSizeBytes":1,"ClientDeclaredSha256":"example","IdempotencyKey":"example","OwnerModuleKey":"example","OwnerResourceKind":"example","OwnerContextResourceId":"example","OwnerResourceObjectId":"example","Description":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/api/workspace/files/uploads \ --header 'Content-Type: application/json' \ --data '{ "TargetFolderId": "example", "RequestedFileName": "example", "DeclaredMimeType": "example", "DeclaredSizeBytes": 1, "ClientDeclaredSha256": "example", "IdempotencyKey": "example", "OwnerModuleKey": "example", "OwnerResourceKind": "example", "OwnerContextResourceId": "example", "OwnerResourceObjectId": "example", "Description": "example" }'Authorizations
Section titled “Authorizations”- None
Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”Optional access token for clients that cannot set Authorization headers. Prefer Authorization: Bearer <token> when possible.
Request Body
Section titled “Request Body”Request to create an S3-backed managed FileSystem upload.
object
Examplegenerated
{ "TargetFolderId": "example", "RequestedFileName": "example", "DeclaredMimeType": "example", "DeclaredSizeBytes": 1, "ClientDeclaredSha256": "example", "IdempotencyKey": "example", "OwnerModuleKey": "example", "OwnerResourceKind": "example", "OwnerContextResourceId": "example", "OwnerResourceObjectId": "example", "Description": "example"}Request to create an S3-backed managed FileSystem upload.
object
Examplegenerated
{ "TargetFolderId": "example", "RequestedFileName": "example", "DeclaredMimeType": "example", "DeclaredSizeBytes": 1, "ClientDeclaredSha256": "example", "IdempotencyKey": "example", "OwnerModuleKey": "example", "OwnerResourceKind": "example", "OwnerContextResourceId": "example", "OwnerResourceObjectId": "example", "Description": "example"}Request to create an S3-backed managed FileSystem upload.
object
Examplegenerated
{ "TargetFolderId": "example", "RequestedFileName": "example", "DeclaredMimeType": "example", "DeclaredSizeBytes": 1, "ClientDeclaredSha256": "example", "IdempotencyKey": "example", "OwnerModuleKey": "example", "OwnerResourceKind": "example", "OwnerContextResourceId": "example", "OwnerResourceObjectId": "example", "Description": "example"}Responses
Section titled “Responses”OK
object
Public state of a resumable managed file upload. PublishedFileReferenceId is non-null only once the session reaches Available.
object
One provider-confirmed uploaded part safe to expose for resume.
object
object
object
object
object
object
object
Example
{ "Data": { "Status": 0, "Errors": [ { "Type": 0, "Severity": 0 } ] }, "Errors": [ { "Type": 0, "Severity": 0 } ], "Warnings": [ { "Type": 0, "Severity": 0 } ]}Bad Request
object
Public state of a resumable managed file upload. PublishedFileReferenceId is non-null only once the session reaches Available.
object
One provider-confirmed uploaded part safe to expose for resume.
object
object
object
object
object
object
object
Example
{ "Data": { "Status": 0, "Errors": [ { "Type": 0, "Severity": 0 } ] }, "Errors": [ { "Type": 0, "Severity": 0 } ], "Warnings": [ { "Type": 0, "Severity": 0 } ]}Forbidden
object
Examplegenerated
{ "type": "example", "title": "example", "status": 1, "detail": "example", "instance": "example"}Not Found
object
Public state of a resumable managed file upload. PublishedFileReferenceId is non-null only once the session reaches Available.
object
One provider-confirmed uploaded part safe to expose for resume.
object
object
object
object
object
object
object
Example
{ "Data": { "Status": 0, "Errors": [ { "Type": 0, "Severity": 0 } ] }, "Errors": [ { "Type": 0, "Severity": 0 } ], "Warnings": [ { "Type": 0, "Severity": 0 } ]}Conflict
object
Public state of a resumable managed file upload. PublishedFileReferenceId is non-null only once the session reaches Available.
object
One provider-confirmed uploaded part safe to expose for resume.
object
object
object
object
object
object
object
Example
{ "Data": { "Status": 0, "Errors": [ { "Type": 0, "Severity": 0 } ] }, "Errors": [ { "Type": 0, "Severity": 0 } ], "Warnings": [ { "Type": 0, "Severity": 0 } ]}Too Many Requests
object
object
object
object
object
Example
{ "Errors": [ { "Type": 0, "Severity": 0 } ], "Warnings": [ { "Type": 0, "Severity": 0 } ]}Service Unavailable
object
Public state of a resumable managed file upload. PublishedFileReferenceId is non-null only once the session reaches Available.
object
One provider-confirmed uploaded part safe to expose for resume.
object
object
object
object
object
object
object
Example
{ "Data": { "Status": 0, "Errors": [ { "Type": 0, "Severity": 0 } ] }, "Errors": [ { "Type": 0, "Severity": 0 } ], "Warnings": [ { "Type": 0, "Severity": 0 } ]}