Skip to content

Topics

All operations require authentication.

6 operationsv2/publicCloud/project
Agent setup

List topicsBeta

GET
/v2/publicCloud/project/{projectId}/managedAnalytics/kafka/{serviceId}/topic

Returns the topics of the service with their partitions, replication and retention settings.

Path parameters

projectId
required
string

Project ID

serviceId
required
stringuuid

Service ID

Headers

X-Pagination-Cursor
string

Pagination cursor

X-Pagination-Size
integer

Pagination size

Response

200Topic[]successful operation
checksum
read-only
string

Hash of the resource used for concurrency control

createdAt
read-only
stringdate-time

Date at which the resource was created

id
read-only
stringuuid

Unique identifier of the topic

minimumInSyncReplicas
read-only
integer

Minimum number of in-sync replicas required before a write is acknowledged

name
read-only
string

Name of the Kafka topic

partitions
read-only
integer

Number of partitions for this topic

replication
read-only
integer

Replication factor for this topic

retentionBytes
read-only
integer

Maximum size in bytes retained per partition. -1 means unlimited.

retentionHours
read-only
integer

Maximum time in hours that messages are retained. -1 means unlimited.

updatedAt
read-only
stringdate-time

Date of the last update to the resource

Example uses projectId = string, serviceId = 00000000-0000-0000-0000-000000000000

$ curl https://api.eu.ovhcloud.com/v2/publicCloud/project/{projectId}/managedAnalytics/kafka/{serviceId}/topic \
  -H "authorization: Bearer $OVH_TOKEN"
ResponseExample
[ { "checksum": "string", "createdAt": "2024-01-01T12:00:00Z", "id": "00000000-0000-0000-0000-000000000000", "minimumInSyncReplicas": 0, "name": "string", "partitions": 0, "replication": 0, "retentionBytes": 0, "retentionHours": 0, "updatedAt": "2024-01-01T12:00:00Z" }]

Get a topicBeta

GET
/v2/publicCloud/project/{projectId}/managedAnalytics/kafka/{serviceId}/topic/{topicId}

Returns the partitions, replication factor, minimum in-sync replicas and retention settings of the topic.

Path parameters

projectId
required
string

Project ID

serviceId
required
stringuuid

Service ID

topicId
required
stringuuid

Topic ID

Response

200Topicsuccessful operation
checksum
read-only
string

Hash of the resource used for concurrency control

createdAt
read-only
stringdate-time

Date at which the resource was created

id
read-only
stringuuid

Unique identifier of the topic

minimumInSyncReplicas
read-only
integer

Minimum number of in-sync replicas required before a write is acknowledged

name
read-only
string

Name of the Kafka topic

partitions
read-only
integer

Number of partitions for this topic

replication
read-only
integer

Replication factor for this topic

retentionBytes
read-only
integer

Maximum size in bytes retained per partition. -1 means unlimited.

retentionHours
read-only
integer

Maximum time in hours that messages are retained. -1 means unlimited.

updatedAt
read-only
stringdate-time

Date of the last update to the resource

Example uses projectId = string, serviceId = 00000000-0000-0000-0000-000000000000, topicId = 00000000-0000-0000-0000-000000000000

$ curl https://api.eu.ovhcloud.com/v2/publicCloud/project/{projectId}/managedAnalytics/kafka/{serviceId}/topic/{topicId} \
  -H "authorization: Bearer $OVH_TOKEN"
ResponseExample
{ "checksum": "string", "createdAt": "2024-01-01T12:00:00Z", "id": "00000000-0000-0000-0000-000000000000", "minimumInSyncReplicas": 0, "name": "string", "partitions": 0, "replication": 0, "retentionBytes": 0, "retentionHours": 0, "updatedAt": "2024-01-01T12:00:00Z"}

Create a topicBeta

POST
/v2/publicCloud/project/{projectId}/managedAnalytics/kafka/{serviceId}/topic

Creates a topic. By default it has 1 partition, a replication factor of 1 and a retention of 168 hours (7 days). The replication factor must not exceed the number of brokers.

Path parameters

projectId
required
string

Project ID

serviceId
required
stringuuid

Service ID

Request body (required)

minimumInSyncReplicas
integer

Minimum number of in-sync replicas. Defaults to 1 when null.

name
required
string

Name of the Kafka topic

partitions
integer

Number of partitions. Defaults to 1 when null.

replication
integer

Replication factor. Must not exceed the number of brokers. Defaults to 1 when null.

retentionBytes
integer

Maximum size in bytes retained per partition. -1 means unlimited. Defaults to -1 when null.

retentionHours
integer

Maximum time in hours that messages are retained. -1 means unlimited. Defaults to 168 (7 days) when null.

Response

200Topicsuccessful operation
checksum
read-only
string

Hash of the resource used for concurrency control

createdAt
read-only
stringdate-time

Date at which the resource was created

id
read-only
stringuuid

Unique identifier of the topic

minimumInSyncReplicas
read-only
integer

Minimum number of in-sync replicas required before a write is acknowledged

name
read-only
string

Name of the Kafka topic

partitions
read-only
integer

Number of partitions for this topic

replication
read-only
integer

Replication factor for this topic

retentionBytes
read-only
integer

Maximum size in bytes retained per partition. -1 means unlimited.

retentionHours
read-only
integer

Maximum time in hours that messages are retained. -1 means unlimited.

updatedAt
read-only
stringdate-time

Date of the last update to the resource

Example uses projectId = string, serviceId = 00000000-0000-0000-0000-000000000000

$ curl https://api.eu.ovhcloud.com/v2/publicCloud/project/{projectId}/managedAnalytics/kafka/{serviceId}/topic \
  -H "authorization: Bearer $OVH_TOKEN"
ResponseExample
{ "checksum": "string", "createdAt": "2024-01-01T12:00:00Z", "id": "00000000-0000-0000-0000-000000000000", "minimumInSyncReplicas": 0, "name": "string", "partitions": 0, "replication": 0, "retentionBytes": 0, "retentionHours": 0, "updatedAt": "2024-01-01T12:00:00Z"}

Delete a topicBeta

DELETE
/v2/publicCloud/project/{projectId}/managedAnalytics/kafka/{serviceId}/topic/{topicId}

Permanently deletes the topic and its messages.

Path parameters

projectId
required
string

Project ID

serviceId
required
stringuuid

Service ID

topicId
required
stringuuid

Topic ID

Response

200Topicsuccessful operation
checksum
read-only
string

Hash of the resource used for concurrency control

createdAt
read-only
stringdate-time

Date at which the resource was created

id
read-only
stringuuid

Unique identifier of the topic

minimumInSyncReplicas
read-only
integer

Minimum number of in-sync replicas required before a write is acknowledged

name
read-only
string

Name of the Kafka topic

partitions
read-only
integer

Number of partitions for this topic

replication
read-only
integer

Replication factor for this topic

retentionBytes
read-only
integer

Maximum size in bytes retained per partition. -1 means unlimited.

retentionHours
read-only
integer

Maximum time in hours that messages are retained. -1 means unlimited.

updatedAt
read-only
stringdate-time

Date of the last update to the resource

Example uses projectId = string, serviceId = 00000000-0000-0000-0000-000000000000, topicId = 00000000-0000-0000-0000-000000000000

$ curl https://api.eu.ovhcloud.com/v2/publicCloud/project/{projectId}/managedAnalytics/kafka/{serviceId}/topic/{topicId} \
  -H "authorization: Bearer $OVH_TOKEN"
ResponseExample
{ "checksum": "string", "createdAt": "2024-01-01T12:00:00Z", "id": "00000000-0000-0000-0000-000000000000", "minimumInSyncReplicas": 0, "name": "string", "partitions": 0, "replication": 0, "retentionBytes": 0, "retentionHours": 0, "updatedAt": "2024-01-01T12:00:00Z"}

Update a topicBeta

PUT
/v2/publicCloud/project/{projectId}/managedAnalytics/kafka/{serviceId}/topic/{topicId}

Updates the partitions, replication, minimum in-sync replicas and retention of the topic. Every field is required. The number of partitions can only be increased.

Path parameters

projectId
required
string

Project ID

serviceId
required
stringuuid

Service ID

topicId
required
stringuuid

Topic ID

Request body (required)

minimumInSyncReplicas
required
integer

Minimum number of in-sync replicas required before a write is acknowledged

partitions
required
integer

New number of partitions. Can only be increased, never decreased.

replication
required
integer

New replication factor. Must not exceed the number of brokers.

retentionBytes
required
integer

Maximum size in bytes retained per partition. -1 means unlimited.

retentionHours
required
integer

Maximum time in hours that messages are retained. -1 means unlimited.

Response

200Topicsuccessful operation
checksum
read-only
string

Hash of the resource used for concurrency control

createdAt
read-only
stringdate-time

Date at which the resource was created

id
read-only
stringuuid

Unique identifier of the topic

minimumInSyncReplicas
read-only
integer

Minimum number of in-sync replicas required before a write is acknowledged

name
read-only
string

Name of the Kafka topic

partitions
read-only
integer

Number of partitions for this topic

replication
read-only
integer

Replication factor for this topic

retentionBytes
read-only
integer

Maximum size in bytes retained per partition. -1 means unlimited.

retentionHours
read-only
integer

Maximum time in hours that messages are retained. -1 means unlimited.

updatedAt
read-only
stringdate-time

Date of the last update to the resource

Example uses projectId = string, serviceId = 00000000-0000-0000-0000-000000000000, topicId = 00000000-0000-0000-0000-000000000000

$ curl https://api.eu.ovhcloud.com/v2/publicCloud/project/{projectId}/managedAnalytics/kafka/{serviceId}/topic/{topicId} \
  -H "authorization: Bearer $OVH_TOKEN"
ResponseExample
{ "checksum": "string", "createdAt": "2024-01-01T12:00:00Z", "id": "00000000-0000-0000-0000-000000000000", "minimumInSyncReplicas": 0, "name": "string", "partitions": 0, "replication": 0, "retentionBytes": 0, "retentionHours": 0, "updatedAt": "2024-01-01T12:00:00Z"}

Partially update a topicBeta

PATCH
/v2/publicCloud/project/{projectId}/managedAnalytics/kafka/{serviceId}/topic/{topicId}

Partially updates the partitions, replication, minimum in-sync replicas or retention of the topic. The number of partitions can only be increased.

Path parameters

projectId
required
string

Project ID

serviceId
required
stringuuid

Service ID

topicId
required
stringuuid

Topic ID

Request body (required)

minimumInSyncReplicas
integer

Minimum number of in-sync replicas required before a write is acknowledged

partitions
integer

New number of partitions. Can only be increased, never decreased.

replication
integer

New replication factor. Must not exceed the number of brokers.

retentionBytes
integer

Maximum size in bytes retained per partition. -1 means unlimited.

retentionHours
integer

Maximum time in hours that messages are retained. -1 means unlimited.

Response

200Topicsuccessful operation
checksum
read-only
string

Hash of the resource used for concurrency control

createdAt
read-only
stringdate-time

Date at which the resource was created

id
read-only
stringuuid

Unique identifier of the topic

minimumInSyncReplicas
read-only
integer

Minimum number of in-sync replicas required before a write is acknowledged

name
read-only
string

Name of the Kafka topic

partitions
read-only
integer

Number of partitions for this topic

replication
read-only
integer

Replication factor for this topic

retentionBytes
read-only
integer

Maximum size in bytes retained per partition. -1 means unlimited.

retentionHours
read-only
integer

Maximum time in hours that messages are retained. -1 means unlimited.

updatedAt
read-only
stringdate-time

Date of the last update to the resource

Example uses projectId = string, serviceId = 00000000-0000-0000-0000-000000000000, topicId = 00000000-0000-0000-0000-000000000000

$ curl https://api.eu.ovhcloud.com/v2/publicCloud/project/{projectId}/managedAnalytics/kafka/{serviceId}/topic/{topicId} \
  -H "authorization: Bearer $OVH_TOKEN"
ResponseExample
{ "checksum": "string", "createdAt": "2024-01-01T12:00:00Z", "id": "00000000-0000-0000-0000-000000000000", "minimumInSyncReplicas": 0, "name": "string", "partitions": 0, "replication": 0, "retentionBytes": 0, "retentionHours": 0, "updatedAt": "2024-01-01T12:00:00Z"}