Some data that is not stored in the models is available from services. The services use some of the same resource ids as the models. This allows them to be connected to model queries and other services connected to the API.
Use the service axis to send a request to a service. The right hand side of the service step is the service id, for example, service::text_search. Pass parameters to the service using the filter syntax:
An API service query creates a response that is very similar to a query using models and associations. This similarity includes many of the actual models in the API. The specific parameters, behavior and result schema depends on the individual service.
Pipes Connect Services and the API Models
The pipe axis is used to connect a service query stage to a model query stage. While the results of services are similar to the API data format, they are not identical. Also the services provide some associated data with the results, but not with the flexibility of RMA association paths.
Use the pipe axis with the pipe name on the right hand side to specify a pipe stage. Currently the only pipe is pipe::list. Use the filter syntax to pull parts of a query response out and assign them to a comma separated list.
The above pipe takes the result of a model::probe query from the API or a service result that contains a set of probes. It collects the id attributes of the probes into a comma separated list. It then assigns that list to the probe_id variable in the scope of the service pipeline query.
The pipe variable can be passed into an API model stage by using a "$" before the variable name in the filter syntax. The examples are shown on multiple lines for better readability.
A pipe can also be used to pass data from a model query to a service.
Multiple pipes can be used to create a more interesting service pipeline.