Object Storage Functions
Object storage provides a distributed key-value store for managing data across your flows. Built on a replicated storage backend, it’s designed for reliable data persistence with configurable storage options.What is Object Storage? Object storage is a key-value store optimized for distributed data management. Each bucket acts as a namespace for storing values by unique keys, with options for compression, replication, and automatic expiration.
Function List
obs-bucket-create
Create a new storage bucket
obs-bucket-list
List all storage buckets
obs-key-put
Store a value by key
obs-key-get
Retrieve a value by key
obs-key-list
List keys in a bucket
obs-bucket-create
Create a new object storage bucket to organize and store your data. Buckets provide isolated namespaces with configurable storage, replication, and lifecycle settings.Parameters
Name of the bucket to create. Must be unique and can only contain alphanumeric characters, dashes, and underscores.Naming conventions:
- Use lowercase with hyphens or underscores:
customer-data,session_cache - Be descriptive:
user-profilesnotbucket1 - Include purpose:
temp-uploads,config-store
Optional description of the bucket’s purpose.
Storage backend type. Options:
file- Persistent file storage (default, recommended for durability)memory- In-memory storage (faster but not persistent across restarts)
Number of data replicas to maintain across the cluster. Range: 1-5.Replication guidelines:
- 1 replica: Development or non-critical data
- 3 replicas: Production data requiring high availability
- 5 replicas: Mission-critical data with maximum redundancy
Maximum size in bytes for the bucket. Default is -1 (unlimited).Size planning:
- Set limits for temporary storage to prevent unbounded growth
- Leave unlimited for primary data stores
- Consider setting based on available storage capacity
Time-to-live in nanoseconds for keys in this bucket. Keys automatically expire after this duration. By default, keys do not expire.Common TTL values:
- 3600000000000 (1 hour) for session data
- 86400000000000 (24 hours) for temporary cache
- 604800000000000 (7 days) for short-term storage
Enable stream compression to reduce storage space. Useful for text-heavy data or JSON objects.
Custom metadata key-value pairs to associate with the bucket.
Cluster placement configuration for advanced deployment scenarios.Properties:
cluster(string): Target cluster nametags(array): Array of placement tags
Response
Example Usage
Common Use Cases
User Data Storage
User Data Storage
Store user profiles, preferences, and state
Session Management
Session Management
Store temporary session data with auto-expiration
Configuration Cache
Configuration Cache
Store application configuration and settings
Workflow State
Workflow State
Store state data for long-running workflows
obs-bucket-list
List all object storage buckets in your account with their metadata and statistics.Parameters
This function takes no parameters.Response
results_total- Total number of bucketsresults- Array of bucket objects:name- Bucket namedescription- Bucket descriptioncreated- Creation timestamp (milliseconds)entryTotal- Number of keys in bucketmetadata- Custom metadata
Example Usage
obs-key-put
Store a value in an object storage bucket by key. Values can be strings or JSON objects.Parameters
Name of the bucket to store the value in. Bucket must already exist.
Unique key name for the value. This is the identifier used to retrieve the value.Key naming strategies:
- User data:
user:${userId}:profile - Hierarchical:
config/app/database/connection - Timestamped:
events/2025-10-16/event-123 - UUID-based: Use UUIDs for guaranteed uniqueness
The value to store. Can be:
- A string value (will be stored as-is)
- A JSON object (will be automatically serialized)
Objects are automatically converted to JSON strings during storage. When retrieving, use the
json flag to parse back to objects.Response
Example Usage
Common Patterns
User State Management
User State Management
Store and update user state across flows
Workflow Checkpoints
Workflow Checkpoints
Save workflow state for resumption or recovery
Data Aggregation
Data Aggregation
Accumulate data over time
obs-key-get
Retrieve a value from an object storage bucket by its key.Parameters
Name of the bucket containing the key.
The key name of the value to retrieve.
Parse the stored value as JSON and return as an object. Use
true when retrieving values that were stored as objects.When to use:- Set to
truewhen the value is a JSON object - Set to
false(or omit) when the value is a plain string
Response
body.body.name- The key namebody.body.value- The stored value (string or parsed object based onjsonparameter)body.metadata.Bucket- The bucket name
Example Usage
Common Patterns
Load User Context
Load User Context
Retrieve user data at the start of a flow
Resume Workflow
Resume Workflow
Load saved state to continue a workflow
Configuration Loading
Configuration Loading
Load application settings and configuration
obs-key-list
List all keys in an object storage bucket with pagination support.Parameters
Name of the bucket to list keys from.
Starting sequence number for pagination. Returns keys after this sequence. Omit or use 0 for the first page.Use the
modified value from the last result in the previous page to continue pagination.Maximum number of keys to return per page. Controls result set size for pagination.
Response
results_total- Total number of keys in bucketresults- Array of key objects:name- Key namebuid- Unique identifiersize- Size in byteschunks- Number of chunksmodified- Last modified timestamp (milliseconds) - use forlast_sequencein next page
Example Usage
Common Patterns
Batch Processing
Batch Processing
Process all keys in a bucket sequentially
Data Audit
Data Audit
Audit or report on stored data
Cleanup Operations
Cleanup Operations
Find and remove old or unused keys
Best Practices
Use Descriptive Keys
Use clear, hierarchical key naming patterns
Enable Replication
Use 3+ replicas for production data
Set TTL for Temp Data
Auto-expire temporary data to save storage
Use JSON Flag
Set json=true when retrieving objects
Compress Text Data
Enable compression for JSON/text buckets
Paginate Large Lists
Use limit and last_sequence for large datasets
Storage Types Comparison
| Feature | File Storage | Memory Storage |
|---|---|---|
| Persistence | Survives restarts | Lost on restart |
| Speed | Moderate | Very fast |
| Capacity | Large | Limited by RAM |
| Use Case | Production data | Temporary cache |
| Cost | Storage-based | RAM-based |