API YAML
In your Rill project directory, create a new file name <api-name>.yaml
in the apis
directory containing a custom API definition.
See comprehensive documentation on how to define and use custom APIs
Properties
type
— Refers to the resource type and must be api
(required).
connector
— Refers to the OLAP engine if not already set in rill.yaml or if using multiple OLAP connectors in a single project. Only applies when using sql
(optional).
Either one of the following:
-
sql
— General SQL query referring a model (required). -
metrics_sql
— SQL query referring metrics definition and dimensions defined in the metrics view (required).
skip_nested_security
(boolean) - Ignore any security on referenced metrics views. Default false
(optional)
openapi
- Provide a OpenAPI specification for your endpoint (optional)
summary
- Summary of your apiparameters
- Accepted parameters, see the parameters specificationrequest_schema
- Request schema, see the request schema specificationresponse_schema
- Response schema, see the response schema specification
security
access
- access policy to access the API endpoint