Update a file
Request an upload link for a new version of the specified file.
If the file does not exist an error will be returned.
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 a blob 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.
Including a deleted parameter with a value of false will restore a deleted file.
Request
Responses
200
An object containing a pre-signed upload link. Submit the file content to the link.
{
"file_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"upload": "string",
"version_id": "string"
}
204
The file has been restored. The location of the resource has not changed.
303
The file has been restored. Location of the resource has changed (e.g., rename on restore).
{
"created_at": "2024-07-29T15:51:28.071Z",
"created_by": {
"email": "string",
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"name": "string"
},
"deleted_at": "2024-07-29T15:51:28.071Z",
"deleted_by": {
"email": "string",
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"name": "string"
},
"download": "string",
"etag": "string",
"file_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"modified_at": "2024-07-29T15:51:28.071Z",
"modified_by": {
"email": "string",
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"name": "string"
},
"name": "string",
"path": "string",
"self": "string",
"size": 0,
"version_id": "string",
"versions": [
{
"created_at": "2024-07-29T15:51:28.071Z",
"created_by": {
"email": "string",
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"name": "string"
},
"file_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"link": "string",
"name": "string",
"path": "string",
"size": 0,
"version_id": "string"
}
]
}
400
/file-api/bad-request
Bad request. The server cannot or will not process the request due to a client error.
400"Bad Request.""https://seequent.com/error-codes/file-api/bad-request"{
"detail": "string",
"status": 400,
"title": "Bad Request.",
"type": "https://seequent.com/error-codes/file-api/bad-request"
}
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.
401"Access Denied.""https://seequent.com/error-codes/file-api/auth/missing-token"401"Access Denied.""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.
[]403"Insufficient Role.""https://seequent.com/error-codes/file-api/auth/insufficient-role"{
"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
File does not exist.
404"File Not Found.""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"
}
409
/file-api/files/already-exists
Another file already exists at this path.
409"Invalid Request.""https://seequent.com/error-codes/file-api/files/already-exists"{
"detail": "string",
"status": 409,
"title": "Invalid Request.",
"type": "https://seequent.com/error-codes/file-api/files/already-exists"
}
410
/file-api/files/gone
File has been deleted.
410"The file has been deleted""https://seequent.com/error-codes/file-api/files/gone"{
"detail": "string",
"status": 410,
"title": "The file has been deleted",
"type": "https://seequent.com/error-codes/file-api/files/gone"
}
422
/file-api/validation
The request was invalid and will not be processed due to a client error.
422"Validation Error.""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.
500"An Error Occurred.""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 updating a file.
/file-api/bad-gateway
Bad gateway. A response required to handle the request is invalid.
502"File Metadata Storage Operation Failed.""https://seequent.com/error-codes/file-api/metadata/store-error"502"Bad Gateway.""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"
}