Skip to content
Roboto
Esc
↑↓navigate↵open⌘Jpreview
On this page

roboto.domain.files.operations

Module Contents

CreateDirectoryRequest

class roboto.domain.files.operations.CreateDirectoryRequest(/, **data)#View Source

Bases: pydantic.BaseModel

Request payload to create a directory among the files of one association.

Parameters

data Any

Attributes

CreateDirectoryRequest.create_intermediate_dirs

create_intermediate_dirs bool = False #

If True, creates intermediate directories in the path if they don’t exist. If False, requires all parent directories to already exist.

CreateDirectoryRequest.error_if_exists

error_if_exists bool = False #

CreateDirectoryRequest.name

name str #

CreateDirectoryRequest.origination

origination str | None = None #

CreateDirectoryRequest.parent_path

parent_path str | None = None #

CreateLinkRequest

class roboto.domain.files.operations.CreateLinkRequest(/, **data)#View Source

Bases: pydantic.BaseModel

Request body for PUT /v1/files/association/id/<association_id>/link.

Parameters

data Any

Attributes

CreateLinkRequest.relative_path

relative_path str #

Where the link sits among the association’s files. Missing parent directories are created.

CreateLinkRequest.target_file_id

target_file_id str #

ID of the file the link points at. It must be a file, not a link or a directory, in the same org.

CreateLinkRequest.target_version

target_version int | None = None #

Version of the target to pin. Defaults to the target’s current version.

DeleteFileRequest

class roboto.domain.files.operations.DeleteFileRequest(/, **data)#View Source

Bases: pydantic.BaseModel

Request payload for deleting a file from the platform.

This request is used internally by the platform to delete files and their associated data. The file is identified by its storage URI.

Parameters

data Any

Attributes

DeleteFileRequest.uri

uri str #

Storage URI of the file to delete (e.g., ‘s3://bucket/path/to/file.bag’).

DirectoryContentsPage

class roboto.domain.files.operations.DirectoryContentsPage(/, **data)#View Source

Bases: pydantic.BaseModel

Response containing the contents of a dataset directory page.

Represents a paginated view of files and subdirectories within a dataset directory. Used when browsing dataset contents hierarchically.

Parameters

data Any

Attributes

DirectoryContentsPage.directories

directories collections.abc.Sequence[roboto.domain.files.record.DirectoryRecord] #

Subdirectories contained in this directory page.

DirectoryContentsPage.files

files collections.abc.Sequence[roboto.domain.files.record.FileRecord] #

Files contained in this directory page.

DirectoryContentsPage.next_token

next_token str | None = None #

Token for retrieving the next page of results, if any.

FileRecordRequest

class roboto.domain.files.operations.FileRecordRequest(/, **data)#View Source

Bases: pydantic.BaseModel

Request payload for upserting a file record.

Used to create or update file metadata records in the platform. This is typically used during file import or metadata update operations.

Parameters

data Any

Attributes

FileRecordRequest.file_id

file_id str #

Unique identifier for the file.

FileRecordRequest.metadata

metadata dict[str, Any] = None #

Key-value metadata pairs to associate with the file.

FileRecordRequest.tags

tags list[str] = None #

List of tags to associate with the file for discovery and organization.

ImportFileRequest

class roboto.domain.files.operations.ImportFileRequest(/, **data)#View Source

Bases: pydantic.BaseModel

Request payload for importing an existing file into a dataset.

Used to register files that already exist in storage (such as customer S3 buckets) with the Roboto platform. The file content remains in its original location while metadata is stored in Roboto for discovery and processing.

Parameters

data Any

Attributes

ImportFileRequest.dataset_id

dataset_id str #

ID of the dataset to import the file into.

ImportFileRequest.description

description str | None = None #

Optional human-readable description of the file.

ImportFileRequest.device_id

device_id str | None = None #

Optional identifier of the device that generated this data.

ImportFileRequest.metadata

metadata dict[str, Any] | None = None #

Optional key-value metadata pairs to associate with the file.

ImportFileRequest.relative_path

relative_path str #

Path of the file relative to the dataset root (e.g., logs/session1.bag).

ImportFileRequest.size

size int | None = None #

Size of the file in bytes. When importing a single file, you can omit the size, as Roboto will look up the size from the object store. When calling import_batch, you must provide the size explicitly.

ImportFileRequest.tags

tags list[str] | None = None #

Optional list of tags for file discovery and organization.

ImportFileRequest.uri

uri str #

Storage URI where the file is located (e.g., s3://bucket/path/to/file.bag).

QueryDatasetFilesRequest

class roboto.domain.files.operations.QueryDatasetFilesRequest(/, **data)#View Source

Bases: pydantic.BaseModel

Request payload for listing the files associated with a dataset, an org, or a device.

Supports gitignore-style patterns for flexible file selection and pagination. Despite the name, the same body lists the files of any association type.

Parameters

data Any

Attributes

QueryDatasetFilesRequest.exclude_patterns

exclude_patterns list[str] | None = None #

List of gitignore-style patterns for files to exclude from results.

QueryDatasetFilesRequest.include_patterns

include_patterns list[str] | None = None #

List of gitignore-style patterns for files to include in results.

QueryDatasetFilesRequest.limit

limit int | None = None #

Maximum number of files to return per page.

QueryDatasetFilesRequest.page_token

page_token str | None = None #

Token for retrieving the next page of results in paginated queries.

QueryDatasetFilesRequest.sort_by

sort_by str | None = None #

Field to sort results by. Defaults to ‘created’.

QueryDatasetFilesRequest.sort_direction

sort_direction str | None = None #

Sort direction (‘ASC’ or ‘DESC’). Defaults to ‘DESC’.

QueryFilesRequest

class roboto.domain.files.operations.QueryFilesRequest(/, **data)#View Source

Bases: pydantic.BaseModel

Request payload for querying files with filters.

Used to search for files based on various criteria such as metadata, tags, ingestion status, and other file properties. The filters are applied server-side to efficiently return matching files.

Parameters

data Any

Attributes

QueryFilesRequest.filters

filters dict[str, Any] = None #

Dictionary of filter criteria to apply when searching for files.

QueryFilesRequest.model_config

model_config #

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

RenameDirectoryRequest

class roboto.domain.files.operations.RenameDirectoryRequest(/, **data)#View Source

Bases: pydantic.BaseModel

Request payload for renaming a directory among the files of one association.

Changes the path of a directory and all its contained files. This updates the logical organization without moving actual file content.

Parameters

data Any

Attributes

RenameDirectoryRequest.new_path

new_path str #

New path for the directory.

RenameDirectoryRequest.old_path

old_path str #

Current path of the directory to rename.

RenameFileRequest

class roboto.domain.files.operations.RenameFileRequest(/, **data)#View Source

Bases: pydantic.BaseModel

Request payload for renaming a file within its dataset.

Changes the relative path of a file within its dataset. This updates the file’s logical location but does not move the actual file content in storage.

Parameters

data Any

Attributes

RenameFileRequest.association_id

association_id str #

ID of the dataset containing the file to rename.

RenameFileRequest.new_path

new_path str #

New relative path for the file within the dataset.

SignedUrlResponse

class roboto.domain.files.operations.SignedUrlResponse(/, **data)#View Source

Bases: pydantic.BaseModel

Response containing a signed URL for direct file access.

Provides a time-limited URL that allows direct access to file content without requiring Roboto authentication. Used for file downloads and integration with external systems.

Parameters

data Any

Attributes

SignedUrlResponse.url

url str #

Signed URL that provides temporary direct access to the file.

UpdateFileRecordRequest

class roboto.domain.files.operations.UpdateFileRecordRequest(/, **data)#View Source

Bases: pydantic.BaseModel

Request payload for updating file record properties.

Used to modify file metadata, description, and ingestion status. Only specified fields are updated; others remain unchanged. Uses NotSet sentinel values to distinguish between explicit None values and fields that should not be modified.

Parameters

data Any

Attributes

UpdateFileRecordRequest.description

description str | roboto.sentinels.NotSetType | None #

New description for the file, or NotSet to leave unchanged.

UpdateFileRecordRequest.device_id

device_id str | roboto.sentinels.NotSetType | None #

New device ID for the file, or NotSet to leave unchanged.

UpdateFileRecordRequest.ingestion_complete

ingestion_complete Literal[True] | roboto.sentinels.NotSetType #

Set to True to mark file as fully ingested, or NotSet to leave unchanged.

UpdateFileRecordRequest.metadata_changeset

Metadata changes to apply (add, update, or remove fields/tags), or NotSet to leave unchanged.

UpdateFileRecordRequest.model_config

model_config #

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

Was this page helpful?