- Legion API
- Streams
- Get terminal streams
Get terminal streams
const url = 'https://legion.picogrid.com/v2/terminals/example/streams?paging_direction=forwards';const options = {method: 'GET'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'https://legion.picogrid.com/v2/terminals/example/streams?paging_direction=forwards'Gets all streams for the specified terminal paginated
Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”The id of the terminal you want to get streams for
Query Parameters
Section titled “Query Parameters”The maximum number of items to return with a default value of 10. Note that a request never returns more than about 1MB of data irrespective of how high this value is
The cursor given by your previous request used to get the next page of results. Defaults to start from the beginning if forwards and end if backwards
The direction for the pagination cursor. Defaults to forwards
The id of the organization to get terminal streams for
Responses
Section titled “Responses”Success
object
object
The ids of the processors you have instantiated for your organization and attached to this stream. Picogrid offers several different types of processing for different data streams such as object detection on image/jpg type streams
Epoch milliseconds integer. See https://en.wikipedia.org/wiki/Unix_time for more information
The namespaces compatible with this stream. Namespaces define the commands available for a stream. For instance, the FLIR namespace enables users to perform PTZ commands on a FLIR camera.
object
Is false in this case which means you have reached the end of available results
object
Is true in this case which means there are more pages to be fetched
The cursor specifying your current pagination progress used to fetch next pages. Is only present if has_more is true
Example
{ "pagination": { "has_more": false }}Headers
Section titled “Headers”The Access-Control-Allow-Credentials response header tells browsers whether to expose the response to the frontend JavaScript code when the request’s credentials mode (Request.credentials) is include. - MDN Link
Bad Request Error
object
Examplegenerated
{ "message": "example"}Headers
Section titled “Headers”The Access-Control-Allow-Credentials response header tells browsers whether to expose the response to the frontend JavaScript code when the request’s credentials mode (Request.credentials) is include. - MDN Link
Authentication Error
object
Examplegenerated
{ "message": "example"}Headers
Section titled “Headers”The Access-Control-Allow-Credentials response header tells browsers whether to expose the response to the frontend JavaScript code when the request’s credentials mode (Request.credentials) is include. - MDN Link
Unauthorized Error
object
Examplegenerated
{ "message": "example"}Headers
Section titled “Headers”The Access-Control-Allow-Credentials response header tells browsers whether to expose the response to the frontend JavaScript code when the request’s credentials mode (Request.credentials) is include. - MDN Link
Resource Not Found Error
object
Examplegenerated
{ "message": "example"}Headers
Section titled “Headers”The Access-Control-Allow-Credentials response header tells browsers whether to expose the response to the frontend JavaScript code when the request’s credentials mode (Request.credentials) is include. - MDN Link
Timeout Error
object
Examplegenerated
{ "message": "example"}Headers
Section titled “Headers”The Access-Control-Allow-Credentials response header tells browsers whether to expose the response to the frontend JavaScript code when the request’s credentials mode (Request.credentials) is include. - MDN Link
Error
object
Examplegenerated
{ "message": "example"}Headers
Section titled “Headers”The Access-Control-Allow-Credentials response header tells browsers whether to expose the response to the frontend JavaScript code when the request’s credentials mode (Request.credentials) is include. - MDN Link
Bad Gateway Error
object
Examplegenerated
{ "message": "example"}Headers
Section titled “Headers”The Access-Control-Allow-Credentials response header tells browsers whether to expose the response to the frontend JavaScript code when the request’s credentials mode (Request.credentials) is include. - MDN Link
Version 2 · commit 0771262
