Available in VPC
Create a connector.
Note
Only 1 connector can be created per topic.
Request
This section describes the request format. The method and URI are as follows:
| Method | URI |
|---|---|
| POST | /api/v1/topics/{topicId}/connectors |
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 body
You can include the following data in the body of your request:
| Field | Type | Required | Description |
|---|---|---|---|
description |
String | Optional | Connector description (up to 200 characters) |
consumerSpec |
String | Required | Consumer specifications (connector processing performance)
|
exportType |
String | Required | Connector type
|
location |
String | Required | Storage path
|
includeTopicInPath |
Boolean | Required | Whether to create a topic name directory in the storage path
|
dateFormat |
String | Required | Whether to use date formatting for sub-storage paths
|
roleNrn |
String | Required | Resource identification value for the role of the Data Stream service used to access the connector |
flushInterval |
Number | Optional | File creation interval when recording messages to storage (minute)
|
flushCount |
Number | Optional | Stored message count when recording messages to storage (count)
|
Request example
The request example is as follows:
curl --location --request POST 'https://datastream.apigw.ntruss.com/api/v1/topics/mgNWA*****/connectors' \
--header 'x-ncp-apigw-timestamp: {Timestamp}' \
--header 'x-ncp-iam-access-key: {Access Key}' \
--header 'x-ncp-apigw-signature-v2: {API Gateway Signature}' \
--data '{
"description": "Connector",
"consumerSpec": "SMALL",
"exportType": "OBJECT_STORAGE",
"location": "s3a://datastream001",
"includeTopicInPath": false,
"dateFormat": "NONE",
"roleNrn": "nrn:PUB:IAM::****:Role/********-36d4-11f0-a3f1-246e966ebeb4",
"flushInterval": 10,
"flushCount": 100,
}'
Response
This section describes the response format.
Response body
The response body includes the following data:
| Field | Type | Required | Description |
|---|---|---|---|
id |
String | - | Connector ID |
topicId |
String | - | Topic ID |
status |
String | - | Connector status
|
connectorName |
String | - | Connector name |
description |
String | - | Connector description |
consumerSpec |
String | - | Consumer specifications (connector processing performance)
|
location |
String | - | Storage path |
locationWithTopicName |
String | - | Storage path containing the topic name directory |
objectStorageLocation |
String | - | Object Storage path |
dateFormat |
String | - | Whether to use date formatting for sub-storage paths
|
exportType |
String | - | Connector type
|
includeTopicInPath |
Boolean | - | Whether to create a topic name directory in the storage path
|
createdDate |
String | - | Connector creation date and time
|
roleNrn |
String | - | Resource identification value for the role of the Data Stream service used to access the connector |
flushInterval |
Number | - | File creation interval when recording messages to storage (minute)
|
flushCount |
Number | - | Stored message count when recording messages to storage (count)
|
groupId |
String | - | Connector group ID |
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:
{
"id": "xlThN*****",
"topicId": "mgNWA*****",
"status": "RUNNING",
"connectorName": "connector-h4j6l-ds001",
"description": "Connector",
"consumerSpec": "SMALL",
"location": "s3a://datastream001/ds002",
"locationWithTopicName": "s3a://datastream001/ds002",
"objectStorageLocation": "https://console.ncloud.com/objectStorage/objectStorageList?bucketName=datastream001&folderPrefix=ds002",
"dateFormat": "NONE",
"exportType": "OBJECT_STORAGE",
"includeTopicInPath": false,
"createdDate": "2025-06-05T12:56:45Z",
"roleNrn": "nrn:PUB:IAM::****:Role/********-36d4-11f0-a3f1-246e966ebeb4",
"flushInterval": 10,
"flushCount": 100,
"groupId": "connect-h4j6l-ds001"
}