Skip to main content

File API

Version: 2.10.0
Preview

Upload a file

PUT
/file/v2/orgs/{organisation_id}/workspaces/{workspace_id}/files/path/{file_path}

Request an upload link for a new version of the specified file. If the folders in the file path do not exist, they will be created. If the file already exists, a new version will be created with the updated file content. Follow up a successful request with a call to the returned pre-signed upload link. Specify a binary body containing the file to upload, with the addition of header key-value pair x-ms-blob-type: BlockBlob. The upload link is pre-signed and will expire after 30 minutes.

Including a version_id parameter allows creating a link to data with uncommitted blocks, i.e. the upload has not been completed properly, or the original pre-signed link has expired. Uncommitted blocks are valid for up to one week, after which they are automatically deleted.

Request

Path parameters

Examples: "a/b/file.txt", "a/new%20file.txt"

Path to the file.

Example: "00000000-0000-0000-0000-000000000000"

The customer's organisation organisation ID.

Example: "00000000-0000-0000-0000-000000000000"

The ID of the workspace in the organization.

Query parameters

Example: "1223372036854775807"

(Optional) version ID to fetch a link for.

Responses

200

An object containing a pre-signed upload link. Submit the file content to the link.

file_iduuid
uploadstring
version_idint64
{
"file_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"upload": "string",
"version_id": "string"
}

400

/file-api/files/no-file-upload-in-progress

Unable to complete partial upload. The upload has already been completed.

/file-api/bad-request

Bad request. The server cannot or will not process the request due to a client error.

detailstring | null
statusinteger
Default: 400
titlestring
Default: "No file upload in progress"
typestring
Default: "https://seequent.com/error-codes/file-api/files/no-file-upload-in-progress"
detailstring | null
statusinteger
Default: 400
titlestring
Default: "Bad Request."
typestring
Default: "https://seequent.com/error-codes/file-api/bad-request"
{
"detail": "string",
"status": 400,
"title": "No file upload in progress",
"type": "https://seequent.com/error-codes/file-api/files/no-file-upload-in-progress"
}

401

/file-api/auth/missing-token

Unauthorized. The client request has not been completed as the provided credentials are invalid.

/file-api/auth/invalid-token

Forbidden. The client credentials are valid but do not permit access to this resource.

detailstring | null
statusinteger
Default: 401
titlestring
Default: "Access Denied."
typestring
Default: "https://seequent.com/error-codes/file-api/auth/missing-token"
detailstring | null
statusinteger
Default: 401
titlestring
Default: "Access Denied."
typestring
Default: "https://seequent.com/error-codes/file-api/auth/invalid-token"
{
"detail": "string",
"status": 401,
"title": "Access Denied.",
"type": "https://seequent.com/error-codes/file-api/auth/missing-token"
}

403

/file-api/auth/insufficient-role

Forbidden. The client credentials are valid but the client does not have a sufficient role to access to this resource.

detailstring | null
permitted_rolesarray
Default: []
statusinteger
Default: 403
titlestring
Default: "Insufficient Role."
typestring
Default: "https://seequent.com/error-codes/file-api/auth/insufficient-role"
your_rolestring
{
"detail": "string",
"permitted_roles": [
null
],
"status": 403,
"title": "Insufficient Role.",
"type": "https://seequent.com/error-codes/file-api/auth/insufficient-role",
"your_role": "string"
}

404

/file-api/files/not-found

Unable to complete partial upload. No file exists by this name.

detailstring | null
statusinteger
Default: 404
titlestring
Default: "File Not Found."
typestring
Default: "https://seequent.com/error-codes/file-api/files/not-found"
{
"detail": "string",
"status": 404,
"title": "File Not Found.",
"type": "https://seequent.com/error-codes/file-api/files/not-found"
}

422

/file-api/validation

The request was invalid and will not be processed due to a client error.

detailstring | null
statusinteger
Default: 422
titlestring
Default: "Validation Error."
typestring
Default: "https://seequent.com/error-codes/file-api/validation"
{
"detail": "string",
"status": 422,
"title": "Validation Error.",
"type": "https://seequent.com/error-codes/file-api/validation"
}

500

/file-api/api-errors

A server error has occurred.

detailstring | null
statusinteger
Default: 500
titlestring
Default: "An Error Occurred."
typestring
Default: "https://seequent.com/error-codes/file-api/api-errors"
{
"detail": "string",
"status": 500,
"title": "An Error Occurred.",
"type": "https://seequent.com/error-codes/file-api/api-errors"
}

502

/file-api/metadata/store-error

A database error occurred when uploading a file.

/file-api/bad-gateway

Bad gateway. A response required to handle the request is invalid.

detailstring | null
statusinteger
Default: 502
titlestring
Default: "File Metadata Storage Operation Failed."
typestring
Default: "https://seequent.com/error-codes/file-api/metadata/store-error"
detailstring | null
statusinteger
Default: 502
titlestring
Default: "Bad Gateway."
typestring
Default: "https://seequent.com/error-codes/file-api/bad-gateway"
{
"detail": "string",
"status": 502,
"title": "File Metadata Storage Operation Failed.",
"type": "https://seequent.com/error-codes/file-api/metadata/store-error"
}