Available in VPC
Get the topic list.
Request
This section describes the request format. The method and URI are as follows:
| Method | URI |
|---|---|
| GET | /api/v1/topics |
Request headers
For information about the headers common to all Data Stream APIs, see Data Stream request headers.
Request parameters
The following describes the request parameters.
| Field | Type | Required | Description |
|---|---|---|---|
sortBy |
String | Optional | Sort by (default: createdDate)
|
descending |
Boolean | Optional | Whether to sort the resulting values in descending order (default: true) |
searchText |
String | Optional | Search string (topic name, topic description search) |
Request example
The request example is as follows:
curl --location --request GET 'https://datastream.apigw.ntruss.com/api/v1/topics?sortBy=createdDate&descending=true' \
--header 'x-ncp-apigw-timestamp: {Timestamp}' \
--header 'x-ncp-iam-access-key: {Access Key}' \
--header 'x-ncp-apigw-signature-v2: {API Gateway Signature}'
Response
This section describes the response format.
Response body
The response body includes the following data:
| Field | Type | Required | Description |
|---|---|---|---|
list |
Array | - | Topic list |
list
The following describes list.
| Field | Type | Required | Description |
|---|---|---|---|
topicId |
String | - | Topic ID |
topicName |
String | - | Topic name |
description |
String | - | Topic description |
partitions |
Number | - | Number of topic partitions |
retentionMs |
Number | - | Topic partition message retention period (millisecond) |
pinned |
Boolean | - | Whether the top of the topic page in the console is pinned
|
status |
String | - | Topic status
|
tcpEndpoint |
String | - | TCP endpoint |
createdDate |
String | - | Topic creation date and time
|
Response status codes
For information about the HTTP status codes common to all Data Stream APIs, see Data Stream response status codes.
Response example
The response example is as follows:
{
"list": [
{
"topicId": "52qLj*****",
"topicName": "h4j6l-ds002",
"description": "Data Stream Topic",
"partitions": 1,
"retentionMs": 86400000,
"pinned": false,
"status": "CREATED",
"tcpEndpoint": "sample-cluster.datastream.naverncp.com:{PORT}",
"createdDate": "2025-06-05T20:21:29Z"
},
{
"topicId": "wgif3*****",
"topicName": "h4j6l-ds001",
"description": "Data Stream Topic",
"partitions": 2,
"retentionMs": 86400000,
"pinned": true,
"status": "CREATED",
"tcpEndpoint": "sample-cluster.datastream.naverncp.com:{PORT}",
"createdDate": "2025-06-04T15:04:49Z"
}
]
}