Object Commands are the core tools for interacting with individual files (or "objects") within a DID Space. They provide the fundamental building blocks for all CRUD (Create, Read, Update, Delete) operations, allowing you to upload, download, list, and delete files programmatically.
Each command is designed as a self-contained unit that you send via the SpaceClient. This section provides an overview of the available object commands. Click on any command to view its detailed API reference, including parameters, return values, and code examples.
PutObjectCommand
Uploads a new file or overwrites an existing file in your space. Use this for all file creation and update operations.
GetObjectCommand
Retrieves an object from your space. This command downloads the raw content of the file as a readable stream.
DeleteObjectCommand
Permanently deletes a specified object from your space. This action is irreversible.
ListObjectsCommand
Lists the objects and common prefixes (subdirectories) under a specified path within your space.
HeadObjectCommand
Retrieves metadata from an object without returning the object itself. Useful for checking existence, size, or last-modified date.
PreviewObjectCommand
Manages the preview for an object. You can set, get, or remove a custom preview image for any file.
These commands provide granular control over individual objects. For higher-level operations, such as synchronizing an entire local folder with a remote directory, explore the Sync Commands.