Skip to navigation

Create or overwrite file

Create a non-empty file or overwrite an existing file.

If the parent folder of the path parameter doesn’t exist, the file system creates it before creating the file.

This acts on files in the AI Hub filesystem, not your local filesystem.
Ensure the path is accessible within the context defined by the IB-Context header.

Not all filesystem types support this operation.

FilesystemSupported
Instabase✓
Amazon S3✓
Azure Blob Storage✓
Google Cloud Storage✓
Google Drive-

Authentication

AuthorizationBearer
Bearer HTTP authentication.

Path parameters

pathstringRequired
Full path to the file.

Headers

IB-ContextstringOptional

Typically your organization ID. See Authorization and context identification for details.

Request

This endpoint expects binary data of type application/octet-stream.

Response headers

LocationstringOptional
Contains a URL leading to the created file.

Response

The request succeeded and a new file was created at the target location. AI Hub returns this status code only when the request includes an If-None-Match header with a value of *.

Errors

412
Precondition Failed Error