Skip to main content

Upload a file

POST 

/file

Upload a file to the Object Store.

Request

Query Parameters

    force boolean

    When true, bypass the digest check and always write the file. Returns changed=true regardless of whether the content differs from the existing object.

Body

required

The file to upload.

    name stringrequired

    The name of the file in the Object Store.

    content_type string

    Possible values: [raw, template]

    Default value: raw

    How the file should be treated during deploy. "raw" writes bytes as-is; "template" renders with Go text/template and agent facts.

    file binaryrequired

    The file content.

Responses

File uploaded successfully.

Schema

    name stringrequired

    The name of the uploaded file.

    sha256 stringrequired

    SHA-256 hash of the file content.

    size integerrequired

    File size in bytes.

    changed booleanrequired

    Whether the file content changed. False when the Object Store already held an object with the same SHA-256 digest.

    content_type stringrequired

    How the file should be treated during deploy (raw or template).

Loading...