Confluent | the Data Streaming Platform API Keys API

The API Keys API from Confluent | the Data Streaming Platform — 2 operation(s) for api keys.

OpenAPI Specification

confluent-the-data-streaming-platform-api-keys-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Confluent Cloud REST API (selected) API Keys API
  description: 'A best-effort subset of the Confluent Cloud control-plane REST APIs:

    Organizations and Environments (org/v2), Service Accounts and Cloud

    API Keys (iam/v2), and Kafka Clusters (cmk/v2). Confluent Cloud

    additionally publishes data-plane APIs (Kafka REST v3, Schema Registry,

    Connect, ksqlDB, Flink) on per-cluster endpoints that are not modeled

    here. Authentication uses HTTP Basic with a Cloud API Key/Secret pair,

    or OAuth 2.0 (Confluent STS / external IdP).

    '
  version: 2.0.0
  contact:
    name: Confluent Cloud API Reference
    url: https://docs.confluent.io/cloud/current/api.html
servers:
- url: https://api.confluent.cloud
  description: Confluent Cloud control plane
security:
- basicAuth: []
- bearerAuth: []
tags:
- name: API Keys
paths:
  /iam/v2/api-keys:
    get:
      tags:
      - API Keys
      summary: List API keys
      parameters:
      - in: query
        name: spec.owner
        schema:
          type: string
      - in: query
        name: spec.resource
        schema:
          type: string
      - in: query
        name: page_size
        schema:
          type: integer
          default: 10
      - in: query
        name: page_token
        schema:
          type: string
      responses:
        '200':
          description: A page of API keys
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiKeyList'
    post:
      tags:
      - API Keys
      summary: Create an API key
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ApiKey'
      responses:
        '201':
          description: API key created (secret returned exactly once)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiKey'
  /iam/v2/api-keys/{id}:
    get:
      tags:
      - API Keys
      summary: Get an API key
      parameters:
      - in: path
        name: id
        required: true
        schema:
          type: string
      responses:
        '200':
          description: An API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiKey'
    delete:
      tags:
      - API Keys
      summary: Delete an API key
      parameters:
      - in: path
        name: id
        required: true
        schema:
          type: string
      responses:
        '204':
          description: API key deleted
components:
  schemas:
    ApiKeyList:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/ApiKey'
        metadata:
          $ref: '#/components/schemas/ListMetadata'
    ApiKey:
      type: object
      properties:
        api_version:
          type: string
          example: iam/v2
        kind:
          type: string
          example: ApiKey
        id:
          type: string
        metadata:
          $ref: '#/components/schemas/ResourceMetadata'
        spec:
          type: object
          properties:
            display_name:
              type: string
            description:
              type: string
            secret:
              type: string
              readOnly: true
            owner:
              type: object
              properties:
                id:
                  type: string
                api_version:
                  type: string
                kind:
                  type: string
            resource:
              type: object
              properties:
                id:
                  type: string
                api_version:
                  type: string
                kind:
                  type: string
                environment:
                  type: string
    ResourceMetadata:
      type: object
      properties:
        self:
          type: string
          format: uri
        resource_name:
          type: string
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
        deleted_at:
          type: string
          format: date-time
    ListMetadata:
      type: object
      properties:
        first:
          type: string
          format: uri
        last:
          type: string
          format: uri
        prev:
          type: string
          format: uri
        next:
          type: string
          format: uri
        total_size:
          type: integer
  securitySchemes:
    basicAuth:
      type: http
      scheme: basic
      description: Cloud API Key (key) and Secret (password)
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: Confluent STS or external OAuth access token