Enable Aiven for PostgreSQL® Data API Limited availability
Enable Data API to expose a database in your Aiven for PostgreSQL® service as REST endpoints.
Prerequisites
To enable Data API, you need the following:
- Limited availability access to Data API. To request access, contact Aiven.
- Data API available for your service's plan and cloud. If it isn't, the Aiven Console shows The data API is not available for your service.
- The
project:services:writeandservice:data:writepermissions. - An identity provider (IdP) that issues JWTs and publishes a JWKS URL over HTTPS. Auth0, Okta, and Microsoft Entra ID are common options.
Enable Data API for a database
- In the Aiven Console, open your Aiven for PostgreSQL service.
- Click Connect > Data API.
- In the Database list, select the database to expose.
- Click Set up API.
- In the Data API dialog, under Identity provider, configure the following:
- JWKS URL: Enter the HTTPS URL where your IdP publishes its public keys.
- Audience: Enter the API identifier configured in your IdP.
- Click Enable API.
Data API starts deploying, and the service status shows Building. When the application is healthy, the status changes to Running and the endpoints become available. While the service is still being provisioned, setup is unavailable and the Aiven Console shows Set up your data API with a note that the service is still being provisioned.
For details on the JWKS URL and audience fields, see Configure authentication.
Next steps
- Configure authentication and authorization for the Data API.
- Call the endpoints with code snippets.
- Manage your Data API, including exposing more databases and turning off the API.