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

Resolve read plan

Resolve the physical read plan for a topic identity over a time window.

The request body carries the window, the field projection (as field-subtree addresses), an optional per-subtree representation prefer grammar, and optionally names the schema and timeline source to use. A malformed body, or a schema named by both id and checksum, yields a 400.

Authorization is two layers. The caller must first hold topic view access in the org that owns the topic. Within the org, authorization is all-or-nothing over the window, through view access to every in-window partition’s backing file: if the caller cannot view any part of the requested window, the whole request fails with a 401 (RobotoUnauthorizedException) rather than returning a plan that silently omits data.

When the body carries a session_id, the read is scoped to the files recorded in that session (so a shared topic name does not pull data from unrelated files org-wide), and the caller must additionally hold session-view access in the org that owns the session; an unknown session yields a 404 and one the caller cannot view yields a 401.

A file_id limits the read to the topic’s data in that file, a dataset_id to its data in the dataset’s files, and a device_id to its data in the device’s files (a file belongs to the device it names, or, when it names none, to the device its dataset names). A named file or dataset must exist (else 404) and the caller must hold view access to it (else 401). A device is not looked up, so an unknown device yields an empty plan. Every restriction the body names narrows the read, and restrictions named together intersect. Data a restriction leaves out does not affect the read: its schemas cause no ambiguity and its files need no access.

With a file, dataset or device named, the body may omit start_time, end_time or both. An omitted bound defaults to the start or end of the topic’s data within the body’s restrictions, across every timeline source. When the restrictions select no timestamped data for the topic, or the one given bound lies past the far end of that data (a start after the data ends, or an end before it begins), the plan has no partitions and a null window.

A caller pinned to an API version below 2026-10-05 receives on every partition the extent field that SDK releases pinned to those versions require. Such an SDK selects rows by the requested window alone, so a plan is refused for that caller with a 400 (RobotoDeprecatedException) asking them to upgrade when any partition owns a slice of a shared file, or when a session narrows any partition’s window below the requested one: reading it on that version would return rows belonging to another session or to another partition packed in the same file.

Access control

  • Restricted tokens need the API scope api.everything_else
POST/v2/topics/id/{topic_id}/read-plan
Authorization
AuthorizationBearer token · headerrequired
Path parameters
topic_idstringrequired
Header parameters
X-Roboto-Org-Idstring
X-Roboto-User-Idstring
Request body
requiredapplication/json
start_timeinteger | null
default: null
Show properties
Any of:
integer
integer
null
null
end_timeinteger | null
default: null
Show properties
Any of:
integer
integer
null
null
fields_includeFieldAddress[] | null
default: null
Show properties
Any of:
FieldAddress[]
Array of FieldAddress
pathstring[] | null
default: null
Show properties
Any of:
string[]
Array of string
string
null
null
field_idstring | null
default: null
Show properties
Any of:
string
string
null
null
null
null
fields_excludeFieldAddress[] | null
default: null
Show properties
Any of:
FieldAddress[]
Array of FieldAddress
pathstring[] | null
default: null
Show properties
Any of:
string[]
Array of string
string
null
null
field_idstring | null
default: null
Show properties
Any of:
string
string
null
null
null
null
preferRepresentationPreference | null
default: null
Show properties
Any of:
RepresentationPreference
defaultRepresentationSelector

Selects which stored variant of a field to read when several are available.

A selector has three optional criteria — storage_format, content_format, and transformations — one for each attribute on which stored variants of the same field can differ (see :py:class:RepresentationRecord). A criterion that is set is a requirement a variant must meet to be selected; a criterion left None places no requirement, and any value is acceptable.

A selector never falls back to a variant other than the one it describes. If any criterion is set and no stored variant of a requested field meets every requirement — whether the variants that exist all fall short, or the field has no stored variant at all — the read fails with an error rather than quietly leave out the field. Only under a selector with no criteria set is a field with no stored variant simply absent from the result; such a selector requires nothing, so nothing requested is missing.

Successor to :py:class:roboto.domain.topics.RepresentationSelector, used by :py:meth:~roboto.domain.topics.Topic.get_data.

Show properties
storage_formatRepresentationStorageFormat | null
default: null
Show properties
Any of:
RepresentationStorageFormat
string
null
null
content_formatstring | null
default: null
Show properties
Any of:
string
string
null
null
transformationsstring[] | null
default: null
Show properties
Any of:
string[]
Array of string
string
null
null
overridesRepresentationOverride[]
default: []
Show properties
Array of RepresentationOverride
fieldFieldAddressrequired

Addresses a schema field, and the subtree nested under it, by exactly one of two forms.

A path names the field by its path_in_schema components directly (no string delimiter, so a component may itself contain a .); a field_id names it opaquely and resolves server-side to the same path. Either form designates the field and every field nested under it.

Show properties
pathstring[] | null
default: null
Show properties
Any of:
string[]
Array of string
string
null
null
field_idstring | null
default: null
Show properties
Any of:
string
string
null
null
selectorRepresentationSelectorrequired

Selects which stored variant of a field to read when several are available.

A selector has three optional criteria — storage_format, content_format, and transformations — one for each attribute on which stored variants of the same field can differ (see :py:class:RepresentationRecord). A criterion that is set is a requirement a variant must meet to be selected; a criterion left None places no requirement, and any value is acceptable.

A selector never falls back to a variant other than the one it describes. If any criterion is set and no stored variant of a requested field meets every requirement — whether the variants that exist all fall short, or the field has no stored variant at all — the read fails with an error rather than quietly leave out the field. Only under a selector with no criteria set is a field with no stored variant simply absent from the result; such a selector requires nothing, so nothing requested is missing.

Successor to :py:class:roboto.domain.topics.RepresentationSelector, used by :py:meth:~roboto.domain.topics.Topic.get_data.

Show properties
storage_formatRepresentationStorageFormat | null
default: null
Show properties
Any of:
RepresentationStorageFormat
RepresentationStorageFormat
null
null
content_formatstring | null
default: null
Show properties
Any of:
string
string
null
null
transformationsstring[] | null
default: null
Show properties
Any of:
string[]
Array of string
string
null
null
null
null
schema_idstring | null
default: null
Show properties
Any of:
string
string
null
null
schema_checksumstring | null
default: null
Show properties
Any of:
string
string
null
null
timeline_source_idstring | null
default: null
Show properties
Any of:
string
string
null
null
timeline_source_namestring | null
default: null
Show properties
Any of:
string
string
null
null
session_idstring | null
default: null
Show properties
Any of:
string
string
null
null
file_idstring | null
default: null
Show properties
Any of:
string
string
null
null
dataset_idstring | null
default: null
Show properties
Any of:
string
string
null
null
device_idstring | null
default: null
Show properties
Any of:
string
string
null
null
Responses
200

OK

dataobjectrequired

Resolves a read of one topic over a time window into the files to fetch and how to interpret them.

Show properties
plan_versioninteger
default: 1
topic_idstringrequired
windowTimeWindow | nullrequired
Show properties
Any of:
TimeWindow
startintegerrequired
endintegerrequired
null
null
schemaReadPlanSchemaRef | null
default: null
Show properties
Any of:
ReadPlanSchemaRef
schema_idstringrequired
checksumstringrequired
null
null
projectionReadPlanProjectionrequired

The output fields the plan resolves rows to.

The projection takes exactly one of two forms: either every field in the schema (all is true, and the field list is left implicit so the plan need not enumerate a large schema) or an explicit fields list.

Show properties
allboolean
default: false
fieldsReadPlanFieldRef[] | null
default: null
Show properties
Any of:
ReadPlanFieldRef[]
Array of ReadPlanFieldRef
field_idstringrequired
pathstring[]required
null
null
partitionsReadPlanPartition[]
default: []
Show properties
Array of ReadPlanPartition
topic_part_idstringrequired
time_offset_nsintegerrequired
windowTimeWindowrequired

A closed time window in absolute nanoseconds since the Unix epoch; both bounds inclusive.

The same shape serves the window a plan resolves over and the window each partition's rows are selected in.

Show properties
startintegerrequired
endintegerrequired
timestampReadPlanTimestamprequired

Where a partition's row timestamps come from.

Timestamps are either read out of a schema field (kind is "schema_field", and field names which one) or taken from the storage envelope (message log or publish time), in which case no schema field is involved and field is None.

Show properties
kindstringrequired
Allowed:schema_fieldmessage_log_timemessage_publish_time
fieldReadPlanFieldRef | null
default: null
Show properties
Any of:
ReadPlanFieldRef
field_idstringrequired
pathstring[]required
null
null
unitstring | null
default: null
Show properties
Any of:
string
string
null
null
data_rangeany[] | null
default: null
Show properties
Any of:
any[]
Array of any
null
null
scan_tasksReadPlanScanTask[]
default: []
Show properties
Array of ReadPlanScanTask
subtreeReadPlanFieldRef | null
default: null
Show properties
Any of:
ReadPlanFieldRef
field_idstringrequired
pathstring[]required
null
null
precedenceintegerrequired
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
transformationsstring[]
default: []
objectReadPlanObjectRefrequired

Points to the file backing a scan task. A consumer fetches the file's bytes from it.

Show properties
fs_node_idstringrequired
size_bytesinteger | null
default: null
Show properties
Any of:
integer
integer
null
null
topic_namestring | null
default: null
Show properties
Any of:
string
string
null
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/v2/topics/id/string/read-plan' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{
  "start_time": null,
  "end_time": null,
  "fields_include": null,
  "fields_exclude": null,
  "prefer": null,
  "schema_id": null,
  "schema_checksum": null,
  "timeline_source_id": null,
  "timeline_source_name": null,
  "session_id": null,
  "file_id": null,
  "dataset_id": null,
  "device_id": null
}'
Response
{
  "data": {
    "plan_version": 1,
    "topic_id": "string",
    "window": {
      "start": 0,
      "end": 0
    },
    "schema": null,
    "projection": {
      "all": false,
      "fields": null
    },
    "partitions": []
  }
}