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

Declare file topics

Register the topic data one already-uploaded file carries, naming no session.

Answers 200 once the request has been processed, even when the platform registered only some of its declarations: the response carries one element per declared topic, in request order, holding either the topic that declaration registered against or the error that refused it. A file that is not Available, or a listed representation naming a file that is not an Available file of the same org, answers 404; a caller without edit access to the file or to a file a listed representation names, 401; and a malformed request, 400. A request stating is_default_for_reads on a timeline source, true or false, also answers 401 unless the caller has 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 of these is settled before the first declaration is prepared, so a refused request registers nothing.

Each declaration’s anchor_ns is an integer of nanoseconds since the Unix epoch, or any value roboto.time.to_epoch_nanoseconds reads: a float or numeric string is seconds, and an ISO 8601 string is that instant.

Access control

  • Restricted tokens need the API scope api.everything_else
POST/v1/files/id/{fs_node_id}/topics
Authorization
AuthorizationBearer token · headerrequired
Path parameters
fs_node_idstringrequired
Header parameters
X-Roboto-Org-Idstring
X-Roboto-User-Idstring
Request body
requiredapplication/json
topicsFileTopicDeclaration[]required
min items 1 · max items 500
Show properties
Array of FileTopicDeclaration
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
anchor_nsinteger | null
default: null
Show properties
Any of:
integer
integer
null
null
Responses
200

OK

dataobjectrequired
Show properties
responsesBatchResponseElement_TopicIdentityRecord_[]required
Show properties
Array of BatchResponseElement_TopicIdentityRecord_
dataTopicIdentityRecord | null
default: null
Show properties
Any of:
TopicIdentityRecord
createdstring<date-time> | null
default: null
Show properties
Any of:
string<date-time>
string<date-time>
null
null
created_bystringrequired
modifiedstring<date-time> | null
default: null
Show properties
Any of:
string<date-time>
string<date-time>
null
null
modified_bystringrequired
namestringrequired
org_idstringrequired
topic_idstringrequired
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/files/id/string/topics' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{
  "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
        }
      ],
      "anchor_ns": null
    }
  ]
}'
Response
{
  "data": {
    "responses": [
      {
        "data": null,
        "error": null
      }
    ]
  }
}