Skip to main content

Update a file

PUT
/file/v2/orgs/{organisation_id}/workspaces/{workspace_id}/files/{file_id}

Request an upload link for a new version of the specified file in blob storage. 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 as required by the MS Azure documentation. 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

Path parameters
file_iduuid
Required

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.

When set to false, the operation will attempt to restore a deleted file.

Responses

200

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

file_iduuid
uploadstring
version_idint64
created_atdate-time
created_byobject | null
deleted_atstring | null
deleted_byobject | null
downloadstring
etagstring
file_iduuid
modified_atdate-time
modified_byobject | null
namestring
pathstring
selfstring
sizeinteger
version_idint64
versionsarray | null

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_atdate-time
created_byobject | null
deleted_atstring | null
deleted_byobject | null
downloadstring
etagstring
file_iduuid
modified_atdate-time
modified_byobject | null
namestring
pathstring
selfstring
sizeinteger
version_idint64
versionsarray | null

400

/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: "Bad Request."
typestring
Default: "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.

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"

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

404

/file-api/files/not-found

File does not exist.

detailstring | null
statusinteger
Default: 404
titlestring
Default: "File Not Found."
typestring
Default: "https://seequent.com/error-codes/file-api/files/not-found"

409

/file-api/files/already-exists

Another file already exists at this path.

detailstring | null
statusinteger
Default: 409
titlestring
Default: "Invalid Request."
typestring
Default: "https://seequent.com/error-codes/file-api/files/already-exists"

410

/file-api/files/gone

File has been deleted.

detailstring | null
statusinteger
Default: 410
titlestring
Default: "The file has been deleted"
typestring
Default: "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.

detailstring | null
statusinteger
Default: 422
titlestring
Default: "Validation Error."
typestring
Default: "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"

502

/file-api/metadata/store-error

A database error occured when updating 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"

© Seequent, The Bentley Subsurface Company