Results API
This API collects results from Orbital from a query created either by the Orbital User Interface, your applications, or the Query API. Orbital will provide results as soon as they are received from a node, and will retain them for at least 24 hours but no longer than 48 hours.
You can also see the results of probes, known as Live Queries, this way. However, the results of Live Queries are returned all at once, as the query itself is only run once. Refer to Live Queries for more information on Live Queries.
Example 1: Collecting Lists of Processes
The body of any Orbital API request must be formatted as JSON and must be accompanied by a bearer authorization header containing an access token. See Orbital API Authentication for more information on authentication.
http https://$service/v0/jobs/$jobID/results \ "Authorization:Bearer $token" \ limit == 100
Example 2: Collecting More Results
Orbital will limit the number of results, and obviously cannot return results from nodes that have not run the query, yet. If the service believes it is possible that there will be more results, it will return a cursor
with each response. Your application can use the cursor
in subsequent requests to request results after that response.
If Orbital has no new results, it will echo the cursor back to your application. This should be regarded as a request that you come back, later to collect another batch of results. (The format of the cursor is internal to Orbital, please do not rely on information you extract from it.)
http https://$service/v0/jobs/$jobID/results \ "Authorization:Bearer $token" \ limit == 100 \ cursor == "1dd74b03-1969-4dc2-9658-4d856601e06d"
Request Parameters
Orbital accepts the following parameters when creating a Scheduled or Live query.
jobID
– A unique identifier for the query job, returned by the Query API or available in the Orbital user interface. Also called a query ID.limit
– A limit on the number of results Orbital will return. Orbital will try to satisfy this limit, but will stop short if it encounters an internal limit. Defaults to 100.cursor
– An optional parameter taken from a previous request that tells Orbital the last result you have handled. Orbital will provide this in each response if there is a possibility that there will be more results.