Operations
Poll a monitor
Get the results that are new since the last poll, in the same shape as a search response. The poll is recorded in the monitor's session unless the body names a session_id or lineage metadata.
POST/v1/monitors/{monitor_id}/poll
Send your API key as Authorization: Bearer. See Authentication. How each option works: Monitors.
Path parameter
monitor_id- The ID of the monitor, from the response that created it.
Request body
The body is optional.
session_id- Record the poll in this session. Without
session_idandmetadata, Telem records it in the monitor's session. metadata- Query lineage keys, as in a search.
Response
200The results that are new since your last poll, in the same shape as a Search response.
status- The state of the call, such as
succeeded. preprocessor_runs[]- One run for each provider and query. A provider that fails does not fail the call: its run has an
error. preprocessor_runs[].preprocessor_name- The provider of the run.
preprocessor_runs[].query- The query of the run.
batch_indexis its place in a batch. preprocessor_runs[].output_payload.results[]- The results of the run. They have the same fields whichever provider found them: see the fields per tier.
preprocessor_runs[].error- Why the run failed, or
null. session_id- The session that recorded the call. Send it back as
session_idto add the next call to it. interaction_id- The ID of this call.
normalized_schema_version- The version of the result format:
2.
created_at, completed_at: when Telem received the call and when it finished.
The response also has instance_id, trajectory_id, parent_trajectory_id, trajectory_goal, postprocessor_runs, missing_snapshots, client_advisory. You do not need them to read the results.
Errors
| Status | Code | When |
|---|---|---|
400 | invalid_request | session_id belongs to another monitor: error.param is session_id. Or a provider no longer has this monitor: polling again will not help, so end the monitor and create a new one. |
400 | invalid_session | The session in metadata is not correct. |
401 | unauthorized | The API key is missing or not valid. |
403 | The API key has no access to monitors. | |
404 | not_found | The monitor does not exist, or another API key created it. |
429 | rate_limited | Your key went over its requests-per-minute cap, or Telem is busy. Wait for the seconds in Retry-After, then try again. |
503 | unavailable | Telem cannot run monitors now. Try again later. |
409 | poll_in_progress | Another call uses this monitor now. Try again. |
409 | monitor_ended | The monitor has ended: its end time passed, or its API key was revoked or expired. Its results stay readable. Create a new monitor. |
409 | missing_snapshots | The request names earlier context that Telem does not have. Nothing ran. Send it again with that context. |
502 | unavailable | Every run of the poll failed. Try again. |
What each error means and what to do: Errors.