Skip to main content
Services are the core resources in Aiven, including databases like PostgreSQL and MySQL, streaming platforms like Apache Kafka, and other data infrastructure services.

List services

Retrieve all services in a project.
GET /v1/project/{project}/service
project
string
required
Project name

Request example

curl -X GET "https://api.aiven.io/v1/project/my-project/service" \
  -H "Authorization: aivenv1 YOUR_TOKEN"

Response

services
array
List of service objects

Response example

{
  "services": [
    {
      "service_name": "pg-demo",
      "service_type": "pg",
      "state": "RUNNING",
      "cloud_name": "google-europe-west3",
      "plan": "business-4",
      "create_time": "2024-01-15T10:30:00Z",
      "update_time": "2024-03-01T14:20:00Z",
      "node_count": 3,
      "disk_space_mb": 81920,
      "termination_protection": false,
      "service_uri": "postgres://avnadmin:[email protected]:12345/defaultdb?sslmode=require"
    }
  ]
}

Get service details

Retrieve detailed information about a specific service.
GET /v1/project/{project}/service/{service_name}
project
string
required
Project name
service_name
string
required
Service name

Request example

curl -X GET "https://api.aiven.io/v1/project/my-project/service/pg-demo" \
  -H "Authorization: aivenv1 YOUR_TOKEN"

Response

service
object
Detailed service information (same structure as list services)

Create service

Create a new Aiven service.
POST /v1/project/{project}/service
project
string
required
Project name

Request body

service_name
string
required
Name for the new service (3-63 characters)
service_type
string
required
Service type: pg, mysql, kafka, opensearch, caching, clickhouse, grafana, etc.
plan
string
required
Service plan (e.g., hobbyist, startup-4, business-4)
cloud
string
required
Cloud region (e.g., google-europe-west3, aws-us-east-1)
disk_space_mb
integer
Total disk space in megabytes (overrides plan default)
project_vpc_id
string
VPC ID to deploy the service in
termination_protection
boolean
Enable termination protection (default: false)
user_config
object
Service-specific configuration options

Request example

curl -X POST "https://api.aiven.io/v1/project/my-project/service" \
  -H "Authorization: aivenv1 YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "service_name": "pg-prod",
    "service_type": "pg",
    "plan": "business-4",
    "cloud": "google-europe-west3",
    "termination_protection": true
  }'

Response

service
object
The newly created service object with state REBUILDING
Services start in the REBUILDING state and transition to RUNNING when ready. This typically takes 5-15 minutes depending on the service type and plan.

Update service

Update service configuration, plan, or cloud region.
PUT /v1/project/{project}/service/{service_name}
project
string
required
Project name
service_name
string
required
Service name

Request body

plan
string
Change service plan
cloud
string
Migrate service to different cloud region
disk_space_mb
integer
Increase disk space (cannot be decreased)
powered
boolean
Power service on (true) or off (false)
termination_protection
boolean
Enable or disable termination protection
maintenance
object
Maintenance window configuration (dow, time)
user_config
object
Update service-specific configuration

Request example

curl -X PUT "https://api.aiven.io/v1/project/my-project/service/pg-demo" \
  -H "Authorization: aivenv1 YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "plan": "business-8"
  }'

Response

service
object
The updated service object

Delete service

Permanently delete a service and all its data.
DELETE /v1/project/{project}/service/{service_name}
project
string
required
Project name
service_name
string
required
Service name
This operation is irreversible. All service data will be permanently deleted. Services with termination protection enabled cannot be deleted until protection is disabled.

Request example

curl -X DELETE "https://api.aiven.io/v1/project/my-project/service/pg-demo" \
  -H "Authorization: aivenv1 YOUR_TOKEN"

Response

Returns 200 OK with an empty response body on success.

List service types

Get available service types and their descriptions.
GET /v1/service_types

Request example

curl -X GET "https://api.aiven.io/v1/service_types" \
  -H "Authorization: aivenv1 YOUR_TOKEN"

Response

service_types
array
List of available service types

Response example

{
  "service_types": [
    {
      "service_type": "pg",
      "description": "PostgreSQL - Object-Relational Database Management System",
      "latest_available_version": "16"
    },
    {
      "service_type": "kafka",
      "description": "Kafka - High-Throughput Distributed Messaging System",
      "latest_available_version": "3.7"
    },
    {
      "service_type": "opensearch",
      "description": "OpenSearch - Search & Analyze Data in Real Time",
      "latest_available_version": "2.11"
    }
  ]
}

List service plans

Get available plans for a service type in a specific cloud region.
GET /v1/project/{project}/service_types/{service_type}/plans
project
string
required
Project name
service_type
string
required
Service type (e.g., pg, kafka)
cloud
string
Filter by cloud region

Request example

curl -X GET "https://api.aiven.io/v1/project/my-project/service_types/pg/plans?cloud=google-europe-west3" \
  -H "Authorization: aivenv1 YOUR_TOKEN"

Build docs developers (and LLMs) love