Persisted Operations
Persisted Operations (POPs) are pre-defined GQL operations. POP query responses are globally cacheable and deliverable from the edge for much faster response times than custom direct queries. POP mutation requests take advantage of global routing for faster overall network transit based on originating location.
Authentication
API user authentication
API users are assigned and associated with exactly one station. See HTTP API - API Auth for information about how to obtain a token.
Making a request
A POPs request is comprised of:
- the base URL,
- a version identifier,
- the POP name, and
- any operation parameters (arguments).
The complete format is: {basUrl}/{versionIdentifier}/{popName}?{operationParameters}
Example: https://dev.api.localstreaming.org/pops/v1/getMovies?country=US&genreVibes=food&genreVibes=drama&sortByField=createdAt&sortByOrder=desc&stationId=93c39d90-e15f-4cf3-b719-f22296eb853a
Base URL
Development
https://dev.api.localstreaming.org/pops
Production
https://api.localstreaming.org/pops
Version identifiers
v1
The initial version identifier for production-ready POPs.
Any breaking changes made to these POPs queries in the future will require a new version identifier.
experimental
Do not use operations in this version identifier for production applications.
In progress or incomplete POPs that may change dramatically before being added to a production-ready version identifier.
POP name
Determines which operation will be run. E.g., getStation, getShow, getLikes, etc.
HTTP verbs
For POPs executing GraphQL queries, use the HTTP GET verb.
For POPs executing GraphQL mutations, use the HTTP POST verb.
Query parameters
The GraphQL operation arguments are set via HTTP query parameters.
E.g., to set the stationId for a POP request, add ?stationId={stationId} as a query parameter.
Query parameters can be set multiple times to create an array: ?genreVibes=food&genreVibes=drama.