Skip to content

Latest commit

 

History

History
155 lines (127 loc) · 3.76 KB

api.md

File metadata and controls

155 lines (127 loc) · 3.76 KB
title Aiven API

import RIP from "@site/static/includes/run-in-postman.md"; import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; import RelatedPages from "@site/src/components/RelatedPages";

Use the Aiven API to programmatically access and automate tasks in the Aiven platform.

Common use cases for the Aiven API:

  • Use with continuous integration to create services during test runs.
  • Integrate with other parts of your existing automation setup to complete complex tasks.
  • Deploy and tear down development or demo platforms on a schedule.
  • Scale your disks based on specific events.

:::tip Want to manage Aiven services from an AI assistant? Use Aiven MCP to create, update, and inspect services in natural language from clients such as Cursor and Claude Code. :::

Get started with Aiven API

Use the Postman workspace to try the Aiven API.

  1. Create a token.

  2. Fork the Postman collection and environment.

  3. Insert the token in the authToken in the Postman environment.

  4. See the API documentation.

  5. Send your requests via Postman.

API examples

List your projects

curl -H "Authorization: aivenv1 TOKEN" https://api.aiven.io/v1/project

Where TOKEN is your token.

{
  "project_membership": {
    "my-best-demo": "admin",
    "aiven-sandbox": "admin"
  },
  "project_memberships": {
    "my-best-demo": [
      "admin"
    ],
    "aiven-sandbox": [
      "admin"
    ]
  },
  "projects": [
    {
      "account_id": "a225dad8d3c4",
      "account_name": "Aiven Accounts",
      "address_lines": [],
      "available_credits": "0.00",
      "billing_address": "",
      "billing_currency": "USD",
      "billing_emails": [],
      "billing_extra_text": null,
      "billing_group_id": "588a8e63-fda7-4ff7-9bff-577debfee604",
      "billing_group_name": "Billing",
      "card_info": null,
      "city": "",
      "company": "",
      "country": "",
      "country_code": "",
      "default_cloud": "google-europe-north1",
      "end_of_life_extension": {},
      "estimated_balance": "4.11",
      "estimated_balance_local": "4.11",
      "payment_method": "no_payment_expected",
      "project_name": "my-best-demo",
      "state": "",
      "tags": {},
      "tech_emails": [],
      "tenant_id": "aiven",
      "trial_expiration_time": null,
      "vat_id": "",
      "zip_code": ""
    },
    {
     //...
    }
  ]
}

List cloud regions

curl https://api.aiven.io/v1/clouds

This endpoint does not require authorization. If you aren't authenticated, it returns the standard set of cloud regions.

{
  "clouds": [
    {
      "cloud_description": "Africa, South Africa - Amazon Web Services: Cape Town",
      "cloud_name": "aws-af-south-1",
      "geo_latitude": -33.92,
      "geo_longitude": 18.42,
      "geo_region": "africa"
    },
    {
      "cloud_description": "Africa, South Africa - Azure: South Africa North",
      "cloud_name": "azure-south-africa-north",
      "geo_latitude": -26.198,
      "geo_longitude": 28.03,
      "geo_region": "africa"
    },
}