Skip to main content

Upload

Upload a local file to the OSAPI Object Store for later deployment:

$ osapi client file upload --name app.conf --file /tmp/app.conf

Name: app.conf
SHA256: a1b2c3d4e5f6...
Size: 1234
Changed: true
Content-Type: raw

Upload a template file:

$ osapi client file upload --name app.conf.tmpl --file /tmp/app.conf.tmpl \
--content-type template

Re-uploading the same content is a no-op (Changed: false). If the file already exists with different content, the upload is rejected with a 409 Conflict. Use --force to overwrite:

$ osapi client file upload --name app.conf --file /tmp/app.conf --force

JSON Output

Use --json to get the full API response:

$ osapi client file upload --name app.conf --file /tmp/app.conf --json

Flags

FlagDescriptionDefault
--nameName for the file in the Object Store (required)
--filePath to the local file to upload (required)
--content-typeFile type: raw or templateraw
--forceForce upload even if file exists with different data
-j, --jsonOutput raw JSON response