OpenStack Swift icon

OpenStack Swift

Interact with OpenStack Swift

object → Create Object

AI-generated

Summary

Create an object in an OpenStack Swift container

Inputs

  • container (required) — Name of the container where the object will be stored
  • objectName (required) — Name of the object to create
  • fileType (required) — Content type of the object, either 'text' or 'binary'
  • contentText (required) — Text content to store; used only when fileType is 'text'
  • binaryPropertyName (required) — Name of the binary property that holds the file data
  • contentType (required) — MIME type of the object (default: application/octet-stream)
  • customAuthToken (required) — Custom authentication token for storage (optional password)
  • customStorageUrl (required) — Custom storage URL to override the default endpoint

Output shape

a created object record

Returns the metadata of the newly created object, typically including fields such as id, name, size, and etag.

Examples

Example 1: Create a text file named hello.txt in container mybucket

container=mybucket&objectName=hello.txt&fileType=text&contentText=Hello%20world

Example 2: Upload binary data using a binary property called data

container=images&objectName=logo.png&fileType=binary&binaryPropertyName=data&contentType=image/png

Example 3: Use custom credentials and endpoint

customAuthToken=abcd1234&customStorageUrl=https://swift.example.com&container=data&objectName=file.bin&fileType=binary&binaryPropertyName=data

Discussion