Skip to main content

List topics

Request

Get a list of topics available for a device within a given time range.

By default, this endpoint will not return the schema for each topic. To include the schemas, you must provide the includeSchemas query parameter.

Use start and end to limit the response to overlapping recording ranges.

Topics for not-imported recordings are only returned if no parameter is provided besides recordingId or recordingKey. This is because most parameters need the imported files to filter, and can only return an empty list if imports are unavailable.

Security
ApiKey(Required scopes: data.topics.list)
Query
startstring, (date-time)

Return all topics appearing in recordings ending on or after start

endstring, (date-time)

Return topics from recordings that start on or before end.

importIdstring, non-emptydeprecated

ID of the import from which to list topics

recordingIdstring, non-empty

ID of the recording from which to list topics

recordingKeystring, non-empty

Key of the recording from which to list topics

deviceIdstring, non-empty

ID of device being queried

device.namestring, non-emptydeprecated

Equivalent to deviceName, and ignored if deviceName is supplied

deviceNamestring, non-empty

Name of device being queried

device.idstring, non-emptydeprecated

Equivalent to deviceId, and ignored if deviceId is supplied

sessionIdstring, non-empty

ID of a recording session to list topics from

sessionKeystring, non-empty

Key of a recording session to list topics from

episodeVersioninteger, [ 1 .. 2147483647 ]

Episode version to list topics from. Requires episodeId. If omitted, uses the latest episode version.

episodeIdstring, non-empty

ID of an episode to list topics from

includeSchemasboolean

Whether full schemas should be included in the response

Default:false
sortBystring

Sort by a single field of the topic type ("topic" or "version")

Enum:"topic""version"
projectIdstring

Filter topics matching project ID

sortOrderstring

Sort order for the sortBy field

Enum:"asc""desc"
limitnumber, [ 0 .. 2000 ]

Maximum number of items to return

Default:2000
offsetinteger, >= 0

Number of items to skip before returning the results

Default:0
Python
from foxglove.client import Client
from datetime import datetime, timedelta

token = "<YOUR API TOKEN HERE>"
client = Client(token=token)

client.get_topics(
    device_id=device_id,
    start=datetime.now() - timedelta(hours=3),
    end=datetime.now() - timedelta(hours=1),
)

Responses

List of topics

Bodyapplication/json
Array [
encodingstringrequired

Encoding of the topic

schemastring

Full schema, base-64 encoded; included only if the request's includeSchemas is true

schemaEncodingstringrequired

Encoding of the topic schema

schemaNamestringrequired

Name of the topic schema

topicstringrequired

Topic name

versionstringrequired

Topic version

]
Response
[ { "encoding": "string", "schema": "string", "schemaEncoding": "string", "schemaName": "string", "topic": "string", "version": "string" } ]