Get topic list

Prev Next

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 query parameters

You can use the following query parameters with your request:

Field Type Required Description
sortBy String Optional Sort by
  • createdDate (default) | topicName
    • createdDate: Creation date and time
    • topicName: Topic name
descending Boolean Optional Whether the result values are sorted in descending order
  • true (default) | false
    • true: Descending
    • false: Ascending
searchText String Optional Search string
  • Search by topic and description.

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

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
  • true | false
    • true: Pinned
    • false: Not pinned (sorted by creation date in ascending order)
status String - Topic status
  • CREATING | CREATED | PENDING_DELETION | DELETE_ERROR | DELETED | UNKNOWN
    • CREATING: Creating topic
    • CREATED: Topic creation complete (enabled)
    • PENDING_DELETION: Pending deletion
    • DELETE_ERROR: Deletion error
    • DELETED: Deletion complete
    • UNKNOWN: Unknown
tcpEndpoint String - TCP endpoint
createdDate String - Topic creation date and time
  • ISO 8601 format
  • YYYY-MM-DDThh:mm:ssZ

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"
        }
    ]
}