Streaming session service (gRPC)#
Provides read access to streaming sessions and their sources.
Endpoints#
Search streaming sessions#
gRPC /nominal.ingest.v2.StreamingSessionService/SearchStreamingSessions
Searches streaming sessions visible to the caller.
Request: SearchStreamingSessionsRequest
page_sizeintegerDefaults to 100. From 1 to 1,000.
page_tokenstringAt most 4,096 characters.
filterStreamingSessionSearchFilterAbsent matches every session visible to the caller. The filter tree may contain at most 1000 nodes and 32 levels of nesting.
Fields of
StreamingSessionSearchFilter- one of 7 fields required
dataset_ridsStreamingDatasetRidsFilter
Fields of
StreamingDatasetRidsFilterdataset_ridsarray of stringAt most 1,000 items. No duplicates. Each item: at most 1,024 characters.
sourceExactStreamingSourceFilter
Fields of
ExactStreamingSourceFilterdataset_ridstring requiredAt most 1,024 characters.
sourceStreamingSourceAttribution
Fields of
StreamingSourceAttribution- one of
mesh,data_connector,customrequired
meshMeshSourceAttribution
Fields of
MeshSourceAttributionsource_dataset_ridstring requiredAt most 1,024 characters.
source_org_ridstring requiredAt most 1,024 characters.
origin_source_labelstringLabel for this data’s source on the originating deployment, as that deployment reported it. Opaque: Nominal stores and returns it without interpreting it. It is part of the session’s identity, so writes carrying different labels resolve to different sessions. 1 to 1,024 characters.
data_connectorDataConnectorSourceAttribution
Fields of
DataConnectorSourceAttributiondata_connector_ridstring requiredAt most 1,024 characters.
customCustomSourceAttribution
Fields of
CustomSourceAttributionsource_namestring1 to 1,024 characters.
- one of
data_bounds_overlapStreamingSessionDataBoundsFilter
Fields of
StreamingSessionDataBoundsFilterstartstring (date-time)
endstring (date-time)
workspaceStreamingWorkspaceFilter
Fields of
StreamingWorkspaceFilterworkspace_ridstring requiredAt most 1,024 characters.
andStreamingSessionAndFilter
Fields of
StreamingSessionAndFilterfiltersarray ofStreamingSessionSearchFilter1 to 100 items.
orStreamingSessionOrFilter
Fields of
StreamingSessionOrFilterfiltersarray ofStreamingSessionSearchFilter1 to 100 items.
notStreamingSessionNotFilter
Fields of
StreamingSessionNotFilterfilterStreamingSessionSearchFilterrequired
sortStreamingSessionSortOptionsDefaults to
created_atdescending.Fields of
StreamingSessionSortOptionsfieldStreamingSessionSortField
Values of
StreamingSessionSortFieldSTREAMING_SESSION_SORT_FIELD_UNSPECIFIED
STREAMING_SESSION_SORT_FIELD_CREATED_ATOrders by the time the session was created.
STREAMING_SESSION_SORT_FIELD_DATA_BOUNDS_STARTOrders by the start of the session’s data bounds. Sessions with no data bounds are excluded from the results.
is_descendingboolean
Response: SearchStreamingSessionsResponse
streaming_sessionsarray ofStreamingSession
Fields of
StreamingSessionstreaming_session_ridstring
dataset_ridstring
statusStreamingSessionStatus
Values of
StreamingSessionStatusSTREAMING_SESSION_STATUS_UNSPECIFIED
STREAMING_SESSION_STATUS_IN_PROGRESSThe session accepts heartbeats.
STREAMING_SESSION_STATUS_COMPLETEDThe server completed the session once it had recorded a minimum number of points and either stopped receiving heartbeats or reached its maximum age. A completed session accepts no further heartbeats; resolving the same source starts a new session.
sourceStreamingSourceAttributionAbsent for unattributed sessions.
Fields of
StreamingSourceAttribution- one of
mesh,data_connector,custom
meshMeshSourceAttribution
Fields of
MeshSourceAttributionsource_dataset_ridstringAt most 1,024 characters.
source_org_ridstringAt most 1,024 characters.
origin_source_labelstringLabel for this data’s source on the originating deployment, as that deployment reported it. Opaque: Nominal stores and returns it without interpreting it. It is part of the session’s identity, so writes carrying different labels resolve to different sessions. 1 to 1,024 characters.
data_connectorDataConnectorSourceAttribution
Fields of
DataConnectorSourceAttributiondata_connector_ridstringAt most 1,024 characters.
customCustomSourceAttribution
Fields of
CustomSourceAttributionsource_namestring1 to 1,024 characters.
- one of
data_boundsTimeRangeThe time range of the data ingested so far. Absent until the first points are recorded.
Fields of
TimeRangestartstring (date-time)
endstring (date-time)
points_countinteger (int64)
created_atstring (date-time)
last_seen_atstring (date-time)Time of the most recent heartbeat for this session.
completed_atstring (date-time)Time the session was completed. Absent while the session is in progress.
next_page_tokenstring
Request
import grpc
from nominal.protos.ingest.v2 import streaming_session_pb2, streaming_session_pb2_grpc
channel = grpc.secure_channel("api.gov.nominal.io:443", grpc.ssl_channel_credentials())
streaming_session_service = streaming_session_pb2_grpc.StreamingSessionServiceStub(channel)
auth = [("authorization", "Bearer <api key>")]
request = streaming_session_pb2.SearchStreamingSessionsRequest(
page_size=1,
page_token="<page token>",
filter={"dataset_rids": {"dataset_rids": ["<dataset rids>"]}},
sort={"field": "STREAMING_SESSION_SORT_FIELD_CREATED_AT", "is_descending": True},
)
response = streaming_session_service.SearchStreamingSessions(request, metadata=auth)
print(response)
Response
{
"streaming_sessions": [
{
"streaming_session_rid": "<streaming session rid>",
"dataset_rid": "<dataset rid>",
"status": "STREAMING_SESSION_STATUS_IN_PROGRESS",
"source": {
"mesh": {
"source_dataset_rid": "<source dataset rid>",
"source_org_rid": "<source org rid>",
"origin_source_label": "<origin source label>"
}
},
"data_bounds": {
"start": "2026-01-01T00:00:00Z",
"end": "2026-01-01T00:00:00Z"
},
"points_count": 1,
"created_at": "2026-01-01T00:00:00Z",
"last_seen_at": "2026-01-01T00:00:00Z",
"completed_at": "2026-01-01T00:00:00Z"
}
],
"next_page_token": "<next page token>"
}
Search streaming sources#
gRPC /nominal.ingest.v2.StreamingSessionService/SearchStreamingSources
Searches streaming sources visible to the caller, aggregated by (source, dataset) and ordered by latest activity descending.
Request: SearchStreamingSourcesRequest
page_sizeintegerDefaults to 100. From 1 to 1,000.
page_tokenstringAt most 4,096 characters.
filterStreamingSourceSearchFilterAbsent matches every source visible to the caller. The filter tree may contain at most 1000 nodes and 32 levels of nesting.
Fields of
StreamingSourceSearchFilter- one of 6 fields required
dataset_ridsStreamingDatasetRidsFilter
Fields of
StreamingDatasetRidsFilterdataset_ridsarray of stringAt most 1,000 items. No duplicates. Each item: at most 1,024 characters.
sourceExactStreamingSourceFilter
Fields of
ExactStreamingSourceFilterdataset_ridstring requiredAt most 1,024 characters.
sourceStreamingSourceAttribution
Fields of
StreamingSourceAttribution- one of
mesh,data_connector,customrequired
meshMeshSourceAttribution
Fields of
MeshSourceAttributionsource_dataset_ridstring requiredAt most 1,024 characters.
source_org_ridstring requiredAt most 1,024 characters.
origin_source_labelstringLabel for this data’s source on the originating deployment, as that deployment reported it. Opaque: Nominal stores and returns it without interpreting it. It is part of the session’s identity, so writes carrying different labels resolve to different sessions. 1 to 1,024 characters.
data_connectorDataConnectorSourceAttribution
Fields of
DataConnectorSourceAttributiondata_connector_ridstring requiredAt most 1,024 characters.
customCustomSourceAttribution
Fields of
CustomSourceAttributionsource_namestring1 to 1,024 characters.
- one of
workspaceStreamingWorkspaceFilter
Fields of
StreamingWorkspaceFilterworkspace_ridstring requiredAt most 1,024 characters.
andStreamingSourceAndFilter
Fields of
StreamingSourceAndFilterfiltersarray ofStreamingSourceSearchFilter1 to 100 items.
orStreamingSourceOrFilter
Fields of
StreamingSourceOrFilterfiltersarray ofStreamingSourceSearchFilter1 to 100 items.
notStreamingSourceNotFilter
Fields of
StreamingSourceNotFilterfilterStreamingSourceSearchFilterrequired
last_seen_afterstring (date-time)If present, only sessions last seen strictly after this instant are aggregated; groups whose sessions were all last seen at or before it are omitted.
Response: SearchStreamingSourcesResponse
streaming_sourcesarray ofStreamingSource
Fields of
StreamingSourcesourceStreamingSourceAttributionAbsent for unattributed sessions.
Fields of
StreamingSourceAttribution- one of
mesh,data_connector,custom
meshMeshSourceAttribution
Fields of
MeshSourceAttributionsource_dataset_ridstringAt most 1,024 characters.
source_org_ridstringAt most 1,024 characters.
origin_source_labelstringLabel for this data’s source on the originating deployment, as that deployment reported it. Opaque: Nominal stores and returns it without interpreting it. It is part of the session’s identity, so writes carrying different labels resolve to different sessions. 1 to 1,024 characters.
data_connectorDataConnectorSourceAttribution
Fields of
DataConnectorSourceAttributiondata_connector_ridstringAt most 1,024 characters.
customCustomSourceAttribution
Fields of
CustomSourceAttributionsource_namestring1 to 1,024 characters.
- one of
dataset_ridstring
session_countinteger (int64)Number of sessions aggregated into this group.
total_points_countinteger (int64)Sum of the points counts across the aggregated sessions.
earliest_created_atstring (date-time)Creation time of the oldest aggregated session.
latest_last_seen_atstring (date-time)Most recent heartbeat time across the aggregated sessions.
merged_data_boundsTimeRangeUnion of the data bounds across the aggregated sessions, if any session has data bounds.
Fields of
TimeRangestartstring (date-time)
endstring (date-time)
any_in_progressbooleanTrue if at least one aggregated session is in progress.
next_page_tokenstring
Request
from datetime import datetime, timezone
import grpc
from nominal.protos.ingest.v2 import streaming_session_pb2, streaming_session_pb2_grpc
channel = grpc.secure_channel("api.gov.nominal.io:443", grpc.ssl_channel_credentials())
streaming_session_service = streaming_session_pb2_grpc.StreamingSessionServiceStub(channel)
auth = [("authorization", "Bearer <api key>")]
request = streaming_session_pb2.SearchStreamingSourcesRequest(
page_size=1,
page_token="<page token>",
filter={"dataset_rids": {"dataset_rids": ["<dataset rids>"]}},
last_seen_after=datetime(2026, 1, 1, tzinfo=timezone.utc),
)
response = streaming_session_service.SearchStreamingSources(request, metadata=auth)
print(response)
Response
{
"streaming_sources": [
{
"source": {
"mesh": {
"source_dataset_rid": "<source dataset rid>",
"source_org_rid": "<source org rid>",
"origin_source_label": "<origin source label>"
}
},
"dataset_rid": "<dataset rid>",
"session_count": 1,
"total_points_count": 1,
"earliest_created_at": "2026-01-01T00:00:00Z",
"latest_last_seen_at": "2026-01-01T00:00:00Z",
"merged_data_bounds": {
"start": "2026-01-01T00:00:00Z",
"end": "2026-01-01T00:00:00Z"
},
"any_in_progress": true
}
],
"next_page_token": "<next page token>"
}
Errors#
Errors shows how these errors are sent.
Code |
Reason |
Message |
|---|---|---|
|
|
A streaming search filter may contain at most 1000 nodes and 32 nested levels. |
Types#
CustomSourceAttribution#
A caller-named streaming source.
source_namestring1 to 1,024 characters.
DataConnectorSourceAttribution#
A streaming source fed by a data connector.
data_connector_ridstring requiredAt most 1,024 characters.
ExactStreamingSourceFilter#
Matches a single streaming source: the sessions on dataset_rid with exactly the given source attribution. An absent source matches only unattributed sessions, not every source.
dataset_ridstring requiredAt most 1,024 characters.
sourceStreamingSourceAttribution
MeshSourceAttribution#
A streaming source replicated from a dataset in another organization over mesh.
source_dataset_ridstring requiredAt most 1,024 characters.
source_org_ridstring requiredAt most 1,024 characters.
origin_source_labelstringLabel for this data’s source on the originating deployment, as that deployment reported it. Opaque: Nominal stores and returns it without interpreting it. It is part of the session’s identity, so writes carrying different labels resolve to different sessions. 1 to 1,024 characters.
StreamingDatasetRidsFilter#
Matches the given datasets. An empty list matches every dataset.
dataset_ridsarray of stringAt most 1,000 items. No duplicates. Each item: at most 1,024 characters.
StreamingSession#
A streaming ingest session on a dataset.
streaming_session_ridstring required
dataset_ridstring required
statusStreamingSessionStatusrequired
sourceStreamingSourceAttributionAbsent for unattributed sessions.
data_boundsTimeRangeThe time range of the data ingested so far. Absent until the first points are recorded.
points_countinteger (int64)
created_atstring (date-time) required
last_seen_atstring (date-time) requiredTime of the most recent heartbeat for this session.
completed_atstring (date-time)Time the session was completed. Absent while the session is in progress.
StreamingSessionAndFilter#
Matches when every child filter matches.
filtersarray ofStreamingSessionSearchFilter1 to 100 items.
StreamingSessionDataBoundsFilter#
Matches sessions whose data bounds overlap this window. Sessions with no data bounds do not match. If both ends are present, start must not be after end.
startstring (date-time)
endstring (date-time)
StreamingSessionNotFilter#
Matches when the child filter does not.
filterStreamingSessionSearchFilterrequired
StreamingSessionOrFilter#
Matches when any child filter matches.
filtersarray ofStreamingSessionSearchFilter1 to 100 items.
StreamingSessionSearchFilter#
Filter for streaming-session search.
Set exactly one of the fields below.
- one of 7 fields required
dataset_ridsStreamingDatasetRidsFilter
sourceExactStreamingSourceFilter
data_bounds_overlapStreamingSessionDataBoundsFilter
workspaceStreamingWorkspaceFilter
StreamingSessionSortField#
STREAMING_SESSION_SORT_FIELD_UNSPECIFIED
STREAMING_SESSION_SORT_FIELD_CREATED_ATOrders by the time the session was created.
STREAMING_SESSION_SORT_FIELD_DATA_BOUNDS_STARTOrders by the start of the session’s data bounds. Sessions with no data bounds are excluded from the results.
StreamingSessionSortOptions#
fieldStreamingSessionSortField
is_descendingboolean
StreamingSessionStatus#
STREAMING_SESSION_STATUS_UNSPECIFIED
STREAMING_SESSION_STATUS_IN_PROGRESSThe session accepts heartbeats.
STREAMING_SESSION_STATUS_COMPLETEDThe server completed the session once it had recorded a minimum number of points and either stopped receiving heartbeats or reached its maximum age. A completed session accepts no further heartbeats; resolving the same source starts a new session.
StreamingSource#
Aggregate view of the streaming sessions sharing a single (source, dataset) pair.
sourceStreamingSourceAttributionAbsent for unattributed sessions.
dataset_ridstring required
session_countinteger (int64)Number of sessions aggregated into this group.
total_points_countinteger (int64)Sum of the points counts across the aggregated sessions.
earliest_created_atstring (date-time) requiredCreation time of the oldest aggregated session.
latest_last_seen_atstring (date-time) requiredMost recent heartbeat time across the aggregated sessions.
merged_data_boundsTimeRangeUnion of the data bounds across the aggregated sessions, if any session has data bounds.
any_in_progressbooleanTrue if at least one aggregated session is in progress.
StreamingSourceAndFilter#
Matches when every child filter matches.
filtersarray ofStreamingSourceSearchFilter1 to 100 items.
StreamingSourceAttribution#
Where a streaming session’s data comes from.
Set exactly one of the fields below.
- one of
mesh,data_connector,customrequired
meshMeshSourceAttribution
data_connectorDataConnectorSourceAttribution
customCustomSourceAttribution
StreamingSourceNotFilter#
Matches when the child filter does not.
filterStreamingSourceSearchFilterrequired
StreamingSourceOrFilter#
Matches when any child filter matches.
filtersarray ofStreamingSourceSearchFilter1 to 100 items.
StreamingSourceSearchFilter#
Filter for streaming-source search.
Set exactly one of the fields below.
- one of 6 fields required
dataset_ridsStreamingDatasetRidsFilter
sourceExactStreamingSourceFilter
workspaceStreamingWorkspaceFilter
StreamingWorkspaceFilter#
Matches sessions or sources whose dataset belongs to the workspace.
workspace_ridstring requiredAt most 1,024 characters.
TimeRange#
A closed time range.
start must not be after end.
startstring (date-time) required
endstring (date-time) required
Page design based on Scalar, MIT License.