GET /v1/topics
from metadata.sdk import configure
from metadata.sdk.entities import Topics
configure(
host="https://your-company.open-metadata.org/api",
jwt_token="your-jwt-token"
)
# List first page
topics = Topics.list(limit=50)
for t in topics.data:
print(f"{t.fullyQualifiedName}")
# List all with auto-pagination
for t in Topics.list_all():
print(f"{t.fullyQualifiedName}")
# Filter by service
topics = Topics.list(
service="sample_kafka",
fields=["owners", "tags", "domain"],
limit=50
)
for t in topics.data:
print(f"{t.fullyQualifiedName}")
if t.owners:
print(f" Owners: {[o.name for o in t.owners]}")
if t.tags:
print(f" Tags: {[t.tagFQN for t in t.tags]}")
import static org.openmetadata.sdk.fluent.Topics.*;
// List first page
var result = Topics.list()
.limit(50)
.execute();
for (var t : result.getData()) {
System.out.println(t.getFullyQualifiedName());
}
// Filter by service with fields
var result = Topics.list()
.service("sample_kafka")
.fields("owners", "tags", "domain")
.limit(50)
.execute();
for (var t : result.getData()) {
System.out.println(t.getFullyQualifiedName());
}
# List all
curl "{base_url}/api/v1/topics?limit=50" \
-H "Authorization: Bearer {access_token}"
# Filter by service
curl "{base_url}/api/v1/topics?service=sample_kafka&limit=50" \
-H "Authorization: Bearer {access_token}"
# With fields
curl "{base_url}/api/v1/topics?service=sample_kafka&fields=owners,tags,domains&limit=50" \
-H "Authorization: Bearer {access_token}"
{
"data": [
{
"id": "0a021819-982e-4ee4-a5a2-4af30eaa3016",
"name": "address_book",
"fullyQualifiedName": "sample_kafka.address_book",
"description": "All Protobuf record related events gets captured in this topic",
"version": 0.1,
"updatedAt": 1769982663546,
"updatedBy": "admin",
"service": {
"id": "469ef25e-9bdf-4d5f-8553-eb0ce8581f30",
"type": "messagingService",
"name": "sample_kafka",
"fullyQualifiedName": "sample_kafka",
"displayName": "sample_kafka",
"deleted": false
},
"serviceType": "Kafka",
"messageSchema": {
"schemaText": "syntax = \"proto2\";\npackage tutorial;\nmessage Person { ... }",
"schemaType": "Protobuf",
"schemaFields": [
{
"name": "AddressBook",
"dataType": "RECORD",
"fullyQualifiedName": "sample_kafka.address_book.AddressBook",
"children": []
}
]
},
"partitions": 1,
"cleanupPolicies": ["delete"],
"replicationFactor": 1,
"maximumMessageSize": 1,
"retentionSize": -1,
"deleted": false,
"owners": [],
"tags": [],
"domains": []
}
],
"paging": {
"after": "...",
"total": 12
}
}
List Topics
List all topics with optional filtering and pagination
GET
/
v1
/
topics
GET /v1/topics
from metadata.sdk import configure
from metadata.sdk.entities import Topics
configure(
host="https://your-company.open-metadata.org/api",
jwt_token="your-jwt-token"
)
# List first page
topics = Topics.list(limit=50)
for t in topics.data:
print(f"{t.fullyQualifiedName}")
# List all with auto-pagination
for t in Topics.list_all():
print(f"{t.fullyQualifiedName}")
# Filter by service
topics = Topics.list(
service="sample_kafka",
fields=["owners", "tags", "domain"],
limit=50
)
for t in topics.data:
print(f"{t.fullyQualifiedName}")
if t.owners:
print(f" Owners: {[o.name for o in t.owners]}")
if t.tags:
print(f" Tags: {[t.tagFQN for t in t.tags]}")
import static org.openmetadata.sdk.fluent.Topics.*;
// List first page
var result = Topics.list()
.limit(50)
.execute();
for (var t : result.getData()) {
System.out.println(t.getFullyQualifiedName());
}
// Filter by service with fields
var result = Topics.list()
.service("sample_kafka")
.fields("owners", "tags", "domain")
.limit(50)
.execute();
for (var t : result.getData()) {
System.out.println(t.getFullyQualifiedName());
}
# List all
curl "{base_url}/api/v1/topics?limit=50" \
-H "Authorization: Bearer {access_token}"
# Filter by service
curl "{base_url}/api/v1/topics?service=sample_kafka&limit=50" \
-H "Authorization: Bearer {access_token}"
# With fields
curl "{base_url}/api/v1/topics?service=sample_kafka&fields=owners,tags,domains&limit=50" \
-H "Authorization: Bearer {access_token}"
{
"data": [
{
"id": "0a021819-982e-4ee4-a5a2-4af30eaa3016",
"name": "address_book",
"fullyQualifiedName": "sample_kafka.address_book",
"description": "All Protobuf record related events gets captured in this topic",
"version": 0.1,
"updatedAt": 1769982663546,
"updatedBy": "admin",
"service": {
"id": "469ef25e-9bdf-4d5f-8553-eb0ce8581f30",
"type": "messagingService",
"name": "sample_kafka",
"fullyQualifiedName": "sample_kafka",
"displayName": "sample_kafka",
"deleted": false
},
"serviceType": "Kafka",
"messageSchema": {
"schemaText": "syntax = \"proto2\";\npackage tutorial;\nmessage Person { ... }",
"schemaType": "Protobuf",
"schemaFields": [
{
"name": "AddressBook",
"dataType": "RECORD",
"fullyQualifiedName": "sample_kafka.address_book.AddressBook",
"children": []
}
]
},
"partitions": 1,
"cleanupPolicies": ["delete"],
"replicationFactor": 1,
"maximumMessageSize": 1,
"retentionSize": -1,
"deleted": false,
"owners": [],
"tags": [],
"domains": []
}
],
"paging": {
"after": "...",
"total": 12
}
}
List Topics
List all topics with optional filtering and pagination.Query Parameters
Filter by messaging service fully qualified name.
Maximum number of results to return (max: 1000000).
Cursor for backward pagination.
Cursor for forward pagination.
Comma-separated list of fields to include:
owners, tags, followers, votes, extension, domains, sourceHash. See Supported Fields below.Include
all, deleted, or non-deleted entities.GET /v1/topics
from metadata.sdk import configure
from metadata.sdk.entities import Topics
configure(
host="https://your-company.open-metadata.org/api",
jwt_token="your-jwt-token"
)
# List first page
topics = Topics.list(limit=50)
for t in topics.data:
print(f"{t.fullyQualifiedName}")
# List all with auto-pagination
for t in Topics.list_all():
print(f"{t.fullyQualifiedName}")
# Filter by service
topics = Topics.list(
service="sample_kafka",
fields=["owners", "tags", "domain"],
limit=50
)
for t in topics.data:
print(f"{t.fullyQualifiedName}")
if t.owners:
print(f" Owners: {[o.name for o in t.owners]}")
if t.tags:
print(f" Tags: {[t.tagFQN for t in t.tags]}")
import static org.openmetadata.sdk.fluent.Topics.*;
// List first page
var result = Topics.list()
.limit(50)
.execute();
for (var t : result.getData()) {
System.out.println(t.getFullyQualifiedName());
}
// Filter by service with fields
var result = Topics.list()
.service("sample_kafka")
.fields("owners", "tags", "domain")
.limit(50)
.execute();
for (var t : result.getData()) {
System.out.println(t.getFullyQualifiedName());
}
# List all
curl "{base_url}/api/v1/topics?limit=50" \
-H "Authorization: Bearer {access_token}"
# Filter by service
curl "{base_url}/api/v1/topics?service=sample_kafka&limit=50" \
-H "Authorization: Bearer {access_token}"
# With fields
curl "{base_url}/api/v1/topics?service=sample_kafka&fields=owners,tags,domains&limit=50" \
-H "Authorization: Bearer {access_token}"
{
"data": [
{
"id": "0a021819-982e-4ee4-a5a2-4af30eaa3016",
"name": "address_book",
"fullyQualifiedName": "sample_kafka.address_book",
"description": "All Protobuf record related events gets captured in this topic",
"version": 0.1,
"updatedAt": 1769982663546,
"updatedBy": "admin",
"service": {
"id": "469ef25e-9bdf-4d5f-8553-eb0ce8581f30",
"type": "messagingService",
"name": "sample_kafka",
"fullyQualifiedName": "sample_kafka",
"displayName": "sample_kafka",
"deleted": false
},
"serviceType": "Kafka",
"messageSchema": {
"schemaText": "syntax = \"proto2\";\npackage tutorial;\nmessage Person { ... }",
"schemaType": "Protobuf",
"schemaFields": [
{
"name": "AddressBook",
"dataType": "RECORD",
"fullyQualifiedName": "sample_kafka.address_book.AddressBook",
"children": []
}
]
},
"partitions": 1,
"cleanupPolicies": ["delete"],
"replicationFactor": 1,
"maximumMessageSize": 1,
"retentionSize": -1,
"deleted": false,
"owners": [],
"tags": [],
"domains": []
}
],
"paging": {
"after": "...",
"total": 12
}
}
Returns
Returns a paginated list of topic objects. By default, only basic fields are included. Use thefields parameter to request additional data.
Response
Array of topic objects.
Show properties
Show properties
Unique identifier for the topic (UUID format).
Topic name.
Fully qualified name in format
service.topicName.Human-readable display name.
Reference to the parent messaging service.
Type of messaging service (e.g., Kafka, Redpanda, Kinesis).
Schema definition for messages in the topic.
Number of partitions.
Cleanup policies for the topic.
Replication factor.
List of owners assigned to the topic. Only included when
fields contains owners.Classification tags applied. Only included when
fields contains tags.Domain assignments for governance. Only included when
fields contains domains.Users following this topic. Only included when
fields contains followers.User votes and ratings. Only included when
fields contains votes.Custom properties. Only included when
fields contains extension.Supported Fields
The following fields can be requested via thefields query parameter:
| Field | Description |
|---|---|
owners | Owner references (users and teams) |
tags | Classification tags |
followers | Users following the topic |
votes | User votes and ratings |
extension | Custom property values |
domains | Domain assignments for governance |
sourceHash | Hash for change detection |
Error Handling
| Code | Error Type | Description |
|---|---|---|
401 | UNAUTHORIZED | Invalid or missing authentication token |
403 | FORBIDDEN | User lacks permission to list topics |
Was this page helpful?
⌘I