Topics

A topic is a category or feed name to which records are published. Topics are the way Kafka organizes messages. They act as logical channels for data streams. Topics are split into partitions, making them scalable and allowing parallelism.

This tag groups all operations for topics.

Retrieve all Topics

get

This endpoint enables retrieving all topics using pagination and optional filters.

Authorizations
Path parameters
clusterIdstring · uuidRequired

The ID (UUID) of the cluster.

Example: e69b22a5-8fee-56b1-b6fb-4a07e4205ead
Responses
200
Returned all requested topics successfully.
application/json
Responseall of
get
GET /clusters/{clusterId}/topics HTTP/1.1
Host: kafka.de-fra.ionos.com
Authorization: Bearer JWT
Accept: */*
{
  "id": "7c1fe82d-a1ea-55fc-a744-12fad4180eef",
  "type": "collection",
  "href": "/clusters/{clusterId}/topics",
  "items": [
    {
      "id": "ae085c4c-3626-5f1d-b4bc-cc53ae8267ce",
      "type": "topic",
      "href": "/clusters/{clusterId}/topics/ae085c4c-3626-5f1d-b4bc-cc53ae8267ce",
      "metadata": {
        "createdDate": "2020-12-10T13:37:50+01:00",
        "createdBy": "ionos:identity:::users/87f9a82e-b28d-49ed-9d04-fba2c0459cd3",
        "createdByUserId": "87f9a82e-b28d-49ed-9d04-fba2c0459cd3",
        "lastModifiedDate": "2020-12-11T13:37:50+01:00",
        "lastModifiedBy": "ionos:identity:::users/87f9a82e-b28d-49ed-9d04-fba2c0459cd3",
        "lastModifiedByUserId": "87f9a82e-b28d-49ed-9d04-fba2c0459cd3",
        "resourceURN": "ionos:<product>:<location>:<contract>:<resource-path>",
        "state": "AVAILABLE",
        "message": "In progress."
      },
      "properties": {
        "name": "my-kafka-cluster-topic",
        "replicationFactor": 3,
        "numberOfPartitions": 3,
        "logRetention": {
          "retentionTime": 604800000,
          "segmentBytes": 1073741824
        }
      }
    }
  ]
}

Create Topic

post

Creates a new topic. The full topic needs to be provided to create the object. Optional data will be filled with defaults or left empty.

Authorizations
Path parameters
clusterIdstring · uuidRequired

The ID (UUID) of the cluster.

Example: e69b22a5-8fee-56b1-b6fb-4a07e4205ead
Body
metadataanyOptional

Metadata

Responses
201
Topic successfully created.
application/json
post
POST /clusters/{clusterId}/topics HTTP/1.1
Host: kafka.de-fra.ionos.com
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 176

{
  "metadata": {},
  "properties": {
    "name": "my-kafka-cluster-topic",
    "replicationFactor": 3,
    "numberOfPartitions": 3,
    "logRetention": {
      "retentionTime": 604800000,
      "segmentBytes": 1073741824
    }
  }
}
{
  "id": "ae085c4c-3626-5f1d-b4bc-cc53ae8267ce",
  "type": "topic",
  "href": "/clusters/{clusterId}/topics/ae085c4c-3626-5f1d-b4bc-cc53ae8267ce",
  "metadata": {
    "createdDate": "2020-12-10T13:37:50+01:00",
    "createdBy": "ionos:identity:::users/87f9a82e-b28d-49ed-9d04-fba2c0459cd3",
    "createdByUserId": "87f9a82e-b28d-49ed-9d04-fba2c0459cd3",
    "lastModifiedDate": "2020-12-11T13:37:50+01:00",
    "lastModifiedBy": "ionos:identity:::users/87f9a82e-b28d-49ed-9d04-fba2c0459cd3",
    "lastModifiedByUserId": "87f9a82e-b28d-49ed-9d04-fba2c0459cd3",
    "resourceURN": "ionos:<product>:<location>:<contract>:<resource-path>",
    "state": "AVAILABLE",
    "message": "In progress."
  },
  "properties": {
    "name": "my-kafka-cluster-topic",
    "replicationFactor": 3,
    "numberOfPartitions": 3,
    "logRetention": {
      "retentionTime": 604800000,
      "segmentBytes": 1073741824
    }
  }
}

Retrieve Topic

get

Returns the topic by ID.

Authorizations
Path parameters
clusterIdstring · uuidRequired

The ID (UUID) of the cluster.

Example: e69b22a5-8fee-56b1-b6fb-4a07e4205ead
topicIdstring · uuidRequired

The ID (UUID) of the topic.

Example: ae085c4c-3626-5f1d-b4bc-cc53ae8267ce
Responses
200
Getting topic was successful.
application/json
get
GET /clusters/{clusterId}/topics/{topicId} HTTP/1.1
Host: kafka.de-fra.ionos.com
Authorization: Bearer JWT
Accept: */*
{
  "id": "ae085c4c-3626-5f1d-b4bc-cc53ae8267ce",
  "type": "topic",
  "href": "/clusters/{clusterId}/topics/ae085c4c-3626-5f1d-b4bc-cc53ae8267ce",
  "metadata": {
    "createdDate": "2020-12-10T13:37:50+01:00",
    "createdBy": "ionos:identity:::users/87f9a82e-b28d-49ed-9d04-fba2c0459cd3",
    "createdByUserId": "87f9a82e-b28d-49ed-9d04-fba2c0459cd3",
    "lastModifiedDate": "2020-12-11T13:37:50+01:00",
    "lastModifiedBy": "ionos:identity:::users/87f9a82e-b28d-49ed-9d04-fba2c0459cd3",
    "lastModifiedByUserId": "87f9a82e-b28d-49ed-9d04-fba2c0459cd3",
    "resourceURN": "ionos:<product>:<location>:<contract>:<resource-path>",
    "state": "AVAILABLE",
    "message": "In progress."
  },
  "properties": {
    "name": "my-kafka-cluster-topic",
    "replicationFactor": 3,
    "numberOfPartitions": 3,
    "logRetention": {
      "retentionTime": 604800000,
      "segmentBytes": 1073741824
    }
  }
}

Delete Topic

delete

Deletes the specified topic.

Authorizations
Path parameters
clusterIdstring · uuidRequired

The ID (UUID) of the cluster.

Example: e69b22a5-8fee-56b1-b6fb-4a07e4205ead
topicIdstring · uuidRequired

The ID (UUID) of the topic.

Example: ae085c4c-3626-5f1d-b4bc-cc53ae8267ce
Responses
202
Deleting topic was successful.
delete
DELETE /clusters/{clusterId}/topics/{topicId} HTTP/1.1
Host: kafka.de-fra.ionos.com
Authorization: Bearer JWT
Accept: */*

No content

Was this helpful?