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

Add files

Include files in a session that already exists, each with whatever topic data it declares.

Answers 200 once the request has been processed, even when the platform included only some of the files: the response carries one element per declared file, in request order, holding either that file’s membership in the shape GET /v1/sessions/id/<session_id>/files reports it or the error that refused the entry. The request runs in one transaction, and every entry’s refusal is settled before anything is written, so a refused entry leaves the others included; a failure the platform did not anticipate, such as the request’s deadline, includes none of them. A malformed request answers 400, and a file an entry declares, or a file a listed representation names, that is not an Available file of the session’s org answers 404; both are settled before the first entry is written, so the session gains nothing. A session deleted after the request loaded it answers 404, and none of the entries is written.

A client on an API version before 2026-10-05 sends the earlier request shape and receives the session’s record. Its request stands or falls whole: when the platform refuses one file it answers with that refusal and includes none of the files, and a file named twice is included over its last entry.

Every anchor_ns in the body is a time after the Unix epoch: an integer of nanoseconds since the epoch, or any time roboto.time.to_epoch_nanoseconds reads, so a float or numeric string is seconds and an ISO 8601 string is that instant.

Declaring topics on a file or anchoring it writes to that file and so requires edit access to it. Naming a file in a listed representation writes nothing to that file and takes the access that declaring topics on it does, because a read of the topic opens that file. Stating is_default_for_reads on a timeline source, true or false, additionally requires topic edit access in the org: which source a schema’s reads fall back to is a property of the org’s topics, not of any one file. Each denial answers 401 before any entry is prepared.

Access control

  • Restricted tokens need the API scope api.everything_else
POST/v1/sessions/id/{session_id}/files
Authorization
AuthorizationBearer token · headerrequired
Path parameters
session_idstringrequired
Header parameters
X-Roboto-Org-Idstring
X-Roboto-User-Idstring
Request body
requiredapplication/json
filesSessionFile[]required
min items 1 · max items 500
Show properties
Array of SessionFile
file_idstringrequired
min length 1
data_rangeany[] | null
default: null
Show properties
Any of:
any[]
Array of any
null
null
anchor_nsinteger | null
default: null
Show properties
Any of:
integer
integer
null
null
topicsTopicDeclaration[]
Show properties
Array of TopicDeclaration
topic_namestringrequired
min length 1
topic_schemaSchemarequired

The structure of one topic's data: the columns it carries.

However a schema is produced, whether hand-written field by field or converted from a source format's own metadata, the registered result is the same: schemas are content-addressed server-side. Identity covers every attribute of every field (name, path, source data type, canonical type, and unit), so identical declarations collapse to a single stored schema no matter how many times they are repeated, while declarations differing in any field attribute are stored separately.

A column a timeline source reads is declared by typing it :py:attr:~roboto.domain.topics.record.CanonicalDataType.Timestamp with a :py:class:~roboto.time.TimeUnit unit; nothing else marks it. Which of a topic's timeline sources reads fall back to is not part of the schema: it is stated on :py:attr:~roboto.experimental.ingest.TopicDeclaration.timeline_sources and can be changed later, so the same columns are one schema no matter which source is preferred.

This is what a caller declares, so it carries no checksum: the platform computes that from the fields. :py:class:~roboto.domain.topics.record.TopicSchemaRecord is the stored schema the platform returns, carrying that checksum and the identifiers it assigns.

Show properties
namestring | null
default: null
Show properties
Any of:
string
string
null
null
fieldsField[]required
min items 1
Show properties
Array of Field
namestring
default: ""
pathstring[]
data_typestringrequired
min length 1
canonical_data_typeCanonicalDataType

Normalized data types used across different robotics frameworks.

Well-known and simplified data types that provide a common vocabulary for describing message path data types across different frameworks and technologies. These canonical types are primarily used for UI rendering decisions and cross-platform compatibility.

The canonical types abstract away framework-specific details while preserving the essential characteristics needed for data processing and visualization.

References: - ROS 1 field types: http://wiki.ros.org/msg - ROS 2 field types: https://docs.ros.org/en/iron/Concepts/Basic/About-Interfaces.html#field-types - uORB: https://docs.px4.io/main/en/middleware/uorb.html#adding-a-new-topic

Example mappings: - float32 -> CanonicalDataType.Number - uint8[] -> CanonicalDataType.Array - sensor_msgs/Image -> CanonicalDataType.Image - geometry_msgs/Pose -> CanonicalDataType.Object - std_msgs/Header -> CanonicalDataType.Object - string -> CanonicalDataType.String - char -> CanonicalDataType.String - bool -> CanonicalDataType.Boolean - byte -> CanonicalDataType.Byte

Allowed:arraybooleanbytecategoricalimagenumbernumber_arrayobjectstringtimestampunknownlatdegfloatlondegfloatlatdegintlondegint
unitstring | null
default: null
Show properties
Any of:
string
string
null
null
timeline_sourcesSchemaFieldSource | McapLogTimeSource | McapPublishTimeSource | Mp4PresentationTimeSource[]required
min items 1
Show properties
Array of SchemaFieldSource | McapLogTimeSource | McapPublishTimeSource | Mp4PresentationTimeSource
One of:
SchemaFieldSource
min_file_timestamp_nsintegerrequired
min -9223372036854776000 · max 9223372036854776000
max_file_timestamp_nsintegerrequired
min -9223372036854776000 · max 9223372036854776000
is_default_for_readsboolean | null
Show properties
Any of:
boolean
boolean
null
null
kindstring
default: "field"
field_pathstring[]required
min items 1
McapLogTimeSource
min_file_timestamp_nsintegerrequired
min -9223372036854776000 · max 9223372036854776000
max_file_timestamp_nsintegerrequired
min -9223372036854776000 · max 9223372036854776000
is_default_for_readsboolean | null
Show properties
Any of:
boolean
boolean
null
null
kindstring
default: "mcap_log_time"
McapPublishTimeSource
min_file_timestamp_nsintegerrequired
min -9223372036854776000 · max 9223372036854776000
max_file_timestamp_nsintegerrequired
min -9223372036854776000 · max 9223372036854776000
is_default_for_readsboolean | null
Show properties
Any of:
boolean
boolean
null
null
kindstring
default: "mcap_publish_time"
Mp4PresentationTimeSource
min_file_timestamp_nsintegerrequired
min -9223372036854776000 · max 9223372036854776000
max_file_timestamp_nsintegerrequired
min -9223372036854776000 · max 9223372036854776000
is_default_for_readsboolean | null
Show properties
Any of:
boolean
boolean
null
null
kindstring
default: "mp4_presentation_time"
data_rangeany[] | null
default: null
Show properties
Any of:
any[]
Array of any
null
null
representationsRepresentationDeclaration[]
Show properties
Array of RepresentationDeclaration
file_idstringrequired
min length 1
storage_formatRepresentationStorageFormatrequired

Supported storage formats for topic data representations.

Defines the available formats for storing and accessing topic data within the Roboto platform. Each format has different characteristics and use cases.

Allowed:mcapparquet
content_formatstring | null
default: null
Show properties
Any of:
string
string
null
null
transformationsstring[]
field_pathstring[] | null
default: null
Show properties
Any of:
string[]
Array of string
string
null
null
min_file_timestamp_nsinteger | null
default: null
Show properties
Any of:
integer
integer
null
null
max_file_timestamp_nsinteger | null
default: null
Show properties
Any of:
integer
integer
null
null
Responses
200

OK

dataobjectrequired
Show properties
responsesBatchResponseElement_SessionFileView_[]required
Show properties
Array of BatchResponseElement_SessionFileView_
dataSessionFileView | null
default: null
Show properties
Any of:
SessionFileView
createdstring<date-time> | null
default: null
Show properties
Any of:
string<date-time>
string<date-time>
null
null
data_rangeany[] | null
default: null
Show properties
Any of:
any[]
Array of any
null
null
dataset_idstring | null
default: null
Show properties
Any of:
string
string
null
null
file_idstringrequired
max_wall_clock_timestamp_nsinteger | null
default: null
Show properties
Any of:
integer
integer
null
null
min_wall_clock_timestamp_nsinteger | null
default: null
Show properties
Any of:
integer
integer
null
null
ingestableboolean | null
default: null
Show properties
Any of:
boolean
boolean
null
null
ingestion_statusIngestionStatus | null
default: null
Show properties
Any of:
IngestionStatus
string
null
null
modifiedstring<date-time> | null
default: null
Show properties
Any of:
string<date-time>
string<date-time>
null
null
namestring | null
default: null
Show properties
Any of:
string
string
null
null
originationstring | null
default: null
Show properties
Any of:
string
string
null
null
relative_pathstring | null
default: null
Show properties
Any of:
string
string
null
null
sizeinteger | null
default: null
Show properties
Any of:
integer
integer
null
null
tagsstring[]
unix_epoch_offset_nsinteger | null
default: null
Show properties
Any of:
integer
integer
null
null
null
null
errorany
default: null
400

Thrown when the conversation context (messages, system prompt, tool results) exceeds the model's context window limit.

The token estimate and the model's context limit are not carried on the exception, so a caller cannot read usage numbers off it.

errorobject
Show properties
error_codenumber
messagestring
stack_tracestring | null
401

Thrown when authentication fails

errorobject
Show properties
error_codenumber
messagestring
stack_tracestring | null
403

Thrown if an operation would exceed a user or org level limit.

errorobject
Show properties
error_codenumber
messagestring
stack_tracestring | null
404

Thrown if a user is attempting to perform an action unrecognized by the Roboto platform.

errorobject
Show properties
error_codenumber
messagestring
stack_tracestring | null
409

Thrown if there is a conflict between a resource you're creating and another existing resource

errorobject
Show properties
error_codenumber
messagestring
stack_tracestring | null
410

Thrown if a resource is missing or expired.

errorobject
Show properties
error_codenumber
messagestring
stack_tracestring | null
500

An error the platform reported that this SDK release cannot resolve to a specific exception class.

Reported for an element of a :py:class:~roboto.http.BatchResponse whose error names a code this release defines no class for, or that arrived without a code, without a message, or as text that is not an error envelope at all. It carries whatever code and message the platform sent, so a caller handling the failure still learns what went wrong; when no message could be read, the message is the error's raw text.

The error envelope carries no status code, so http_status_code reports the 500 inherited from :py:class:RobotoDomainException rather than the status the failure actually had.

errorobject
Show properties
error_codenumber
messagestring
stack_tracestring | null
501

Thrown by shimmed out APIs which have not yet been implemented

errorobject
Show properties
error_codenumber
messagestring
stack_tracestring | null
503

Thrown when a service is unavailable, such as when it's under heavy load and can't accept new requests. This is expected to be transient and ought to be retried.

errorobject
Show properties
error_codenumber
messagestring
stack_tracestring | null
504

Thrown when the service times out while processing a request. This is exepcted to be transient and ought to be retried.

errorobject
Show properties
error_codenumber
messagestring
stack_tracestring | null
507

Thrown when the server cannot complete the request because the response payload exceeds a storage or transport capacity limit (e.g., Lambda response size). This is NOT expected to be transient and should NOT be retried.

errorobject
Show properties
error_codenumber
messagestring
stack_tracestring | null
Try it
Server
Authorization
Parameters
Bodyapplication/json
Request
curl -X POST 'https://api.roboto.ai/v1/sessions/id/string/files' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{
  "files": [
    {
      "file_id": "string",
      "data_range": null,
      "anchor_ns": null,
      "topics": [
        {
          "topic_name": "string",
          "topic_schema": {
            "name": null,
            "fields": [
              {
                "name": "",
                "path": [
                  "string"
                ],
                "data_type": "string",
                "canonical_data_type": "array",
                "unit": null
              }
            ]
          },
          "timeline_sources": [
            {
              "min_file_timestamp_ns": -9223372036854776000,
              "max_file_timestamp_ns": -9223372036854776000,
              "is_default_for_reads": true,
              "kind": "field",
              "field_path": [
                "string"
              ]
            }
          ],
          "data_range": null,
          "representations": [
            {
              "file_id": "string",
              "storage_format": "mcap",
              "content_format": null,
              "transformations": [
                "string"
              ],
              "field_path": null
            }
          ]
        }
      ],
      "min_file_timestamp_ns": null,
      "max_file_timestamp_ns": null
    }
  ]
}'
Response
{
  "data": {
    "responses": [
      {
        "data": null,
        "error": null
      }
    ]
  }
}