Available in VPC
Get the list of schemas registered in a topic.
Request
This section describes the request format. The method and URI are as follows:
| Method | URI |
|---|---|
| GET | /api/v1/topics/{topicId}/schemas |
Request headers
For information about the headers common to all Data Stream APIs, see Data Stream request headers.
Request path parameters
You can use the following path parameters with your request:
| Field | Type | Required | Description |
|---|---|---|---|
topicId |
String | Required | Topic ID
|
Request query parameters
You can use the following query parameters with your request:
| Field | Type | Required | Description |
|---|---|---|---|
type |
String | Optional | Schema application target
|
schemaType |
String | Optional | Schema type
|
page |
Number | Optional | Page number (start from 0, default: 0) |
size |
Number | Optional | Page size (default: 10) |
Request example
The request example is as follows:
curl --location --request GET 'https://datastream.apigw.ntruss.com/api/v1/topics/mgNWA*****/schemas?type=value&schemaType=AVRO&page=0&size=10' \
--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 |
|---|---|---|---|
schemas |
Array | - | Schema list |
totalCount |
Number | - | Total schema count |
pageNo |
Number | - | Current page number |
pageSize |
Number | - | Page size |
schemas
The following describes schemas.
| Field | Type | Required | Description |
|---|---|---|---|
schemaId |
Number | - | Schema ID |
schemaType |
String | - | Schema type
|
type |
String | - | Schema application target
|
version |
Number | - | Schema version |
createdDate |
String | - | Schema 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:
{
"schemas": [
{
"schemaId": 1,
"schemaType": "AVRO",
"type": "value",
"version": 1,
"createdDate": "2024-01-01T10:00:00Z"
},
{
"schemaId": 2,
"schemaType": "JSON",
"type": "key",
"version": 1,
"createdDate": "2024-01-01T11:00:00Z"
}
],
"totalCount": 2,
"pageNo": 0,
"pageSize": 10
}