Create Topic
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.
The token can be generated using the Authentication API.
The ID (UUID) of the cluster.
e69b22a5-8fee-56b1-b6fb-4a07e4205eadMetadata
Topic successfully created.
The ID (UUID) of the Topic.
ae085c4c-3626-5f1d-b4bc-cc53ae8267ceThe type of the resource.
The URL of the Topic.
/clusters/{clusterId}/topics/ae085c4c-3626-5f1d-b4bc-cc53ae8267ceBad Request
The request send to the API was malformed.
Unauthorized
The request is missing authorization information or the authorization information provided are expired.
Not Allowed
The user issuing the request does not have the needed permissions.
Conflict
The request could not be completed due to a conflict with the current state of the resource.
Unsupported Media Type
The request has an unsupported media type.
Unprocessable Entity
The request was well-formed but was unable to be followed due to semantic errors.
Too Many Requests
The user has sent too many requests in a given amount of time.
Internal Server Error
An internal error occurred. We apologize for the inconvenience!
Service Unavailable
The server is currently unable to handle the request due to a temporary overloading or maintenance of the server.
Unexpected Internal Server Error
An unexpected internal error occurred. We apologize for the inconvenience!
POST /clusters/{clusterId}/topics HTTP/1.1
Host: kafka.de-txl.ionos.com
Authorization: Bearer YOUR_SECRET_TOKEN
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
}
}
}Last updated
Was this helpful?