Creating a Data Pipeline
Function
This API is used to create a data pipeline.
Calling Method
For details, see Calling APIs.
URI
POST /v1/{project_id}/workspaces/{workspace_id}/siem/pipes
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
project_id |
Yes |
String |
Project ID. |
workspace_id |
Yes |
String |
Workspace ID. |
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
X-Auth-Token |
Yes |
String |
User token. It can be obtained by calling the IAM API used to obtain a user token. The value of X-Subject-Token in the response header is the user token. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
dataspace_id |
Yes |
String |
Workspace ID. |
pipe_name |
Yes |
String |
Data pipeline name. |
description |
No |
String |
Description. |
storage_period |
Yes |
Integer |
Data storage duration, in days. The default value is 30. The value ranges from 1 to 3,600. |
shards |
Yes |
Integer |
Number of pipeline partitions. One partition is created by default. A maximum of 64 partitions can be created. |
timestamp_field |
No |
String |
Timestamp. |
mapping |
No |
Map<String,KeyIndex> |
Index field mapping. Each key object carries information about a field. There are multiple key objects. The key is variable and indicates the field name. Nesting is supported. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
type |
No |
String |
Field type. The options are text (full-text index field), keyword (structured field), Long, Integer, Double, Float (time field), and Date (time field). |
is_chinese_exist |
No |
Boolean |
Whether non-English characters are contained. |
properties |
No |
Map<String,KeyIndex> |
Nested structure. |
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
domain_id |
String |
User domain ID. |
project_id |
String |
Project ID. |
dataspace_id |
String |
Data space ID. |
dataspace_name |
String |
Data space name. |
pipe_id |
String |
Pipeline ID. |
pipe_name |
String |
Pipeline name. |
pipe_type |
String |
Pipeline type. system-defined: Predefined by the system; user-defined: Custom pipeline. |
description |
String |
Description. |
storage_period |
Integer |
Index storage duration, measured in days. |
shards |
Integer |
Number of index shards. |
create_by |
String |
Creator. |
create_time |
Integer |
Creation time. |
update_by |
String |
Updater. |
update_time |
Integer |
Update time. |
Status code: 400
Parameter |
Type |
Description |
---|---|---|
error_msg |
String |
Invalid request message. |
error_code |
String |
Error code. |
Status code: 401
Parameter |
Type |
Description |
---|---|---|
error_msg |
String |
Insufficient permission. |
error_code |
String |
Error code. |
Status code: 403
Parameter |
Type |
Description |
---|---|---|
error_msg |
String |
Invalid request message. |
error_code |
String |
Error code. |
Status code: 500
Parameter |
Type |
Description |
---|---|---|
error_msg |
String |
Internal system error. |
error_code |
String |
Error code. |
Example Requests
{ "dataspace_id" : "a00106ba-bede-453c-8488-b60c70bd6aed", "pipe_name" : "pipe-01", "description" : "test pipe", "storage_period" : 30, "shards" : 3, "mapping" : { "name" : { "type" : "text" }, "id" : { "type" : "text" }, "publish_time" : { "type" : "data" } } }
Example Responses
Status code: 200
Response value to a successful creation.
{ "domain_id" : "0531ed520xxxxxxebedb6e57xxxxxxxx", "project_id" : "2b31ed520xxxxxxebedb6e57xxxxxxxx", "dataspace_id" : "a00106ba-bede-453c-8488-b60c70bd6aed", "dataspace_name" : "dataspace-01", "pipe_id" : "b22106ba-bede-453c-8488-b60c70bd6aed", "pipe_name" : "pipe-01", "pipe_type" : "system-defined", "description" : "test pipe", "storage_period" : 30, "shards" : 3, "create_by" : "0642ed520xxxxxxebedb6e57xxxxxxxx", "create_time" : 1584883694354, "update_by" : "0642ed520xxxxxxebedb6e57xxxxxxxx", "update_time" : 1584883694354 }
Status Codes
Status Code |
Description |
---|---|
200 |
Response value to a successful creation. |
400 |
Request error. |
401 |
Authentication failed. |
403 |
Access denied. |
500 |
Internal system error. |
Error Codes
See Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot