Data Stream overview

Prev Next

Available in VPC

Data Stream is a fully managed serverless service of NAVER Cloud Platform that supports the creation and execution of applications for real-time data streaming processing. The Data Stream service provides topic and connector management and message transmission-related APIs in RESTful format.

Common Data Stream settings

The following describes commonly used request and response formats in Data Stream APIs.

Request

The following describes the common request format.

API URL

The request API URL is as follows:

Topic, Connector

https://datastream.apigw.ntruss.com

Messase

https://api.datastream.naverncp.com

Request headers

The following describes the request headers.

Field Required Description
x-ncp-apigw-timestamp Required This is the number of milliseconds that have elapsed since January 1, 1970 00:00:00 UTC.
  • Request is considered invalid if the timestamp differs from the current time by more than 5 minutes.
  • Unix timestamp format.
x-ncp-iam-access-key Required Access key issued on NAVER Cloud Platform
x-ncp-apigw-signature-v2 Required Base64-encoded signature that encrypts the request information with a secret key that maps to the access key issued on NAVER Cloud Platform, using the HMAC encryption algorithm (HmacSHA256)
Content-type Optional Request data format
  • application/json
Caution

For security reasons, the access key and secret key of the main account on the NAVER Cloud Platform cannot be used for authentication in Send message API. Therefore, you must create a sub account and use the access key and secret key of the sub account. For more information on how to create a sub account and check the access key and secret key, see the Sub Account user guides.

Response

The following describes the common response format.

Response status codes

The following describes the response status codes.

HTTP status code Content Description
200 - Request succeeded
201 - Create Resource
202 - The request has been accepted but not yet completed.
400 Bad Request Invalid request or encoding
401 Unauthorized Authentication failed
403 Forbidden Unauthorized
404 Not Found Unverifiable request information
429 Too Many Requests Service limit exceeded
500 Internal Server Error Unresolved error

Response body

The response body includes the following data: For response examples when a call is successful, see each API specification.

error
error defines the API call failure information. The following describes error.

Field Type Required Description
type String Optional URI that identifies the issue type
title String Optional Error message
status String Optional HTTP status code
instance String Optional Instance with error
detail String Optional Error message details
code String Optional Error code

error - code
code defines the error cause information. The following describes code.

code Description
InternalError Internal error
UserNotFound Unable to find the user
LimitExceeded Limit exceeded
ResourceAlreadyExists Resource that already exists
CreateFailure Creation failed
DeleteFailure Failed to delete
UpdateFailure Modification failed
InvalidState Unknown status
InvalidResourceNotFound Invalid resource
InvalidBucketNotFound Invalid bucket
InvalidTopicNotFound Invalid topic
InvalidConnectorNotFound Invalid connector
InvalidParameter Invalid parameter
DuplicateName The name already exists
InvalidName Invalid name
InvalidPartition Invalid partition
InvalidRetention Invalid retention period
InvalidDescription Invalid description
InvalidConsumerSpec Invalid connector specifications
InvalidDateFormat Invalid date format
InvalidExportType Invalid connector type
InvalidLocation Invalid storage location
InvalidRoleNrn Invalid Sub Account role

Response example

For response examples when a call is successful, see each API specification. The following is a sample response upon a failed call.

{
  "type": "about:blank",
  "title": "Bad Request",
  "status": 400,
  "instance": "/stream/api/topics/84dummy58-p",
  "detail": "Bad Request"
}
Note

The Send message API responds in a separate format. For more information, see Response of Send message API.

Data Stream API

The following describes the APIs provided by the Data Stream service.

Topic

The following describes the topic-related APIs.

API Description
Create topic Create topic.
Get topic list Get topic list.
Get topic name prefix Get topic name prefix.
Get topic Get topic details.
Edit topic Change topic settings.
Delete topic Delete topic.

Connector

The following describes the connector-related APIs.

API Description
Create connector Create connector.
Get connector Get connector details.
Edit connector Change connector settings.
Delete connector Delete connector.

Message

The following describes the message-related APIs.

API Description
Send message Send message (data) to topic.

Data Stream related resources

NAVER Cloud Platform provides a variety of related resources to help users better understand Data Stream APIs.