diff --git a/docs/dis/api-ref/ALL_META.TXT.json b/docs/dis/api-ref/ALL_META.TXT.json new file mode 100644 index 000000000..31bde217f --- /dev/null +++ b/docs/dis/api-ref/ALL_META.TXT.json @@ -0,0 +1,642 @@ +[ + { + "uri":"dis_02_0511.html", + "product_code":"dis", + "code":"1", + "des":"HUAWEI CLOUD Help Center presents technical documents to help you quickly get started with HUAWEI CLOUD services. The technical documents include Service Overview, Price Details, Purchase Guide, User Guide, API Reference, Best Practices, FAQs, and Videos.", + "doc_type":"api", + "kw":"Before You Start", + "title":"Before You Start", + "githuburl":"" + }, + { + "uri":"dis_02_0600.html", + "product_code":"dis", + "code":"2", + "des":"Welcome to Data Ingestion Service API Reference. Data Ingestion Service (DIS) provides efficient collection, transmission, and distribution capabilities for real-time IoT", + "doc_type":"api", + "kw":"Overview,Before You Start,API Reference", + "title":"Overview", + "githuburl":"" + }, + { + "uri":"dis_02_0512.html", + "product_code":"dis", + "code":"3", + "des":"DIS supports Representational State Transfer (REST) APIs, allowing you to call APIs using HTTPS. For details about API calling, see Calling APIs.", + "doc_type":"api", + "kw":"API Calling,Before You Start,API Reference", + "title":"API Calling", + "githuburl":"" + }, + { + "uri":"dis_02_0513.html", + "product_code":"dis", + "code":"4", + "des":"An endpoint is the request address for calling an API. Endpoints vary depending on services and regions. For the endpoints of all services, see Regions and Endpoints.", + "doc_type":"api", + "kw":"Endpoints,Before You Start,API Reference", + "title":"Endpoints", + "githuburl":"" + }, + { + "uri":"dis_02_0514.html", + "product_code":"dis", + "code":"5", + "des":"For more constraints, see API description.", + "doc_type":"api", + "kw":"Constraints,Before You Start,API Reference", + "title":"Constraints", + "githuburl":"" + }, + { + "uri":"dis_02_0515.html", + "product_code":"dis", + "code":"6", + "des":"DomainA domain is created upon successful registration. The domain has full access permissions for all of its cloud services and resources. It can be used to reset user p", + "doc_type":"api", + "kw":"Concepts,Before You Start,API Reference", + "title":"Concepts", + "githuburl":"" + }, + { + "uri":"dis_02_0200.html", + "product_code":"dis", + "code":"7", + "des":"DIS provides self-developed APIs that comply with RESTful API design specifications. You can use DIS functions listed in API Description by calling these APIs.", + "doc_type":"api", + "kw":"API Overview,API Reference", + "title":"API Overview", + "githuburl":"" + }, + { + "uri":"dis_02_0516.html", + "product_code":"dis", + "code":"8", + "des":"HUAWEI CLOUD Help Center presents technical documents to help you quickly get started with HUAWEI CLOUD services. The technical documents include Service Overview, Price Details, Purchase Guide, User Guide, API Reference, Best Practices, FAQs, and Videos.", + "doc_type":"api", + "kw":"Calling APIs", + "title":"Calling APIs", + "githuburl":"" + }, + { + "uri":"dis_02_0400.html", + "product_code":"dis", + "code":"9", + "des":"This section describes the structure of a REST API request, and uses the IAM API for obtaining a user token as an example to demonstrate how to call an API. The obtained ", + "doc_type":"api", + "kw":"Making an API Request,Calling APIs,API Reference", + "title":"Making an API Request", + "githuburl":"" + }, + { + "uri":"dis_02_0517.html", + "product_code":"dis", + "code":"10", + "des":"Requests for calling an API can be authenticated using either of the following methods:Token-based authentication: Requests are authenticated using a token.AK/SK-based au", + "doc_type":"api", + "kw":"Authentication,Calling APIs,API Reference", + "title":"Authentication", + "githuburl":"" + }, + { + "uri":"dis_02_0518.html", + "product_code":"dis", + "code":"11", + "des":"After sending a request, you will receive a response, including a status code, response header, and response body.A status code is a group of digits, ranging from 1xx to ", + "doc_type":"api", + "kw":"Response,Calling APIs,API Reference", + "title":"Response", + "githuburl":"" + }, + { + "uri":"dis_02_0003.html", + "product_code":"dis", + "code":"12", + "des":"DIS provides efficient collection, transmission, and distribution capabilities for real-time data and provides a variety of APIs to help you quickly build real-time data ", + "doc_type":"api", + "kw":"Application Example,API Reference", + "title":"Application Example", + "githuburl":"" + }, + { + "uri":"dis_02_0015.html", + "product_code":"dis", + "code":"13", + "des":"HUAWEI CLOUD Help Center presents technical documents to help you quickly get started with HUAWEI CLOUD services. The technical documents include Service Overview, Price Details, Purchase Guide, User Guide, API Reference, Best Practices, FAQs, and Videos.", + "doc_type":"api", + "kw":"API Description", + "title":"API Description", + "githuburl":"" + }, + { + "uri":"topic_300000000.html", + "product_code":"dis", + "code":"14", + "des":"HUAWEI CLOUD Help Center presents technical documents to help you quickly get started with HUAWEI CLOUD services. The technical documents include Service Overview, Price Details, Purchase Guide, User Guide, API Reference, Best Practices, FAQs, and Videos.", + "doc_type":"api", + "kw":"Stream Management", + "title":"Stream Management", + "githuburl":"" + }, + { + "uri":"dis_02_0016_01.html", + "product_code":"dis", + "code":"15", + "des":"This API is used to create a stream.When creating a stream, specify a stream type (common or advanced) and the number of partitions.When creating a stream, specify a stre", + "doc_type":"api", + "kw":"Creating Streams,Stream Management,API Reference", + "title":"Creating Streams", + "githuburl":"" + }, + { + "uri":"dis_02_0024.html", + "product_code":"dis", + "code":"16", + "des":"This API is used to query all streams created by the current tenant.During the query, specify the stream from which the stream list is returned and the maximum number of ", + "doc_type":"api", + "kw":"Querying Streams,Stream Management,API Reference", + "title":"Querying Streams", + "githuburl":"" + }, + { + "uri":"DeleteStream.html", + "product_code":"dis", + "code":"17", + "des":"This API is used to delete specified streams.DELETE /v2/{project_id}/streams/{stream_name}NoneDeleting Specified StreamsNoneSee Error Codes.", + "doc_type":"api", + "kw":"Deleting Specified Streams,Stream Management,API Reference", + "title":"Deleting Specified Streams", + "githuburl":"" + }, + { + "uri":"dis_02_0025.html", + "product_code":"dis", + "code":"18", + "des":"This API is used to query details about a specified stream.GET /v2/{project_id}/streams/{stream_name}Status code: 200Querying Stream DetailsStatus code: 200Normal respons", + "doc_type":"api", + "kw":"Querying Stream Details,Stream Management,API Reference", + "title":"Querying Stream Details", + "githuburl":"" + }, + { + "uri":"UpdatePartitionCount.html", + "product_code":"dis", + "code":"19", + "des":"This API is used to change the number of partitions in a specific stream.PUT /v2/{project_id}/streams/{stream_name}NoneChanging Partition QuantityNoneSee Error Codes.", + "doc_type":"api", + "kw":"Changing Partition Quantity,Stream Management,API Reference", + "title":"Changing Partition Quantity", + "githuburl":"" + }, + { + "uri":"UpdateStream.html", + "product_code":"dis", + "code":"20", + "des":"This API is used to update the information about specified streams.PUT /v3/{project_id}/streams/{stream_name}NoneUpdating Lifecycles of StreamsPUT https://{Endpoint}/v3/{", + "doc_type":"api", + "kw":"Updating Stream Information,Stream Management,API Reference", + "title":"Updating Stream Information", + "githuburl":"" + }, + { + "uri":"CreatePolicies.html", + "product_code":"dis", + "code":"21", + "des":"This API is used to add permission policies to specified streams.POST /v2/{project_id}/streams/{stream_name}/policiesNoneAdding Permission Policies for TenantsPOST https:", + "doc_type":"api", + "kw":"Adding Permission Policies,Stream Management,API Reference", + "title":"Adding Permission Policies", + "githuburl":"" + }, + { + "uri":"ListPolicies.html", + "product_code":"dis", + "code":"22", + "des":"This API is used to query permission policies of specified streams.GET /v2/{project_id}/streams/{stream_name}/policiesStatus code: 200Querying Permission PoliciesStatus c", + "doc_type":"api", + "kw":"Querying Permission Policies,Stream Management,API Reference", + "title":"Querying Permission Policies", + "githuburl":"" + }, + { + "uri":"topic_300000001.html", + "product_code":"dis", + "code":"23", + "des":"HUAWEI CLOUD Help Center presents technical documents to help you quickly get started with HUAWEI CLOUD services. The technical documents include Service Overview, Price Details, Purchase Guide, User Guide, API Reference, Best Practices, FAQs, and Videos.", + "doc_type":"api", + "kw":"App Management", + "title":"App Management", + "githuburl":"" + }, + { + "uri":"CreateApp.html", + "product_code":"dis", + "code":"24", + "des":"This API is used to create consumption apps.POST /v2/{project_id}/appsNoneCreating Consumption AppsNoneSee Error Codes.", + "doc_type":"api", + "kw":"Creating Consumption Apps,App Management,API Reference", + "title":"Creating Consumption Apps", + "githuburl":"" + }, + { + "uri":"ListApp.html", + "product_code":"dis", + "code":"25", + "des":"This API is used to query apps.GET /v2/{project_id}/appsStatus code: 200Querying AppsStatus code: 200Normal response.See Error Codes.", + "doc_type":"api", + "kw":"Querying Apps,App Management,API Reference", + "title":"Querying Apps", + "githuburl":"" + }, + { + "uri":"DeleteApp.html", + "product_code":"dis", + "code":"26", + "des":"This API is used to delete apps.DELETE /v2/{project_id}/apps/{app_name}NoneDeleting AppsNoneSee Error Codes.", + "doc_type":"api", + "kw":"Deleting Apps,App Management,API Reference", + "title":"Deleting Apps", + "githuburl":"" + }, + { + "uri":"ShowApp.html", + "product_code":"dis", + "code":"27", + "des":"This API is used to query app details.GET /v2/{project_id}/apps/{app_name}Status code: 200Querying App DetailsStatus code: 200Normal response.See Error Codes.", + "doc_type":"api", + "kw":"Querying App Details,App Management,API Reference", + "title":"Querying App Details", + "githuburl":"" + }, + { + "uri":"ShowConsumerState.html", + "product_code":"dis", + "code":"28", + "des":"This API is used to query the consumption status of apps.GET /v2/{project_id}/apps/{app_name}/streams/{stream_name}Status code: 200Querying App Consumption StatusStatus c", + "doc_type":"api", + "kw":"Querying App Consumption Status,App Management,API Reference", + "title":"Querying App Consumption Status", + "githuburl":"" + }, + { + "uri":"topic_300000002.html", + "product_code":"dis", + "code":"29", + "des":"HUAWEI CLOUD Help Center presents technical documents to help you quickly get started with HUAWEI CLOUD services. The technical documents include Service Overview, Price Details, Purchase Guide, User Guide, API Reference, Best Practices, FAQs, and Videos.", + "doc_type":"api", + "kw":"Checkpoint Management", + "title":"Checkpoint Management", + "githuburl":"" + }, + { + "uri":"dis_02_0403.html", + "product_code":"dis", + "code":"30", + "des":"This API is used to submit checkpoints.POST /v2/{project_id}/checkpointsNoneSubmitting CheckpointsNoneSee Error Codes.", + "doc_type":"api", + "kw":"Submitting Checkpoints,Checkpoint Management,API Reference", + "title":"Submitting Checkpoints", + "githuburl":"" + }, + { + "uri":"ShowCheckpoint.html", + "product_code":"dis", + "code":"31", + "des":"This API is used to query checkpoint details.GET /v2/{project_id}/checkpointsStatus code: 204Querying Checkpoint DetailsStatus code: 204Normal response.See Error Codes.", + "doc_type":"api", + "kw":"Querying Checkpoint Details,Checkpoint Management,API Reference", + "title":"Querying Checkpoint Details", + "githuburl":"" + }, + { + "uri":"DeleteCheckpoint.html", + "product_code":"dis", + "code":"32", + "des":"This API is used to delete checkpoints.DELETE /v2/{project_id}/checkpointsNoneDeleting CheckpointsNoneSee Error Codes.", + "doc_type":"api", + "kw":"Deleting Checkpoints,Checkpoint Management,API Reference", + "title":"Deleting Checkpoints", + "githuburl":"" + }, + { + "uri":"topic_300000003.html", + "product_code":"dis", + "code":"33", + "des":"HUAWEI CLOUD Help Center presents technical documents to help you quickly get started with HUAWEI CLOUD services. The technical documents include Service Overview, Price Details, Purchase Guide, User Guide, API Reference, Best Practices, FAQs, and Videos.", + "doc_type":"api", + "kw":"Data Management", + "title":"Data Management", + "githuburl":"" + }, + { + "uri":"dis_02_0018.html", + "product_code":"dis", + "code":"34", + "des":"This API is used to upload data to DIS streams.POST /v2/{project_id}/recordsStatus code: 200Uploading DataNoneSee Error Codes.", + "doc_type":"api", + "kw":"Uploading Data,Data Management,API Reference", + "title":"Uploading Data", + "githuburl":"" + }, + { + "uri":"dis_02_0019.html", + "product_code":"dis", + "code":"35", + "des":"This API is used to download data from DIS streams.GET /v2/{project_id}/recordsStatus code: 200Downloading DataStatus code: 200Normal response.See Error Codes.", + "doc_type":"api", + "kw":"Downloading Data,Data Management,API Reference", + "title":"Downloading Data", + "githuburl":"" + }, + { + "uri":"dis_02_0020.html", + "product_code":"dis", + "code":"36", + "des":"This API is used to obtain data cursors.GET /v2/{project_id}/cursorsStatus code: 200Obtaining Data CursorsStatus code: 200Normal response.See Error Codes.", + "doc_type":"api", + "kw":"Obtaining Data Cursors,Data Management,API Reference", + "title":"Obtaining Data Cursors", + "githuburl":"" + }, + { + "uri":"topic_300000004.html", + "product_code":"dis", + "code":"37", + "des":"HUAWEI CLOUD Help Center presents technical documents to help you quickly get started with HUAWEI CLOUD services. The technical documents include Service Overview, Price Details, Purchase Guide, User Guide, API Reference, Best Practices, FAQs, and Videos.", + "doc_type":"api", + "kw":"Dump Task Management", + "title":"Dump Task Management", + "githuburl":"" + }, + { + "uri":"dis_02_0410.html", + "product_code":"dis", + "code":"38", + "des":"This API is used to add OBS dump tasks.POST /v2/{project_id}/streams/{stream_name}/transfer-tasksNoneAdding OBS Dump TasksPOST https://{Endpoint}/v2/{project_id}/streams/", + "doc_type":"api", + "kw":"Adding OBS Dump Tasks,Dump Task Management,API Reference", + "title":"Adding OBS Dump Tasks", + "githuburl":"" + }, + { + "uri":"ListTransferTasks.html", + "product_code":"dis", + "code":"39", + "des":"This API is used to query dump tasks.GET /v2/{project_id}/streams/{stream_name}/transfer-tasksStatus code: 200Querying Dump TasksStatus code: 200Normal response.See Error", + "doc_type":"api", + "kw":"Querying Dump Tasks,Dump Task Management,API Reference", + "title":"Querying Dump Tasks", + "githuburl":"" + }, + { + "uri":"DeleteTransferTask.html", + "product_code":"dis", + "code":"40", + "des":"This API is used to delete dump tasks.DELETE /v2/{project_id}/streams/{stream_name}/transfer-tasks/{task_name}NoneDeleting Dump TasksNoneSee Error Codes.", + "doc_type":"api", + "kw":"Deleting Dump Tasks,Dump Task Management,API Reference", + "title":"Deleting Dump Tasks", + "githuburl":"" + }, + { + "uri":"ShowTransferTask.html", + "product_code":"dis", + "code":"41", + "des":"This API is used to query dump task details.GET /v2/{project_id}/streams/{stream_name}/transfer-tasks/{task_name}Status code: 200Querying Dump Task DetailsStatus code: 20", + "doc_type":"api", + "kw":"Querying Dump Task Details,Dump Task Management,API Reference", + "title":"Querying Dump Task Details", + "githuburl":"" + }, + { + "uri":"BatchStartTransferTask.html", + "product_code":"dis", + "code":"42", + "des":"This API is used to start dump tasks in batches.POST /v2/{project_id}/streams/{stream_name}/transfer-tasks/actionNoneStarting Dump Tasks in BatchesNoneSee Error Codes.", + "doc_type":"api", + "kw":"Starting Dump Tasks in Batches,Dump Task Management,API Reference", + "title":"Starting Dump Tasks in Batches", + "githuburl":"" + }, + { + "uri":"BatchStopTransferTask.html", + "product_code":"dis", + "code":"43", + "des":"This API is used to pause dump tasks in batches.POST /v2/{project_id}/streams/{stream_name}/transfer-tasks/actionNonePausing Dump Tasks in BatchesNoneSee Error Codes.", + "doc_type":"api", + "kw":"Pausing Dump Tasks in Batches,Dump Task Management,API Reference", + "title":"Pausing Dump Tasks in Batches", + "githuburl":"" + }, + { + "uri":"CreateDwsTransferTask.html", + "product_code":"dis", + "code":"44", + "des":"This API is used to add DWS dump tasks.POST /v2/{project_id}/streams/{stream_name}/transfer-tasksNoneAdding DWS Dump TasksNoneSee Error Codes.", + "doc_type":"api", + "kw":"Adding DWS Dump Tasks,Dump Task Management,API Reference", + "title":"Adding DWS Dump Tasks", + "githuburl":"" + }, + { + "uri":"CreateMrsTransferTask.html", + "product_code":"dis", + "code":"45", + "des":"This API is used to add MRS dump tasks.POST /v2/{project_id}/streams/{stream_name}/transfer-tasksNoneAdding MRS Dump TasksNoneSee Error Codes.", + "doc_type":"api", + "kw":"Adding MRS Dump Tasks,Dump Task Management,API Reference", + "title":"Adding MRS Dump Tasks", + "githuburl":"" + }, + { + "uri":"CreateDliTransferTask.html", + "product_code":"dis", + "code":"46", + "des":"This API is used to add DLI dump tasks.POST /v2/{project_id}/streams/{stream_name}/transfer-tasksNoneNoneNoneSee Error Codes.", + "doc_type":"api", + "kw":"Adding DLI Dump Tasks,Dump Task Management,API Reference", + "title":"Adding DLI Dump Tasks", + "githuburl":"" + }, + { + "uri":"CreateCloudTableTransferTask.html", + "product_code":"dis", + "code":"47", + "des":"This API is used to add CloudTable dump tasks.POST /v2/{project_id}/streams/{stream_name}/transfer-tasksNoneAdding CloudTable HBase Dump TasksPOST https://{Endpoint}/v2/{", + "doc_type":"api", + "kw":"Adding CloudTable Dump Tasks,Dump Task Management,API Reference", + "title":"Adding CloudTable Dump Tasks", + "githuburl":"" + }, + { + "uri":"topic_300000005.html", + "product_code":"dis", + "code":"48", + "des":"HUAWEI CLOUD Help Center presents technical documents to help you quickly get started with HUAWEI CLOUD services. The technical documents include Service Overview, Price Details, Purchase Guide, User Guide, API Reference, Best Practices, FAQs, and Videos.", + "doc_type":"api", + "kw":"Monitoring Management", + "title":"Monitoring Management", + "githuburl":"" + }, + { + "uri":"ShowStreamMetrics.html", + "product_code":"dis", + "code":"49", + "des":"This API is used to query the monitoring data of specified streams.GET /v2/{project_id}/streams/{stream_name}/metricsStatus code: 200Querying Stream Monitoring DataNoneSe", + "doc_type":"api", + "kw":"Querying Stream Monitoring Data,Monitoring Management,API Reference", + "title":"Querying Stream Monitoring Data", + "githuburl":"" + }, + { + "uri":"ShowPartitionMetrics.html", + "product_code":"dis", + "code":"50", + "des":"This API is used to query the monitoring data of a specified partition of a stream.GET /v2/{project_id}/streams/{stream_name}/partitions/{partition_id}/metricsStatus code", + "doc_type":"api", + "kw":"Querying Partition Monitoring Data,Monitoring Management,API Reference", + "title":"Querying Partition Monitoring Data", + "githuburl":"" + }, + { + "uri":"topic_300000006.html", + "product_code":"dis", + "code":"51", + "des":"HUAWEI CLOUD Help Center presents technical documents to help you quickly get started with HUAWEI CLOUD services. The technical documents include Service Overview, Price Details, Purchase Guide, User Guide, API Reference, Best Practices, FAQs, and Videos.", + "doc_type":"api", + "kw":"Tag Management", + "title":"Tag Management", + "githuburl":"" + }, + { + "uri":"CreateTag.html", + "product_code":"dis", + "code":"52", + "des":"This API is used to add tags to specified streams.POST /v2/{project_id}/stream/{stream_id}/tagsNoneAdding Tags for Specified StreamsNoneSee Error Codes.", + "doc_type":"api", + "kw":"Adding Tags for Specified Streams,Tag Management,API Reference", + "title":"Adding Tags for Specified Streams", + "githuburl":"" + }, + { + "uri":"ShowStreamTags.html", + "product_code":"dis", + "code":"53", + "des":"This API is used to query tags of specified streams.GET /v2/{project_id}/stream/{stream_id}/tagsStatus code: 200This API is used to query tags of specified streams.Status", + "doc_type":"api", + "kw":"Querying Tags of Specified Streams,Tag Management,API Reference", + "title":"Querying Tags of Specified Streams", + "githuburl":"" + }, + { + "uri":"DeleteTag.html", + "product_code":"dis", + "code":"54", + "des":"This API is used to delete tags of specified streams.DELETE /v2/{project_id}/stream/{stream_id}/tags/{key}NoneDeleting Tags of Specified StreamsNoneSee Error Codes.", + "doc_type":"api", + "kw":"Deleting Tags of Specified Streams,Tag Management,API Reference", + "title":"Deleting Tags of Specified Streams", + "githuburl":"" + }, + { + "uri":"BatchCreateTags.html", + "product_code":"dis", + "code":"55", + "des":"This API is used to add resource tags (such as stream tags) in batches. The API is idempotent. When you are creating tags, if there are duplicate keys in the request body", + "doc_type":"api", + "kw":"Adding Resource Tags in Batches,Tag Management,API Reference", + "title":"Adding Resource Tags in Batches", + "githuburl":"" + }, + { + "uri":"ListTags.html", + "product_code":"dis", + "code":"56", + "des":"This API is used to query all tags of specified regions.GET /v2/{project_id}/stream/tagsStatus code: 200Querying Tags of Specified RegionsStatus code: 200Response body of", + "doc_type":"api", + "kw":"Querying Tags of Specified Regions,Tag Management,API Reference", + "title":"Querying Tags of Specified Regions", + "githuburl":"" + }, + { + "uri":"ListResourcesByTags.html", + "product_code":"dis", + "code":"57", + "des":"This API is used to filter resources (streams) by tag.POST /v2/{project_id}/stream/resource_instances/actionStatus code: 200Resource (stream) filtering by tag and record ", + "doc_type":"api", + "kw":"Using Tags to Filter Resources (Streams),Tag Management,API Reference", + "title":"Using Tags to Filter Resources (Streams)", + "githuburl":"" + }, + { + "uri":"BatchDeleteTags.html", + "product_code":"dis", + "code":"58", + "des":"This API is used to delete resource tags (stream tags) in batches. This API is idempotent. If the deleted tag does not exist, the deletion is considered successful by def", + "doc_type":"api", + "kw":"Deleting Resource Tags in Batches,Tag Management,API Reference", + "title":"Deleting Resource Tags in Batches", + "githuburl":"" + }, + { + "uri":"en-us_topic_0000001079240698.html", + "product_code":"dis", + "code":"59", + "des":"This chapter describes fine-grained permissions management for your DIS. If your cloud account does not need individual IAM users, then you may skip over this chapter.By ", + "doc_type":"api", + "kw":"Permissions Policies and Supported Actions,API Reference", + "title":"Permissions Policies and Supported Actions", + "githuburl":"" + }, + { + "uri":"dis_02_0500.html", + "product_code":"dis", + "code":"60", + "des":"HUAWEI CLOUD Help Center presents technical documents to help you quickly get started with HUAWEI CLOUD services. The technical documents include Service Overview, Price Details, Purchase Guide, User Guide, API Reference, Best Practices, FAQs, and Videos.", + "doc_type":"api", + "kw":"Appendix", + "title":"Appendix", + "githuburl":"" + }, + { + "uri":"ErrorCode.html", + "product_code":"dis", + "code":"61", + "des":"HUAWEI CLOUD Help Center presents technical documents to help you quickly get started with HUAWEI CLOUD services. The technical documents include Service Overview, Price Details, Purchase Guide, User Guide, API Reference, Best Practices, FAQs, and Videos.", + "doc_type":"api", + "kw":"Error Codes,Appendix,API Reference", + "title":"Error Codes", + "githuburl":"" + }, + { + "uri":"dis_02_0022.html", + "product_code":"dis", + "code":"62", + "des":"A status code is an HTTPS response issued by DIS to indicate whether an API request has been successfully completed.", + "doc_type":"api", + "kw":"Status Codes,Appendix,API Reference", + "title":"Status Codes", + "githuburl":"" + }, + { + "uri":"dis_02_0501.html", + "product_code":"dis", + "code":"63", + "des":"This section describes how to obtain a project ID on the console or by calling an API.", + "doc_type":"api", + "kw":"Obtaining a Project ID,Appendix,API Reference", + "title":"Obtaining a Project ID", + "githuburl":"" + }, + { + "uri":"dis_02_0023.html", + "product_code":"dis", + "code":"64", + "des":"HUAWEI CLOUD Help Center presents technical documents to help you quickly get started with HUAWEI CLOUD services. The technical documents include Service Overview, Price Details, Purchase Guide, User Guide, API Reference, Best Practices, FAQs, and Videos.", + "doc_type":"api", + "kw":"Change History,API Reference", + "title":"Change History", + "githuburl":"" + } +] \ No newline at end of file diff --git a/docs/dis/api-ref/BatchCreateTags.html b/docs/dis/api-ref/BatchCreateTags.html new file mode 100644 index 000000000..4f7f47840 --- /dev/null +++ b/docs/dis/api-ref/BatchCreateTags.html @@ -0,0 +1,187 @@ + + +
This API is used to add resource tags (such as stream tags) in batches. The API is idempotent. When you are creating tags, if there are duplicate keys in the request body, an error is reported. During tag creation, duplicate keys are not allowed. If a key exists in the database, its value will be overwritten.
+POST /v2/{project_id}/stream/{stream_id}/tags/action
+ +Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
|---|---|---|---|
project_id + |
+Yes + |
+String + |
+Project ID. + |
+
stream_id + |
+Yes + |
+String + |
+Stream ID. + |
+
Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
|---|---|---|---|
X-Auth-Token + |
+Yes + |
+String + |
+User token. +The token can be obtained by calling the IAM API (value of X-Subject-Token in the response header). + |
+
Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
|---|---|---|---|
action + |
+Yes + |
+String + |
+Operation to be performed. The value can be create only. +
Enumeration values: +
|
+
tags + |
+Yes + |
+Array of Tag objects + |
+Tag list. + |
+
Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
|---|---|---|---|
key + |
+No + |
+String + |
+Key. +
Minimum: 1 +Maximum: 36 + |
+
value + |
+No + |
+String + |
+Value. +
Minimum: 0 +Maximum: 43 + |
+
None
+Adding Resource Tags in Batches
+POST https://{Endpoint}/v2/{project_id}/stream/{stream_id}/tags/action
+
+{
+ "action" : "create",
+ "tags" : [ {
+ "key" : "key1",
+ "value" : "value1"
+ }, {
+ "key" : "key2",
+ "value" : "value3"
+ } ]
+}
+None
+Status Code + |
+Description + |
+
|---|---|
204 + |
+Normal response. + |
+
See Error Codes.
+This API is used to delete resource tags (stream tags) in batches. This API is idempotent. If the deleted tag does not exist, the deletion is considered successful by default. The tag character set range is not verified during tag deletion. When you delete tags, the tag structure cannot be missing, and the key cannot be left blank or be an empty string.
+POST /v2/{project_id}/stream/{stream_id}/tags/action
+ +Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
|---|---|---|---|
project_id + |
+Yes + |
+String + |
+Project ID. + |
+
stream_id + |
+Yes + |
+String + |
+Stream ID. + |
+
Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
|---|---|---|---|
X-Auth-Token + |
+Yes + |
+String + |
+User token. +The token can be obtained by calling the IAM API (value of X-Subject-Token in the response header). + |
+
Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
|---|---|---|---|
action + |
+Yes + |
+String + |
+Operation to be performed. The value can be delete only. +
Enumeration values: +
|
+
tags + |
+Yes + |
+Array of Tag objects + |
+Tag list. + |
+
Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
|---|---|---|---|
key + |
+No + |
+String + |
+Key. +
Minimum: 1 +Maximum: 36 + |
+
value + |
+No + |
+String + |
+Value. +
Minimum: 0 +Maximum: 43 + |
+
None
+Deleting Resource Tags in Batches
+POST https://{Endpoint}/v2/{project_id}/stream/{stream_id}/tags/action
+
+{
+ "action" : "delete",
+ "tags" : [ {
+ "key" : "key1",
+ "value" : "value1"
+ }, {
+ "key" : "key2",
+ "value" : "value3"
+ } ]
+}
+None
+Status Code + |
+Description + |
+
|---|---|
204 + |
+Normal response. + |
+
See Error Codes.
+This API is used to start dump tasks in batches.
+POST /v2/{project_id}/streams/{stream_name}/transfer-tasks/action
+ +Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
|---|---|---|---|
project_id + |
+Yes + |
+String + |
+Project ID. + |
+
stream_name + |
+Yes + |
+String + |
+Name of the stream to be queried. +Maximum: 60 + |
+
Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
|---|---|---|---|
action + |
+Yes + |
+String + |
+Dump task operation. Currently, only the following operation is supported: +
Enumeration values: +
|
+
tasks + |
+Yes + |
+Array of BatchTransferTask objects + |
+List of dump tasks to be operated. + |
+
None
+Starting Dump Tasks in Batches
+POST https://{Endpoint}/v2/{project_id}/streams/{stream_name}/transfer-tasks/action
+
+{
+ "action" : "start",
+ "tasks" : [ {
+ "id" : "9dSu1wfCytSk1aOLxvF"
+ } ]
+}
+None
+Status Code + |
+Description + |
+
|---|---|
200 + |
+Normal response. + |
+
See Error Codes.
+This API is used to pause dump tasks in batches.
+POST /v2/{project_id}/streams/{stream_name}/transfer-tasks/action
+ +Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
|---|---|---|---|
project_id + |
+Yes + |
+String + |
+Project ID. + |
+
stream_name + |
+Yes + |
+String + |
+Name of the stream to be queried. +Maximum: 60 + |
+
Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
|---|---|---|---|
action + |
+Yes + |
+String + |
+Dump task operation. Currently, only the following operation is supported: +
Enumeration values: +
|
+
tasks + |
+Yes + |
+Array of BatchTransferTask objects + |
+List of dump tasks to be paused. + |
+
None
+Pausing Dump Tasks in Batches
+POST https://{Endpoint}/v2/{project_id}/streams/{stream_name}/transfer-tasks/action
+
+{
+ "action" : "stop",
+ "tasks" : [ {
+ "id" : "9dSu1wfCytSk1aOLxvF"
+ } ]
+}
+None
+Status Code + |
+Description + |
+
|---|---|
200 + |
+Normal response. + |
+
See Error Codes.
+This API is used to create consumption apps.
+POST /v2/{project_id}/apps
+ +Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
|---|---|---|---|
project_id + |
+Yes + |
+String + |
+Project ID. + |
+
Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
|---|---|---|---|
X-Auth-Token + |
+Yes + |
+String + |
+User token. +The token can be obtained by calling the IAM API (value of X-Subject-Token in the response header). + |
+
Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
|---|---|---|---|
app_name + |
+Yes + |
+String + |
+Unique identifier of the consumer application to be created. +The application name contains 1 to 200 characters, including letters, digits, underscores (_), and hyphens (-). +Minimum: 1 +Maximum: 200 + |
+
None
+Creating Consumption Apps
+POST https://{Endpoint}/v2/{project_id}/apps
+
+{
+ "app_name" : "newapp"
+}
+None
+Status Code + |
+Description + |
+
|---|---|
201 + |
+Normal response. + |
+
See Error Codes.
+This API is used to add CloudTable dump tasks.
+POST /v2/{project_id}/streams/{stream_name}/transfer-tasks
+ +Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
|---|---|---|---|
project_id + |
+Yes + |
+String + |
+Project ID. + |
+
stream_name + |
+Yes + |
+String + |
+Name of the stream. +Maximum: 60 + |
+
Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
|---|---|---|---|
X-Auth-Token + |
+Yes + |
+String + |
+User token. +The token can be obtained by calling the IAM API (value of X-Subject-Token in the response header). + |
+
Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
|---|---|---|---|
destination_type + |
+Yes + |
+String + |
+Dump destination. Possible values: +
Default: NOWHERE +Enumeration values: +
|
+
cloudtable_destination_descriptor + |
+No + |
++ | +Parameter list of the CloudTable to which data in the DIS stream will be dumped. + |
+
Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
|---|---|---|---|
task_name + |
+Yes + |
+String + |
+Name of the dump task. The task name consists of letters, digits, hyphens (-), and underscores (_). It must be a string of 1 to 64 characters. + |
+
agency_name + |
+Yes + |
+String + |
+Name of the agency created on IAM. DIS uses an agency to access your specified resources. The parameters for creating an agency are as follows: +
If agencies have been created, you can obtain available agencies from the agency list by using the "Listing Agencies " API. +This parameter cannot be left blank and the parameter value cannot exceed 64 characters. +If there are dump tasks on the console, the system displays a message indicating that an agency will be automatically created. The name of the automatically created agency is dis_admin_agency. +Maximum: 64 + |
+
deliver_time_interval + |
+Yes + |
+Integer + |
+User-defined interval at which data is imported from the current DIS stream into OBS. If no data is pushed to the DIS stream during the current interval, no dump file package will be generated. +Value range: 30-900 +Default value: 300 +Unit: second +Minimum: 30 +Maximum: 900 +Default: 300 + |
+
consumer_strategy + |
+No + |
+String + |
+Offset. +
Default value: LATEST +Default: LATEST +Enumeration values: +
|
+
cloudtable_cluster_name + |
+Yes + |
+String + |
+Name of the CloudTable cluster to which data will be dumped. +If you choose to dump data to OpenTSDB, OpenTSDB must be enabled for the cluster. + |
+
cloudtable_cluster_id + |
+Yes + |
+String + |
+ID of the CloudTable cluster to which data will be dumped. +If you choose to dump data to OpenTSDB, OpenTSDB must be enabled for the cluster. + |
+
cloudtable_table_name + |
+No + |
+String + |
+HBase table name of the CloudTable cluster to which data will be dumped. The parameter is mandatory when data is dumped to the CloudTable HBase. + |
+
cloudtable_schema + |
+No + |
+CloudtableSchema object + |
+Schema configuration of the CloudTable HBase data. You can set either this parameter or opentsdb_schema, but this parameter is mandatory when data will be dumped to HBase. After this parameter is set, the JSON data in the stream can be converted to another format and then be imported to the CloudTable HBase. + |
+
opentsdb_schema + |
+No + |
+Array of OpenTSDBSchema objects + |
+Schema configuration of the CloudTable OpenTSDB data. You can set either this parameter or opentsdb_schema, but this parameter is mandatory when data will be dumped to OpenTSDB. After this parameter is set, the JSON data in the stream can be converted to another format and then be imported to the CloudTable OpenTSDB. + |
+
cloudtable_row_key_delimiter + |
+No + |
+String + |
+Delimiter used to separate the user data that generates HBase row keys. Value range: , . | ; \ - _ and ~ +Default value: . + |
+
obs_backup_bucket_path + |
+No + |
+String + |
+Name of the OBS bucket used to back up data that failed to be dumped to CloudTable. + |
+
backup_file_prefix + |
+No + |
+String + |
+Self-defined directory created in the OBS bucket and used to back up data that failed to be dumped to CloudTable. Directory levels are separated by slashes (/) and cannot start with slashes. +Value range: a string of letters, digits, and underscores (_) +The maximum length is 50 characters. +This parameter is left empty by default. + |
+
retry_duration + |
+No + |
+String + |
+Time duration for DIS to retry if data fails to be dumped to CloudTable. If this threshold is exceeded, the data that fails to be dumped will be backed up to the OBS bucket/backup_file_prefix /cloudtable_error or OBS bucket/backup_file_prefix/opentsdb_error directory. +Value range: 0-7,200 +Unit: second +Default value: 1,800 + |
+
Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
|---|---|---|---|
row_key + |
+Yes + |
+Array of RowKey objects + |
+HBase rowkey schema used by the CloudTable cluster to convert JSON data into HBase rowkeys. +Value range: 1-64 + |
+
columns + |
+Yes + |
+Array of Column objects + |
+HBase column schema used by the CloudTable cluster to convert JSON data into HBase columns. +Value range: 1 to 4,096 + |
+
Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
|---|---|---|---|
value + |
+Yes + |
+String + |
+JSON attribute name, which is used to generate HBase rowkeys for JSON data in the DIS stream. + |
+
type + |
+Yes + |
+String + |
+JSON attribute type of JSON data in the DIS stream. Value range: +
Enumeration values: +
|
+
Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
|---|---|---|---|
column_family_name + |
+Yes + |
+String + |
+Name of the HBase column family to which data will be dumped. + |
+
column_name + |
+Yes + |
+String + |
+Name of the HBase column to which data will be dumped. +Value range: a string of 1 to 32 characters, consisting of only letters, digits, and underscores (_) + |
+
value + |
+Yes + |
+String + |
+JSON attribute name, which is used to generate HBase column values for JSON data in the DIS stream. + |
+
type + |
+Yes + |
+String + |
+JSON attribute type of JSON data in the DIS stream. +Value range: +
Enumeration values: +
|
+
Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
|---|---|---|---|
metric + |
+Yes + |
+Array of OpenTSDBMetric objects + |
+Schema configuration of the OpenTSDB data metric in the CloudTable cluster. After this parameter is set, the JSON data in the stream can be converted to the metric of the OpenTSDB data. + |
+
timestamp + |
+Yes + |
+OpenTSDBTimestamp object + |
+Schema configuration of the OpenTSDB data timestamp in the CloudTable cluster. After this parameter is set, the JSON data in the stream can be converted to the timestamp of the OpenTSDB data. + |
+
value + |
+Yes + |
+OpenTSDBValue object + |
+Schema configuration of the OpenTSDB data value in the CloudTable cluster. After this parameter is set, the JSON data in the stream can be converted to the value of the OpenTSDB data. + |
+
tags + |
+Yes + |
+Array of OpenTSDBTags objects + |
+Schema configuration of the OpenTSDB data tags in the CloudTable cluster. After this parameter is set, the JSON data in the stream can be converted to the tags of the OpenTSDB data. + |
+
Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
|---|---|---|---|
type + |
+Yes + |
+String + |
+
Enumeration values: +
|
+
value + |
+Yes + |
+String + |
+Constant value or JSON attribute name of the user data in the stream. This value is 1 to 32 characters long. Only letters, digits, and periods (.) are allowed. + |
+
Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
|---|---|---|---|
type + |
+Yes + |
+String + |
+
|
+
value + |
+Yes + |
+String + |
+JSON attribute name of the user data in the stream. Value range: a string of 1 to 32 characters, consisting of only letters, digits, and underscores (_) + |
+
format + |
+Yes + |
+String + |
+This parameter is mandatory when type is set to String. When the value type of the JSON attribute of the user data in the stream is Date, format is required to convert the data format to generate the timestamp of OpenTSDB. +Value range: +
Enumeration values: +
|
+
Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
|---|---|---|---|
type + |
+Yes + |
+String + |
+Dump destination. Possible values: Value range: +
|
+
value + |
+Yes + |
+String + |
+Constant value or JSON attribute name of the user data in the stream. Value range: a string of 1 to 32 characters, consisting of only letters, digits, and underscores (_) + |
+
Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
|---|---|---|---|
name + |
+Yes + |
+String + |
+Tag name of the OpenTSDB data that stores the data in the stream. Value range: a string of 1 to 32 characters, consisting of only letters, digits, and underscores (_) + |
+
type + |
+Yes + |
+String + |
+Type name of the JSON attribute of the user data in the stream. +Value range: +
|
+
value + |
+Yes + |
+String + |
+Constant value or JSON attribute name of the user data in the stream. Value range: a string of 1 to 32 characters, consisting of only letters, digits, and underscores (_) + |
+
None
+POST https://{Endpoint}/v2/{project_id}/streams/{stream_name}/transfer-tasks
+
+{
+ "destination_type" : "CLOUDTABLE",
+ "cloudtable_destination_descriptor" : {
+ "task_name" : "hbasetask",
+ "consumer_strategy" : "TRIM_HORIZON",
+ "agency_name" : "dis_admin_agency",
+ "cloudtable_cluster_name" : "cloudtablecluster",
+ "cloudtable_cluster_id" : "b8c095e2-db5f-4732-8a1d-eacd662e35dc",
+ "cloudtable_table_name" : "cloudtabletable",
+ "cloudtable_row_key_delimiter" : "|",
+ "retry_duration" : 1800,
+ "obs_backup_bucket_path" : "obsbackupbucket",
+ "backup_file_prefix" : "",
+ "cloudtable_schema" : {
+ "row_key" : [ {
+ "value" : "datavalue",
+ "type" : "String"
+ } ],
+ "columns" : [ {
+ "column_family_name" : "cfname1",
+ "column_name" : "ID",
+ "value" : "datavalue1",
+ "type" : "String"
+ }, {
+ "column_family_name" : "cfname2",
+ "column_name" : "VALUE",
+ "value" : "datavalue2",
+ "type" : "String"
+ } ]
+ }
+ }
+}
+POST https://{Endpoint}/v2/{project_id}/streams/{stream_name}/transfer-tasks
+
+{
+ "destination_type" : "CLOUDTABLE",
+ "cloudtable_destination_descriptor" : {
+ "task_name" : "opentsdbtask",
+ "consumer_strategy" : "LATEST",
+ "agency_name" : "dis_admin_agency",
+ "cloudtable_cluster_name" : "cloudtablecluster",
+ "cloudtable_cluster_id" : "b8c095e2-db5f-4732-8a1d-eacd662e35dc",
+ "retry_duration" : 1800,
+ "obs_backup_bucket_path" : "obsbackupbucket",
+ "backup_file_prefix" : "",
+ "opentsdb_schema" : [ {
+ "metric" : [ {
+ "type" : "Constant",
+ "value" : "age"
+ } ],
+ "timestamp" : {
+ "value" : "date",
+ "type" : "String",
+ "format" : "yyyy/MM/dd HH:mm:ss"
+ },
+ "value" : {
+ "value" : "value",
+ "type" : "Bigint"
+ },
+ "tags" : [ {
+ "name" : "name",
+ "value" : "name",
+ "type" : "Bigint"
+ } ]
+ } ]
+ }
+}
+None
+Status Code + |
+Description + |
+
|---|---|
201 + |
+Normal response. + |
+
See Error Codes.
+This API is used to add DLI dump tasks.
+POST /v2/{project_id}/streams/{stream_name}/transfer-tasks
+ +Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
|---|---|---|---|
project_id + |
+Yes + |
+String + |
+Project ID. + |
+
stream_name + |
+Yes + |
+String + |
+Name of the stream. +Maximum: 60 + |
+
Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
|---|---|---|---|
X-Auth-Token + |
+Yes + |
+String + |
+User token. +The token can be obtained by calling the IAM API (value of X-Subject-Token in the response header). + |
+
Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
|---|---|---|---|
destination_type + |
+Yes + |
+String + |
+Dump destination. Possible values: +
Default: NOWHERE +Enumeration values: +
|
+
dli_destination_descriptor + |
+No + |
++ | +Parameter list of the DLI to which data in the DIS stream will be dumped. + |
+
Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
|---|---|---|---|
task_name + |
+Yes + |
+String + |
+Name of the dump task. The task name consists of letters, digits, hyphens (-), and underscores (_). It must be a string of 1 to 64 characters. + |
+
agency_name + |
+Yes + |
+String + |
+Name of the agency created on IAM. DIS uses an agency to access your specified resources. The parameters for creating an agency are as follows: +
If agencies have been created, you can obtain available agencies from the agency list by using the "Listing Agencies " API. +This parameter cannot be left blank and the parameter value cannot exceed 64 characters. +If there are dump tasks on the console, the system displays a message indicating that an agency will be automatically created. The name of the automatically created agency is dis_admin_agency. +Maximum: 64 + |
+
deliver_time_interval + |
+Yes + |
+Integer + |
+User-defined interval at which data is imported from the current DIS stream into OBS. If no data is pushed to the DIS stream during the current interval, no dump file package will be generated. +Value range: 30-900 +Default value: 300 +Unit: second +Minimum: 30 +Maximum: 900 +Default: 300 + |
+
consumer_strategy + |
+No + |
+String + |
+Offset. +
Default value: LATEST +Default: LATEST +Enumeration values: +
|
+
dli_database_name + |
+Yes + |
+String + |
+Name of the DLI database to which data in the DIS stream will be dumped. + |
+
dli_table_name + |
+Yes + |
+String + |
+Name of the DLI table to which data in the DIS stream will be dumped. +Note: +Only tables whose data location is DLI are supported, and you must have the permission to insert data into the tables. + |
+
obs_bucket_path + |
+Yes + |
+String + |
+Name of the OBS bucket used to temporarily store data in the DIS stream. + |
+
file_prefix + |
+No + |
+String + |
+Self-defined directory created in the OBS bucket and used to temporarily store data in the DIS stream. Directory levels are separated by slashes (/) and cannot start with slashes. +The value can contain a maximum of 50 characters, including letters, digits, underscores (_), and slashes (/). +This parameter is left empty by default. + |
+
retry_duration + |
+No + |
+String + |
+Time duration for DIS to retry if data fails to be dumped to DLI. If the retry time exceeds the value of this parameter, the data that fails to be dumped is backed up to the OBS bucket/file_prefix/dli_error directory. Value range: 0-7,200 Unit: second Default value: 1,800 If this parameter is set to 0, DIS does not retry when the dump fails. + |
+
None
+None
+None
+Status Code + |
+Description + |
+
|---|---|
201 + |
+Normal response. + |
+
See Error Codes.
+This API is used to add DWS dump tasks.
+POST /v2/{project_id}/streams/{stream_name}/transfer-tasks
+ +Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
|---|---|---|---|
project_id + |
+Yes + |
+String + |
+Project ID. + |
+
stream_name + |
+Yes + |
+String + |
+Name of the stream. +Maximum: 60 + |
+
Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
|---|---|---|---|
X-Auth-Token + |
+Yes + |
+String + |
+User token. +The token can be obtained by calling the IAM API (value of X-Subject-Token in the response header). + |
+
Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
|---|---|---|---|
destination_type + |
+Yes + |
+String + |
+Dump destination. Possible values: +
Default: NOWHERE +Enumeration values: +
|
+
dws_destination_descriptor + |
+No + |
++ | +Parameter list of the DWS to which data in the DIS stream will be dumped. + |
+
Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
|---|---|---|---|
task_name + |
+Yes + |
+String + |
+Name of the dump task. The task name consists of letters, digits, hyphens (-), and underscores (_). It must be a string of 1 to 64 characters. + |
+
agency_name + |
+Yes + |
+String + |
+Name of the agency created on IAM. DIS uses an agency to access your specified resources. The parameters for creating an agency are as follows: +
If agencies have been created, you can obtain available agencies from the agency list by using the "Listing Agencies " API. +This parameter cannot be left blank and the parameter value cannot exceed 64 characters. +If there are dump tasks on the console, the system displays a message indicating that an agency will be automatically created. The name of the automatically created agency is dis_admin_agency. +Maximum: 64 + |
+
deliver_time_interval + |
+Yes + |
+Integer + |
+User-defined interval at which data is imported from the current DIS stream into OBS. If no data is pushed to the DIS stream during the current interval, no dump file package will be generated. +Value range: 30-900 +Default value: 300 +Unit: second +Minimum: 30 +Maximum: 900 +Default: 300 + |
+
consumer_strategy + |
+No + |
+String + |
+Offset. +
Default value: LATEST +Default: LATEST +Enumeration values: +
|
+
dws_cluster_name + |
+Yes + |
+String + |
+Name of the DWS cluster that stores the data in the stream. + |
+
dws_cluster_id + |
+Yes + |
+String + |
+ID of the DWS cluster to which will be dumped. + |
+
dws_database_name + |
+Yes + |
+String + |
+Name of the DWS database that stores the data in the stream. + |
+
dws_schema + |
+Yes + |
+String + |
+Schema of the DWS database to which data will be dumped. + |
+
dws_table_name + |
+Yes + |
+String + |
+Name of the DWS table that stores the data in the stream. + |
+
dws_delimiter + |
+Yes + |
+String + |
+Delimiter used to separate the columns in the DWS tables. +The value can be a comma (,), semicolon (;), or vertical bar (|). + |
+
user_name + |
+Yes + |
+String + |
+Username of the DWS database to which data will be dumped. + |
+
user_password + |
+Yes + |
+String + |
+Password of the DWS database to which data will be dumped. + |
+
kms_user_key_name + |
+Yes + |
+String + |
+Key created in Key Management Service (KMS) and used to encrypt the password of the DWS database. + |
+
kms_user_key_id + |
+Yes + |
+String + |
+ID of the key created in KMS and used to encrypt the password of the DWS database. + |
+
obs_bucket_path + |
+Yes + |
+String + |
+Name of the OBS bucket used to temporarily store data in the DIS stream. + |
+
file_prefix + |
+No + |
+String + |
+Self-defined directory created in the OBS bucket and used to temporarily store data in the DIS stream. Directory levels are separated by slashes (/) and cannot start with slashes. +The value can contain a maximum of 50 characters, including letters, digits, underscores (_), and slashes (/). +This parameter is left empty by default. + |
+
retry_duration + |
+No + |
+String + |
+Duration when you can constantly retry dumping data to DWS after the dump fails. If the dump time exceeds the value of this parameter, the data that fails to be dumped to DWS will be backed up to the OBS bucket/file_prefix/dws_error directory. +Value range: 0-7,200 +Unit: second +Default value: 1,800 + |
+
dws_table_columns + |
+No + |
+String + |
+Column to be dumped to the DWS table. If the value is null or empty, all columns are dumped by default. For example, c1,c2 indicates that columns c1 and c2 in the schema are dumped to DWS. +This parameter is left blank by default. + |
+
options + |
+No + |
+Options object + |
+DWS fault tolerance option (used to specify various parameters of foreign table data). + |
+
Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
|---|---|---|---|
fill_missing_fields + |
+No + |
+String + |
+Specifies whether to set the field to Null or enable an error message to be displayed in the error table when the last field in a row of the data source file is missing during database import. +Value range: +
Default value: false/off +Enumeration values: +
|
+
ignore_extra_data + |
+No + |
+String + |
+Specifies whether to ignore excessive columns when the number of columns in a source data file exceeds that defined in the foreign table. This parameter is used only during data import. +Value range: +
Default value: false/off +Enumeration values: +
|
+
compatible_illegal_chars + |
+No + |
+String + |
+Specifies whether to tolerate invalid characters during data import. Specifies whether to convert invalid characters based on the conversion rule and import them to the database, or to report an error and stop the import. +Value range: +
Default value: false/off +Enumeration values: +
|
+
reject_limit + |
+No + |
+String + |
+Maximum number of data format errors allowed during the data import. If the number of data format errors does not reach the maximum, the data import is successful. +Value range: +
Default value: 0, indicating that error information is returned immediately + |
+
error_table_name + |
+No + |
+String + |
+Name of the error table that records data format errors. After the parallel import is complete, you can query the error information table to obtain the detailed error information. + |
+
None
+Adding DWS Dump Tasks
+POST https://{Endpoint}/v2/{project_id}/streams/{stream_name}/transfer-tasks
+
+{
+ "destination_type" : "DWS",
+ "dws_destination_descriptor" : {
+ "task_name" : "dwstask",
+ "consumer_strategy" : "LATEST",
+ "agency_name" : "dis_admin_agency",
+ "dws_cluster_name" : "dwscluster",
+ "dws_cluster_id" : "f82dc227-3691-47eb-bca7-e7851f509b2a",
+ "dws_database_name" : "postgres",
+ "dws_schema" : "dbadmin",
+ "dws_table_name" : "dwstablename",
+ "dws_delimiter" : "",
+ "user_name" : "dbadmin",
+ "user_password" : "userpassword",
+ "kms_user_key_name" : "kmskey",
+ "kms_user_key_id" : "1e759f06-9188-4d21-afab-a75e57c04d2b",
+ "obs_bucket_path" : "obsbucket",
+ "file_prefix" : "",
+ "deliver_time_interval" : 60,
+ "retry_duration" : 1800,
+ "options" : {
+ "fill_missing_fields" : "false",
+ "ignore_extra_data" : "false",
+ "compatible_illegal_chars" : "false"
+ }
+ }
+}
+None
+Status Code + |
+Description + |
+
|---|---|
201 + |
+Normal response. + |
+
See Error Codes.
+This API is used to add MRS dump tasks.
+POST /v2/{project_id}/streams/{stream_name}/transfer-tasks
+ +Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
|---|---|---|---|
project_id + |
+Yes + |
+String + |
+Project ID. + |
+
stream_name + |
+Yes + |
+String + |
+Name of the stream. +Maximum: 60 + |
+
Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
|---|---|---|---|
X-Auth-Token + |
+Yes + |
+String + |
+User token. +The token can be obtained by calling the IAM API (value of X-Subject-Token in the response header). + |
+
Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
|---|---|---|---|
destination_type + |
+Yes + |
+String + |
+Dump destination. Possible values: +
Default: NOWHERE +Enumeration values: +
|
+
mrs_destination_descriptor + |
+No + |
++ | +Parameter list of the MRS to which data in the DIS stream will be dumped. + |
+
Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
|---|---|---|---|
task_name + |
+Yes + |
+String + |
+Name of the dump task. The task name consists of letters, digits, hyphens (-), and underscores (_). It must be a string of 1 to 64 characters. + |
+
agency_name + |
+Yes + |
+String + |
+Name of the agency created on IAM. DIS uses an agency to access your specified resources. The parameters for creating an agency are as follows: +
If agencies have been created, you can obtain available agencies from the agency list by using the "Listing Agencies " API. +This parameter cannot be left blank and the parameter value cannot exceed 64 characters. +If there are dump tasks on the console, the system displays a message indicating that an agency will be automatically created. The name of the automatically created agency is dis_admin_agency. +Maximum: 64 + |
+
deliver_time_interval + |
+Yes + |
+Integer + |
+User-defined interval at which data is imported from the current DIS stream into OBS. If no data is pushed to the DIS stream during the current interval, no dump file package will be generated. +Value range: 30-900 +Default value: 300 +Unit: second +Minimum: 30 +Maximum: 900 +Default: 300 + |
+
consumer_strategy + |
+No + |
+String + |
+Offset. +
Default value: LATEST +Default: LATEST +Enumeration values: +
|
+
mrs_cluster_name + |
+Yes + |
+String + |
+Name of the MRS cluster to which data in the DIS stream will be dumped. +Note: +Only MRS clusters with non-Kerberos authentication are supported. + |
+
mrs_cluster_id + |
+Yes + |
+String + |
+ID of the MRS cluster to which data in the DIS stream will be dumped. + |
+
mrs_hdfs_path + |
+Yes + |
+String + |
+Hadoop Distributed File System (HDFS) path of the MRS cluster to which data in the DIS stream will be dumped. + |
+
file_prefix + |
+No + |
+String + |
+Self-defined directory created in the OBS bucket and used to temporarily store data in the DIS stream. Directory levels are separated by slashes (/) and cannot start with slashes. +The value can contain a maximum of 50 characters, including letters, digits, underscores (_), and slashes (/). +This parameter is left empty by default. + |
+
hdfs_prefix_folder + |
+No + |
+String + |
+Directory to store files that will be dumped to the chosen MRS cluster. Different directory levels are separated by slash (/). Value range: a string of 0 to 50 characters This parameter is left empty by default. + |
+
obs_bucket_path + |
+Yes + |
+String + |
+Name of the OBS bucket used to temporarily store data in the DIS stream. + |
+
retry_duration + |
+No + |
+String + |
+Time duration for DIS to retry if data fails to be dumped. If the retry time exceeds the value of this parameter, the data that fails to be dumped is backed up to the OBS bucket/file_prefix/mrs_error directory. +Value range: 0-7,200 +Unit: second +Default value: 1,800 +If this parameter is set to 0, DIS does not retry when the dump fails. + |
+
None
+Adding MRS Dump Tasks
+POST https://{Endpoint}/v2/{project_id}/streams/{stream_name}/transfer-tasks
+
+{
+ "destination_type" : "MRS",
+ "mrs_destination_descriptor" : {
+ "task_name" : "mrstask",
+ "consumer_strategy" : "LATEST",
+ "agency_name" : "dis_admin_agency",
+ "destination_file_type" : "text",
+ "mrs_cluster_id" : "f8123fa6-99f1-4ed9-83f4-c827c7277d41",
+ "mrs_cluster_name" : "mrscluster",
+ "mrs_hdfs_path" : "/user",
+ "obs_bucket_path" : "obsbucket",
+ "file_prefix" : "",
+ "hdfs_prefix_folder" : "",
+ "deliver_time_interval" : 30,
+ "retry_duration" : 1800
+ }
+}
+None
+Status Code + |
+Description + |
+
|---|---|
201 + |
+Normal response. + |
+
See Error Codes.
+This API is used to add permission policies to specified streams.
+POST /v2/{project_id}/streams/{stream_name}/policies
+ +Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
|---|---|---|---|
project_id + |
+Yes + |
+String + |
+Project ID. + |
+
stream_name + |
+Yes + |
+String + |
+Name of the stream for which you want to add an authorization policy. +Maximum: 64 + |
+
Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
|---|---|---|---|
X-Auth-Token + |
+Yes + |
+String + |
+User token. +The token can be obtained by calling the IAM API (value of X-Subject-Token in the response header). + |
+
Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
|---|---|---|---|
stream_id + |
+Yes + |
+String + |
+Unique ID of the stream. + |
+
principal_name + |
+Yes + |
+String + |
+Authorized user. +If the permission is granted to a specified tenant, the format is domainName.*. If the permission is granted to a specified sub-user of a tenant, the format is domainName.userName. +Multiple accounts can be added and separated by commas (,), for example, domainName1.userName1,domainName2.userName2. + |
+
action_type + |
+Yes + |
+String + |
+Authorization operation type. +
Enumeration values: +
|
+
effect + |
+Yes + |
+String + |
+Authorization impact type. +
Enumeration values: +
|
+
None
+Adding Permission Policies for Tenants
+POST https://{Endpoint}/v2/{project_id}/streams/{stream_name}/policies
+
+{
+ "stream_id" : "CiFdELMr0401K9GGZlp",
+ "principal_name" : "domainname1",
+ "action_type" : "putRecords",
+ "effect" : "accept"
+}
+Adding Permission Policies for Sub-users
+POST https://{Endpoint}/v2/{project_id}/streams/{stream_name}/policies
+
+{
+ "stream_id" : "CiFdELMr0401K9GGZlp",
+ "principal_name" : "domainname1.username1",
+ "action_type" : "putRecords",
+ "effect" : "accept"
+}
+None
+Status Code + |
+Description + |
+
|---|---|
201 + |
+Normal response. + |
+
See Error Codes.
+This API is used to add tags to specified streams.
+POST /v2/{project_id}/stream/{stream_id}/tags
+ +Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
|---|---|---|---|
project_id + |
+Yes + |
+String + |
+Project ID. + |
+
stream_id + |
+Yes + |
+String + |
+Stream ID. +Maximum: 60 + |
+
Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
|---|---|---|---|
X-Auth-Token + |
+Yes + |
+String + |
+User token. +The token can be obtained by calling the IAM API (value of X-Subject-Token in the response header). + |
+
Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
|---|---|---|---|
tag + |
+Yes + |
+Tag object + |
+Label object. + |
+
Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
|---|---|---|---|
key + |
+No + |
+String + |
+Key. +
Minimum: 1 +Maximum: 36 + |
+
value + |
+No + |
+String + |
+Value. +
Minimum: 0 +Maximum: 43 + |
+
None
+Adding Tags for Specified Streams
+POST https://{Endpoint}/v2/{project_id}/stream/{stream_id}/tags
+
+{
+ "tag" : {
+ "key" : "key",
+ "value" : "value"
+ }
+}
+None
+Status Code + |
+Description + |
+
|---|---|
204 + |
+Normal response. + |
+
See Error Codes.
+This API is used to delete apps.
+DELETE /v2/{project_id}/apps/{app_name}
+ +Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
|---|---|---|---|
project_id + |
+Yes + |
+String + |
+Project ID. + |
+
app_name + |
+Yes + |
+String + |
+Name of the app to be deleted. + |
+
Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
|---|---|---|---|
X-Auth-Token + |
+Yes + |
+String + |
+User token. +The token can be obtained by calling the IAM API (value of X-Subject-Token in the response header). + |
+
None
+Deleting Apps
+DELETE https://{Endpoint}/v2/{project_id}/apps/{app_name}
+None
+Status Code + |
+Description + |
+
|---|---|
204 + |
+Normal response. + |
+
See Error Codes.
+This API is used to delete checkpoints.
+DELETE /v2/{project_id}/checkpoints
+ +Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
|---|---|---|---|
project_id + |
+Yes + |
+String + |
+Project ID. + |
+
Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
|---|---|---|---|
stream_name + |
+Yes + |
+String + |
+Name of the stream to which the checkpoint belongs. + |
+
app_name + |
+Yes + |
+String + |
+Name of the application associated with the checkpoint. +Minimum: 1 +Maximum: 50 + |
+
checkpoint_type + |
+Yes + |
+String + |
+Type of the checkpoint. LAST_READ: Only sequence numbers are recorded in databases. +Enumeration values: +
|
+
partition_id + |
+No + |
+String + |
+Identifier of the stream partition to which the checkpoint belongs. The value can be in either of the following formats: +
For example, if a stream has three partitions, the partition identifiers are 0, 1, and 2, and shardId-0000000000, shardId-0000000001, shardId-0000000002, respectively. + |
+
Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
|---|---|---|---|
X-Auth-Token + |
+Yes + |
+String + |
+User token. +The token can be obtained by calling the IAM API (value of X-Subject-Token in the response header). + |
+
None
+Deleting Checkpoints
+DELETE https://{Endpoint}/v2/{project_id}/checkpoints
+None
+Status Code + |
+Description + |
+
|---|---|
204 + |
+Normal response. + |
+
See Error Codes.
+This API is used to delete specified streams.
+DELETE /v2/{project_id}/streams/{stream_name}
+ +Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
|---|---|---|---|
project_id + |
+Yes + |
+String + |
+Project ID. + |
+
stream_name + |
+Yes + |
+String + |
+Name of the stream to be deleted. +Maximum: 60 + |
+
Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
|---|---|---|---|
X-Auth-Token + |
+Yes + |
+String + |
+User token. +The token can be obtained by calling the IAM API (value of X-Subject-Token in the response header). + |
+
None
+Deleting Specified Streams
+DELETE https://{Endpoint}/v2/{project_id}/streams/{stream_name}
+None
+Status Code + |
+Description + |
+
|---|---|
204 + |
+Normal response. + |
+
See Error Codes.
+This API is used to delete tags of specified streams.
+DELETE /v2/{project_id}/stream/{stream_id}/tags/{key}
+ +Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
|---|---|---|---|
project_id + |
+Yes + |
+String + |
+Project ID. + |
+
stream_id + |
+Yes + |
+String + |
+Stream ID. + |
+
key + |
+Yes + |
+String + |
+Tag key. + |
+
Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
|---|---|---|---|
X-Auth-Token + |
+Yes + |
+String + |
+User token. +The token can be obtained by calling the IAM API (value of X-Subject-Token in the response header). + |
+
None
+Deleting Tags of Specified Streams
+DELETE https://{Endpoint}/v2/{project_id}/stream/{stream_id}/tags/{key}
+None
+Status Code + |
+Description + |
+
|---|---|
204 + |
+Normal response. + |
+
See Error Codes.
+This API is used to delete dump tasks.
+DELETE /v2/{project_id}/streams/{stream_name}/transfer-tasks/{task_name}
+ +Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
|---|---|---|---|
project_id + |
+Yes + |
+String + |
+Project ID. + |
+
stream_name + |
+Yes + |
+String + |
+Name of the stream. + |
+
task_name + |
+Yes + |
+String + |
+Name of the dump task to be deleted. + |
+
Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
|---|---|---|---|
X-Auth-Token + |
+Yes + |
+String + |
+User token. +The token can be obtained by calling the IAM API (value of X-Subject-Token in the response header). + |
+
None
+Deleting Dump Tasks
+DELETE https://{Endpoint}/v2/{project_id}/streams/{stream_name}/transfer-tasks/{task_name}
+None
+Status Code + |
+Description + |
+
|---|---|
204 + |
+Normal response. + |
+
See Error Codes.
+Status Code + |
+Error Codes + |
+Error Message + |
+Description + |
+Solution + |
+
|---|---|---|---|---|
400 + |
+DIS.4117 + |
+Invalid Project Id. %s + |
+Invalid project ID. + |
+Ensure that the project ID is valid. + |
+
400 + |
+DIS.4200 + |
+Invalid request. %s + |
+Invalid request. + |
+Ensure that the request is invalid by referring to API Reference + |
+
400 + |
+DIS.4201 + |
+Invalid partition_id. %s + |
+Invalid partition ID. + |
+Ensure that the partition ID is valid. + |
+
400 + |
+DIS.4202 + |
+Empty request. + |
+The request is empty. + |
+Enter a valid request. + |
+
400 + |
+DIS.4203 + |
+Invalid monitoring period. %s + |
+The start time for querying the monitoring information is invalid. + |
+Enter a valid timestamp. + |
+
400 + |
+DIS.4204 + |
+The monitoring period cannot be longer than 7 days. + |
+Only the monitoring information generated in the recent seven days can be queried. + |
+Query the monitoring information generated in the recent seven days. + |
+
400 + |
+DIS.4205 + |
+Stream is not running. + |
+The stream is not in the running state. + |
+Check the stream status. + |
+
400 + |
+DIS.4208 + |
+Mrs cluster is invalid. %s + |
+The MRS cluster entered during MRS dump task creation is invalid. + |
+Ensure that the MRS cluster name and ID are correct and the cluster is running in security mode. + |
+
400 + |
+DIS.4209 + |
+Invalid metrics label. %s + |
+The monitoring metric entered during monitoring information query is invalid. + |
+Check and modify the monitoring metric by referring to API Reference. + |
+
400 + |
+DIS.4215 + |
+Invalid cursor type. %s + |
+The cursor type entered during data cursor acquisition is invalid. + |
+Check and modify the cursor type by referring to API Reference. + |
+
400 + |
+DIS.4216 + |
+Invalid sequence_number. %s + |
+The starting sequence number entered during data cursor acquisition is invalid. + |
+Enter a valid starting sequence number. + |
+
400 + |
+DIS.4217 + |
+Invalid partition cursor. %s + |
+The partition cursor entered during data download from DIS is invalid. + |
+Obtain the partition cursor again and download the data. + |
+
400 + |
+DIS.4224 + |
+Sequence_number out of range. %s + |
+The starting sequence number entered during data cursor acquisition is not in a valid range. + |
+Enter a valid starting sequence number. + |
+
400 + |
+DIS.4225 + |
+Expired partition cursor. %s + |
+The partition cursor entered during data download from DIS has expired. + |
+Obtain the partition cursor again and download the data. + |
+
400 + |
+DIS.4226 + |
+A partition iterator error occurred or a record to which the SN corresponds has expired. Try to obtain the partition iterator again. + |
+The starting sequence number of the partition cursor entered during data acquisition has expired. + |
+Obtain the data cursor again and use the new cursor to obtain data. + |
+
400 + |
+DIS.4300 + |
+Request error. + |
+Incorrect request body. + |
+Modify the request body by referring to API Reference. + |
+
400 + |
+DIS.4301 + |
+The stream does not exist. %s + |
+The stream does not exist. + |
+Ensure that the stream exists. + |
+
400 + |
+DIS.4302 + |
+Partition does not exist. %s + |
+The partition does not exist. + |
+Ensure that the partition ID exists. + |
+
400 + |
+DIS.4303 + |
+Exceeded traffic control limit. + |
+The flow control limit is exceeded. + |
+Add the stream or reduce the upload rate. + |
+
400 + |
+DIS.4305 + |
+Too many stream requests. + |
+An excessive number of user requests are generated at the same time. + |
+Reduce the requesting frequency and try again. + |
+
400 + |
+DIS.4306 + |
+Bucket does not exist. %s + |
+The OBS bucket does not exist. + |
+Ensure that the OBS bucket exists. + |
+
400 + |
+DIS.4307 + |
+The stream already exists. + |
+The stream already exists. + |
+Enter a new stream name. + |
+
400 + |
+DIS.4308 + |
+Insufficient quota. + |
+Insufficient stream or partition quotas. + |
+Release the resources that will not be used to ensure that the quota limit is not exceeded or submit a service ticket to increase the quota limit. + |
+
400 + |
+DIS.4309 + |
+Too many request failures. Please try again later. + |
+The IP address is added to the blacklist. + |
+Ensure that the authentication information and request are valid and try again later. + |
+
400 + |
+DIS.4310 + |
+OBS access error. + |
+OBS fails to be accessed. + |
+Ensure that the user has permissions to access OBS. + |
+
400 + |
+DIS.4319 + |
+Partition is expired. %s + |
+The partition has expired. + |
+Use a correct and valid partition. + |
+
400 + |
+DIS.4329 + |
+app quota exceeded. + |
+The application quota exceeds the limit. + |
+Release the applications that are not used. + |
+
400 + |
+DIS.4330 + |
+app already exist. + |
+An application with the same name already exists. + |
+Enter a new application name. + |
+
400 + |
+DIS.4331 + |
+app is using. + |
+The application fails to be deleted. + |
+Ensure that the application that you want to delete is not being used. + |
+
400 + |
+DIS.4332 + |
+app not found. + |
+The application does not exist. + |
+Ensure that the application name is correct. + |
+
400 + |
+DIS.4335 + |
+Invalid IAM agency. + |
+The IAM agency used during dump task creation is invalid. + |
+Ensure that dis_admin_agency created by DIS or the user-defined IAM agency exists and permission is complete. + |
+
400 + |
+DIS.4336 + |
+Invalid HDFS path. + |
+The MRS HDFS path entered during MRS dump task creation is invalid. + |
+Ensure that the MRS HDFS path exists. + |
+
400 + |
+DIS.4337 + |
+The DLI database does not exist. + |
+The DLI database entered during DLI dump task creation does not exist. + |
+Ensure that the DLI database exists. + |
+
400 + |
+DIS.4338 + |
+The DLI table does not exist. + |
+The DLI table entered during DLI dump task creation does not exist. + |
+Ensure that the DLI table exists and is an internal table. + |
+
400 + |
+DIS.4339 + |
+Consumer quota exceeded. + |
+The consumer quota of the consumer group is insufficient. + |
+Allocate consumers properly or create a consumer group to meet the requirement. + |
+
400 + |
+DIS.4341 + |
+The CloudTable cluster does not exist. + |
+The CloudTable cluster entered during CloudTable dump task creation does not exist. + |
+Ensure that the CloudTable cluster exists and is running properly. + |
+
400 + |
+DIS.4342 + |
+The CloudTable table does not exist + |
+The CloudTable table entered during CloudTable dump task creation does not exist. + |
+Ensure that the CloudTable table exists. + |
+
400 + |
+DIS.4343 + |
+The CloudTable table family does not exist. + |
+The CloudTable column family entered during CloudTable dump task creation does not exist. + |
+Ensure that the CloudTable column family exists. + |
+
400 + |
+DIS.4345 + |
+Invalid CloudTable schema. + |
+The schema entered during CloudTable dump task creation is invalid. + |
+Check the schema based on the returned details to ensure that the configured JSON attribute name exists and the parameters are valid. + |
+
400 + |
+DIS.4348 + |
+Invalid CloudTable openTSDB schema. + |
+The schema entered during CloudTable OpenTSDB dump task creation is invalid. + |
+Check the schema based on the returned details to ensure that the configured JSON attribute name exists and the parameters are valid. + |
+
400 + |
+DIS.4350 + |
+Invalid DWS cluster. + |
+The DWS cluster entered during DWS dump task creation does not exist. + |
+Ensure that the DWS cluster exists and is running properly. + |
+
400 + |
+DIS.4351 + |
+Invalid KMS userKey. + |
+The KMS key entered during DWS dump task creation is invalid. + |
+Ensure that the KMS key exists. + |
+
400 + |
+DIS.4354 + |
+The transfer task does not exist. + |
+The dump task to be deleted or updated does not exist. + |
+Ensure that the dump task exists. + |
+
400 + |
+DIS.4355 + |
+The transfer task already exists. + |
+A dump task with the same name already exists. + |
+Enter a new dump task name. + |
+
400 + |
+DIS.4357 + |
+Exceeded transfer task quota. + |
+A maximum of five dump tasks can be created for one stream at the same time. + |
+Delete the discarded dump tasks and then add dump tasks again. + |
+
400 + |
+DIS.4360 + |
+Invalid data schema. + |
+The data schema entered during stream creation or update is invalid. + |
+Ensure that the data schema format is correct and try again. + |
+
400 + |
+DIS.4375 + |
+The app does not commit checkpoint + |
+The application does not submit the checkpoint operation in the stream. + |
+Check whether the application has submitted the checkpoint operation in the consumption stream. + |
+
400 + |
+DIS.4601 + |
+The number of resource tags has reached the maximum. + |
+A maximum of 10 tags can be added to a resource. + |
+Delete the discarded tags and then add tags again. + |
+
400 + |
+DIS.4602 + |
+Invalid resource type. + |
+Invalid resource type. + |
+Ensure that the resource type is valid. + |
+
400 + |
+DIS.4603 + |
+The resource does not exist. + |
+The resource does not exist. + |
+Ensure that the resource exists. + |
+
400 + |
+DIS.4604 + |
+The key does not exist. + |
+The tag key does not exist. + |
+Ensure that the tag key exists. + |
+
400 + |
+DIS.4605 + |
+The action is not supported. + |
+The current tag operation is not supported. + |
+Ensure that the current tag operation is valid. Currently, only the create and delete operations are supported. + |
+
403 + |
+DIS.4116 + |
+Invalid RBAC. %s + |
+User operations are restricted. + |
+Ensure that the account has passed real-name authentication, is not in arrears, or has permissions to operate DIS. + |
+
500 + |
+DIS.5000 + |
+System error. + |
+System error. + |
+Contact customer service or technical support to handle system errors. + |
+
This API is used to query apps.
+GET /v2/{project_id}/apps
+ +Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
|---|---|---|---|
project_id + |
+Yes + |
+String + |
+Project ID. + |
+
Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
|---|---|---|---|
limit + |
+No + |
+Integer + |
+Maximum number of apps to list in a single API call. Value range: 1-100 Default value: 10 +Minimum: 1 +Maximum: 100 +Default: 10 + |
+
start_app_name + |
+No + |
+String + |
+Name of the app to start the list with. The returned app list does not contain this app name. + |
+
stream_name + |
+No + |
+String + |
+Name of the stream whose apps will be returned. + |
+
Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
|---|---|---|---|
X-Auth-Token + |
+Yes + |
+String + |
+User token. +The token can be obtained by calling the IAM API (value of X-Subject-Token in the response header). + |
+
Status code: 200
+ +Parameter + |
+Type + |
+Description + |
+
|---|---|---|
has_more_app + |
+Boolean + |
+Specifies whether there are more matching consumer applications to list. +
|
+
apps + |
+Array of DescribeAppResult objects + |
+AppEntry list that meets the current request. + |
+
total_number + |
+Integer + |
+Total number of apps that meet criteria. + |
+
Parameter + |
+Type + |
+Description + |
+
|---|---|---|
app_name + |
+String + |
+Name of the app. + |
+
app_id + |
+String + |
+Unique identifier of the app. + |
+
create_time + |
+Long + |
+Time when the app is created, in milliseconds. + |
+
commit_checkpoint_stream_names + |
+Array of strings + |
+List of associated streams. + |
+
Querying Apps
+GET https://{Endpoint}/v2/{project_id}/apps
+Status code: 200
+Normal response.
+{
+ "total_number" : 1,
+ "apps" : [ {
+ "app_id" : "bd6IPpvgiIflQPMpi9M",
+ "app_name" : "newstream",
+ "create_time" : 1593569685875
+ } ],
+ "has_more_app" : true
+}
+Status Code + |
+Description + |
+
|---|---|
200 + |
+Normal response. + |
+
400 + |
+Invalid Parameters + |
+
404 + |
+Application not found + |
+
500 + |
+Internal Server Error + |
+
See Error Codes.
+This API is used to query permission policies of specified streams.
+GET /v2/{project_id}/streams/{stream_name}/policies
+ +Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
|---|---|---|---|
project_id + |
+Yes + |
+String + |
+Project ID. + |
+
stream_name + |
+Yes + |
+String + |
+Name of the DIS stream to be created. +Maximum: 60 + |
+
Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
|---|---|---|---|
X-Auth-Token + |
+Yes + |
+String + |
+User token. +The token can be obtained by calling the IAM API (value of X-Subject-Token in the response header). + |
+
Status code: 200
+ +Parameter + |
+Type + |
+Description + |
+
|---|---|---|
stream_id + |
+String + |
+Unique ID of the stream. + |
+
rules + |
+Array of PrincipalRule objects + |
+List of authorization information records. + |
+
Parameter + |
+Type + |
+Description + |
+
|---|---|---|
principal + |
+String + |
+ID of the authorized user. + |
+
principal_name + |
+String + |
+Name of the authorized user. +If the permission is granted to all sub-users of a tenant, the format is domainName.*. If the permission is granted to a specified sub-user of a tenant, the format is domainName.userName. + |
+
action_type + |
+String + |
+Authorization operation type. +
Enumeration values: +
|
+
effect + |
+String + |
+Authorization impact type. +
Enumeration values: +
|
+
Querying Permission Policies
+GET https://{Endpoint}/v2/{project_id}/streams/{stream_name}/policies
+Status code: 200
+Normal response.
+{
+ "streamId" : "CiFdELMr0401K9GGZlp",
+ "rules" : [ {
+ "action_type" : "putRecords",
+ "principal" : "3b3f237122574xxxxb74482ae11005ba.*",
+ "principal_name" : "anotherusername",
+ "effect" : "accept"
+ } ]
+}
+Status Code + |
+Description + |
+
|---|---|
200 + |
+Normal response. + |
+
See Error Codes.
+This API is used to filter resources (streams) by tag.
+POST /v2/{project_id}/stream/resource_instances/action
+ +Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
|---|---|---|---|
project_id + |
+Yes + |
+String + |
+Project ID. + |
+
Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
|---|---|---|---|
X-Auth-Token + |
+Yes + |
+String + |
+User token. +The token can be obtained by calling the IAM API (value of X-Subject-Token in the response header). + |
+
Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
|---|---|---|---|
action + |
+Yes + |
+String + |
+Operation to be performed. The value can be only filter or count. +
Enumeration values: +
|
+
limit + |
+No + |
+String + |
+Number of queried records. This parameter is not displayed if action is set to count. The default value is 1000 if action is set to filter. The value must be an integer ranging from 1 to 1000. +Default: 1000 + |
+
offset + |
+No + |
+String + |
+Index position. The query starts from the next data record indexed by this parameter. When querying data on the first page, you do not need to pass this parameter. When querying data on subsequent pages, set this parameter to the value in the response body returned by querying data of the previous page. This parameter is not displayed when action is set to count. If action is set to filter, the value defaults to 0. The value must be a positive integer. + |
+
tags + |
+No + |
+Array of Tags objects + |
+The return result contains resources corresponding to all tags in this parameter. This parameter contains a maximum of 10 keys, and each key contains a maximum of 10 values. The structure body cannot be missing, and the key cannot be left blank or set to an empty string. + |
+
tags_any + |
+No + |
+Array of Tags objects + |
+The return result contains resources corresponding to any tag in this parameter. This parameter contains a maximum of 10 keys, and each key contains a maximum of 10 values. The structure body cannot be missing, and the key cannot be left blank or set to an empty string. Keys and the values of a key must be unique. + |
+
not_tags + |
+No + |
+Array of Tags objects + |
+The return result does not contain resources corresponding to all tags in this parameter. This parameter contains a maximum of 10 keys, and each key contains a maximum of 10 values. The structure body cannot be missing, and the key cannot be left blank or set to an empty string. Keys and the values of a key must be unique. + |
+
not_tags_any + |
+No + |
+Array of Tags objects + |
+The return result does not contain resources corresponding to any tag in this parameter. This parameter contains a maximum of 10 keys, and each key contains a maximum of 10 values. The structure body cannot be missing, and the key cannot be left blank or set to an empty string. Keys must be unique and values of a key must be unique. + |
+
matches + |
+No + |
+String + |
+Search criteria. The tag key is the field to match. Currently, only resource_name is supported. value indicates the matched value. This field is a fixed dictionary value. + |
+
Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
|---|---|---|---|
key + |
+No + |
+String + |
+Key. +
Maximum: 36 + |
+
values + |
+No + |
+Array of strings + |
+Tag value list. +If values are null, it indicates any_value. The relationship between values is OR. + |
+
Status code: 200
+ +Parameter + |
+Type + |
+Description + |
+
|---|---|---|
action + |
+String + |
+Operation to be performed. The value can be only filter or count. +
Enumeration values: +
|
+
limit + |
+String + |
+Number of queried records. This parameter is not displayed if action is set to count. The default value is 1000 if action is set to filter. The value must be an integer ranging from 1 to 1000. +Default: 1000 + |
+
offset + |
+String + |
+Index position. The query starts from the next data record indexed by this parameter. When querying data on the first page, you do not need to pass this parameter. When querying data on subsequent pages, set this parameter to the value in the response body returned by querying data of the previous page. This parameter is not displayed when action is set to count. If action is set to filter, the value defaults to 0. The value must be a positive integer. + |
+
tags + |
+Array of Tags objects + |
+The return result contains resources corresponding to all tags in this parameter. This parameter contains a maximum of 10 keys, and each key contains a maximum of 10 values. The structure body cannot be missing, and the key cannot be left blank or set to an empty string. + |
+
tags_any + |
+Array of Tags objects + |
+The return result contains resources corresponding to any tag in this parameter. This parameter contains a maximum of 10 keys, and each key contains a maximum of 10 values. The structure body cannot be missing, and the key cannot be left blank or set to an empty string. Keys and the values of a key must be unique. + |
+
not_tags + |
+Array of Tags objects + |
+The return result does not contain resources corresponding to all tags in this parameter. This parameter contains a maximum of 10 keys, and each key contains a maximum of 10 values. The structure body cannot be missing, and the key cannot be left blank or set to an empty string. Keys and the values of a key must be unique. + |
+
not_tags_any + |
+Array of Tags objects + |
+The return result does not contain resources corresponding to any tag in this parameter. This parameter contains a maximum of 10 keys, and each key contains a maximum of 10 values. The structure body cannot be missing, and the key cannot be left blank or set to an empty string. Keys must be unique and values of a key must be unique. + |
+
matches + |
+String + |
+Search criteria. The tag key is the field to match. Currently, only resource_name is supported. value indicates the matched value. This field is a fixed dictionary value. + |
+
Parameter + |
+Type + |
+Description + |
+
|---|---|---|
key + |
+String + |
+Key. +
Maximum: 36 + |
+
values + |
+Array of strings + |
+Tag value list. +If values are null, it indicates any_value. The relationship between values is OR. + |
+
Resource (stream) filtering by tag and record querying
+POST https://{Endpoint}/v2/{project_id}/stream/resource_instances/action
+
+{
+ "action" : "count",
+ "tags" : [ {
+ "key" : "key1",
+ "values" : [ "value1", "value2" ]
+ }, {
+ "key" : "key2",
+ "values" : [ "value1", "value2" ]
+ } ],
+ "matches" : [ {
+ "key" : "resource_name",
+ "value" : "resource1"
+ } ]
+}
+Resource (stream) filtering by tag and querying by page.
+POST https://{Endpoint}/v2/{project_id}/stream/resource_instances/action
+
+{
+ "offset" : "0",
+ "limit" : "100",
+ "action" : "filter",
+ "matches" : [ {
+ "key" : "resource_name",
+ "value" : "resource1"
+ } ],
+ "tags" : [ {
+ "key" : "key1",
+ "values" : [ "*value1", "value2" ]
+ } ]
+}
+Status code: 200
+Request body for filtering resources (streams) by tag.
+{
+ "resources" : [ {
+ "resource_detail" : null,
+ "resource_id" : "cdfs_cefs_wesas_12_dsad",
+ "resource_name" : "resouece1",
+ "tags" : [ {
+ "key" : "key1",
+ "value" : "value1"
+ }, {
+ "key" : "key2",
+ "value" : "value1"
+ } ]
+ } ],
+ "total_count" : 1000
+}
+Status Code + |
+Description + |
+
|---|---|
200 + |
+Request body for filtering resources (streams) by tag. + |
+
See Error Codes.
+This API is used to query all tags of specified regions.
+GET /v2/{project_id}/stream/tags
+ +Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
|---|---|---|---|
project_id + |
+Yes + |
+String + |
+Project ID. + |
+
Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
|---|---|---|---|
X-Auth-Token + |
+Yes + |
+String + |
+User token. +The token can be obtained by calling the IAM API (value of X-Subject-Token in the response header). + |
+
Status code: 200
+ +Parameter + |
+Type + |
+Description + |
+
|---|---|---|
tags + |
+Array of Tags objects + |
+Tag list. + |
+
Parameter + |
+Type + |
+Description + |
+
|---|---|---|
key + |
+String + |
+Key. +
Maximum: 36 + |
+
values + |
+Array of strings + |
+Tag value list. +If values are null, it indicates any_value. The relationship between values is OR. + |
+
Querying Tags of Specified Regions
+GET https://{Endpoint}/v2/{project_id}/stream/tags
+Status code: 200
+Response body of the tag set.
+{
+ "tags" : [ {
+ "key" : "key1",
+ "values" : [ "value1", "value2" ]
+ }, {
+ "key" : "key2",
+ "values" : [ "value1", "value2" ]
+ } ]
+}
+Status Code + |
+Description + |
+
|---|---|
200 + |
+Response body of the tag set. + |
+
See Error Codes.
+This API is used to query dump tasks.
+GET /v2/{project_id}/streams/{stream_name}/transfer-tasks
+ +Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
|---|---|---|---|
project_id + |
+Yes + |
+String + |
+Project ID. + |
+
stream_name + |
+Yes + |
+String + |
+Name of the stream to be queried. +Maximum: 60 + |
+
Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
|---|---|---|---|
X-Auth-Token + |
+Yes + |
+String + |
+User token. +The token can be obtained by calling the IAM API (value of X-Subject-Token in the response header). + |
+
Status code: 200
+ +Parameter + |
+Type + |
+Description + |
+
|---|---|---|
total_number + |
+Integer + |
+Total number of dump tasks. + |
+
quota + |
+Integer + |
+Maximum number of dump tasks that can be created. + |
+
tasks + |
+Array of TransferTask objects + |
+List of dump tasks. + |
+
Parameter + |
+Type + |
+Description + |
+
|---|---|---|
task_name + |
+String + |
+Name of the dump task. + |
+
state + |
+String + |
+Dump task status. Possible values: +
Enumeration values: +
|
+
destination_type + |
+String + |
+Dump destination. Possible values: +
Enumeration values: +
|
+
create_time + |
+Long + |
+Time when the dump task is created. + |
+
last_transfer_timestamp + |
+Long + |
+Latest dump time of the dump task. + |
+
Querying Dump Tasks
+GET https://{Endpoint}/v2/{project_id}/streams/{stream_name}/transfer-tasks
+Status code: 200
+Normal response.
+{
+ "tasks" : [ {
+ "task_id" : "As805BudhcH1lDs6gbn",
+ "destination_type" : "OBS",
+ "task_name" : "newtask",
+ "create_time" : 1606554932552,
+ "state" : "RUNNING",
+ "last_transfer_timestamp" : 1606984428612
+ } ],
+ "total_number" : 1
+}
+Status Code + |
+Description + |
+
|---|---|
200 + |
+Normal response. + |
+
See Error Codes.
+This API is used to query app details.
+GET /v2/{project_id}/apps/{app_name}
+ +Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
|---|---|---|---|
project_id + |
+Yes + |
+String + |
+Project ID. + |
+
app_name + |
+Yes + |
+String + |
+Name of the app to be queried. + |
+
Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
|---|---|---|---|
X-Auth-Token + |
+Yes + |
+String + |
+User token. +The token can be obtained by calling the IAM API (value of X-Subject-Token in the response header). + |
+
Status code: 200
+ +Parameter + |
+Type + |
+Description + |
+
|---|---|---|
app_name + |
+String + |
+Name of the app. + |
+
app_id + |
+String + |
+Unique identifier of the app. + |
+
create_time + |
+Long + |
+Time when the app is created, in milliseconds. + |
+
commit_checkpoint_stream_names + |
+Array of strings + |
+List of associated streams. + |
+
Querying App Details
+GET https://{Endpoint}/v2/{project_id}/apps/{app_name}
+Status code: 200
+Normal response.
+{
+ "app_id" : "bd6IPpvgiIflQPMpi9M",
+ "app_name" : "newstream",
+ "create_time" : 1593569685875,
+ "commit_checkpoint_stream_names" : [ "newstream" ]
+}
+Status Code + |
+Description + |
+
|---|---|
200 + |
+Normal response. + |
+
See Error Codes.
+This API is used to query checkpoint details.
+GET /v2/{project_id}/checkpoints
+ +Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
|---|---|---|---|
project_id + |
+Yes + |
+String + |
+Project ID. + |
+
Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
|---|---|---|---|
stream_name + |
+Yes + |
+String + |
+Name of the stream to which the checkpoint belongs. + |
+
partition_id + |
+Yes + |
+String + |
+Identifier of the stream partition to which the checkpoint belongs. The value can be in either of the following formats: +
For example, if a stream has three partitions, the partition identifiers are 0, 1, and 2, or shardId-0000000000, shardId-0000000001, and shardId-0000000002, respectively. + |
+
app_name + |
+Yes + |
+String + |
+Name of the app associated with the checkpoint. + |
+
checkpoint_type + |
+Yes + |
+String + |
+Type of the checkpoint. +
Enumeration values: +
|
+
Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
|---|---|---|---|
X-Auth-Token + |
+Yes + |
+String + |
+User token. +The token can be obtained by calling the IAM API (value of X-Subject-Token in the response header). + |
+
Status code: 204
+ +Parameter + |
+Type + |
+Description + |
+
|---|---|---|
sequence_number + |
+String + |
+Sequence number used to record the consumption checkpoint of the stream. + |
+
metadata + |
+String + |
+Metadata information of the consumer application. + |
+
Querying Checkpoint Details
+GET https://{Endpoint}/v2/{project_id}/checkpoints
+Status code: 204
+Normal response.
+{
+ "sequence_number" : "newstram",
+ "metadata" : ""
+}
+Status Code + |
+Description + |
+
|---|---|
204 + |
+Normal response. + |
+
See Error Codes.
+This API is used to query the consumption status of apps.
+GET /v2/{project_id}/apps/{app_name}/streams/{stream_name}
+ +Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
|---|---|---|---|
project_id + |
+Yes + |
+String + |
+Project ID. + |
+
app_name + |
+Yes + |
+String + |
+Name of the app to be queried. + |
+
stream_name + |
+Yes + |
+String + |
+Name of the stream to be queried. +Maximum: 60 + |
+
Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
|---|---|---|---|
limit + |
+No + |
+Integer + |
+Max. number of partitions to list in a single API call. The minimum value is 1 and the maximum value is 1,000. The default value is 100. +Minimum: 1 +Maximum: 1000 +Default: 100 + |
+
start_partition_id + |
+No + |
+String + |
+Name of the partition to start the partition list with. The returned partition list does not contain this partition. + |
+
checkpoint_type + |
+Yes + |
+String + |
+Type of the checkpoint. +
Enumeration values: +
|
+
Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
|---|---|---|---|
X-Auth-Token + |
+Yes + |
+String + |
+User token. +The token can be obtained by calling the IAM API (value of X-Subject-Token in the response header). + |
+
Status code: 200
+ +Parameter + |
+Type + |
+Description + |
+
|---|---|---|
app_name + |
+String + |
+Name of the app. + |
+
app_id + |
+String + |
+Unique identifier of the app. + |
+
create_time + |
+Long + |
+Time when the app is created, in milliseconds. + |
+
commit_checkpoint_stream_names + |
+Array of strings + |
+List of associated streams. + |
+
Querying App Consumption Status
+GET https://{Endpoint}/v2/{project_id}/apps/{app_name}/streams/{stream_name}
+Status code: 200
+Normal response.
+{
+ "stream_name" : "newstream",
+ "app_name" : "newapp",
+ "partition_consuming_states" : [ {
+ "partition_id" : "2",
+ "sequence_number" : "485",
+ "latest_offset" : "1000",
+ "earliest_offset" : "10",
+ "checkpoint_type" : "LAST_READ"
+ } ]
+}
+Status Code + |
+Description + |
+
|---|---|
200 + |
+Normal response. + |
+
See Error Codes.
+This API is used to query the monitoring data of a specified partition of a stream.
+GET /v2/{project_id}/streams/{stream_name}/partitions/{partition_id}/metrics
+ +Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
|---|---|---|---|
project_id + |
+Yes + |
+String + |
+Project ID. + |
+
stream_name + |
+Yes + |
+String + |
+Name of the stream. +Maximum: 60 + |
+
partition_id + |
+Yes + |
+String + |
+Partition No. The value can be in either of the following formats: +
For example, if a stream has three partitions, the partition identifiers are 0, 1, and 2, or shardId-0000000000, shardId-0000000001, and shardId-0000000002, respectively. + |
+
Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
|---|---|---|---|
label + |
+No + |
+String + |
+Partition monitoring metric. (Either label or label_list must be specified. If both label_list and label are specified, label_list prevails.) +
Enumeration values: +
|
+
label_list + |
+No + |
+String + |
+List of labels separated by commas (,) to query multiple labels in batches. (Either label or label_list must be specified. If both label_list and label exist, label_list prevails.) + |
+
start_time + |
+Yes + |
+Long + |
+Monitoring start time, which is a 10-digit timestamp. + |
+
end_time + |
+Yes + |
+String + |
+Monitoring end time, which is a 10-digit timestamp. + |
+
Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
|---|---|---|---|
X-Auth-Token + |
+Yes + |
+String + |
+User token. +The token can be obtained by calling the IAM API (value of X-Subject-Token in the response header). + |
+
Status code: 200
+ +Parameter + |
+Type + |
+Description + |
+
|---|---|---|
metrics + |
+Metrics object + |
+Data object. + |
+
Parameter + |
+Type + |
+Description + |
+
|---|---|---|
dataPoints + |
+Array of DataPoint objects + |
+Monitoring data. + |
+
label + |
+String + |
+Metric. + |
+
Querying Partition Monitoring Data
+GET https://{Endpoint}/v2/{project_id}/streams/{stream_name}/partitions/{partition_id}/metrics
+None
+Status Code + |
+Description + |
+
|---|---|
200 + |
+Normal response. + |
+
See Error Codes.
+This API is used to query the monitoring data of specified streams.
+GET /v2/{project_id}/streams/{stream_name}/metrics
+ +Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
|---|---|---|---|
project_id + |
+Yes + |
+String + |
+Project ID. + |
+
stream_name + |
+Yes + |
+String + |
+Name of the stream. +Maximum: 60 + |
+
Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
|---|---|---|---|
label + |
+No + |
+String + |
+Stream monitoring metric. (Either label or label_list must be specified. If both label_list and label are specified, label_list prevails.) +
Enumeration values: +
|
+
label_list + |
+No + |
+String + |
+List of labels separated by commas (,) to query multiple labels in batches. (Either label or label_list must be set. If both label_list and label exist, label_list prevails.) + |
+
start_time + |
+Yes + |
+Long + |
+Monitoring start time, which is a 10-digit timestamp. + |
+
end_time + |
+Yes + |
+Long + |
+Monitoring end time, which is a 10-digit timestamp. + |
+
Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
|---|---|---|---|
X-Auth-Token + |
+Yes + |
+String + |
+User token. +The token can be obtained by calling the IAM API (value of X-Subject-Token in the response header). + |
+
Status code: 200
+ +Parameter + |
+Type + |
+Description + |
+
|---|---|---|
metrics + |
+Metrics object + |
+Data object. + |
+
metrics_list + |
+Array of Metrics objects + |
+List of monitored data objects. + |
+
Parameter + |
+Type + |
+Description + |
+
|---|---|---|
dataPoints + |
+Array of DataPoint objects + |
+Monitoring data. + |
+
label + |
+String + |
+Metric. + |
+
Querying Stream Monitoring Data
+GET https://{Endpoint}/v2/{project_id}/streams/{stream_name}/metrics
+None
+Status Code + |
+Description + |
+
|---|---|
200 + |
+Normal response. + |
+
See Error Codes.
+This API is used to query tags of specified streams.
+GET /v2/{project_id}/stream/{stream_id}/tags
+ +Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
|---|---|---|---|
project_id + |
+Yes + |
+String + |
+Project ID. + |
+
stream_id + |
+Yes + |
+String + |
+Stream ID. + |
+
Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
|---|---|---|---|
X-Auth-Token + |
+Yes + |
+String + |
+User token. +The token can be obtained by calling the IAM API (value of X-Subject-Token in the response header). + |
+
Status code: 200
+ +Parameter + |
+Type + |
+Description + |
+
|---|---|---|
tags + |
+Array of Tag objects + |
+Label list. + |
+
Parameter + |
+Type + |
+Description + |
+
|---|---|---|
key + |
+String + |
+Key. +
Minimum: 1 +Maximum: 36 + |
+
value + |
+String + |
+Value. +
Minimum: 0 +Maximum: 43 + |
+
This API is used to query tags of specified streams.
+GET https://{Endpoint}/v2/{project_id}/stream/{stream_id}/tags
+Status code: 200
+Response body of the stream tag information.
+{
+ "tags" : [ {
+ "key" : "key1",
+ "value" : "value1"
+ }, {
+ "key" : "key2",
+ "value" : "value3"
+ } ]
+}
+Status Code + |
+Description + |
+
|---|---|
200 + |
+Response body of the stream tag information. + |
+
See Error Codes.
+This API is used to query dump task details.
+GET /v2/{project_id}/streams/{stream_name}/transfer-tasks/{task_name}
+ +Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
|---|---|---|---|
project_id + |
+Yes + |
+String + |
+Project ID. + |
+
stream_name + |
+Yes + |
+String + |
+Name of the stream. + |
+
task_name + |
+Yes + |
+String + |
+Name of the dump task to be deleted. + |
+
Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
|---|---|---|---|
X-Auth-Token + |
+Yes + |
+String + |
+User token. +The token can be obtained by calling the IAM API (value of X-Subject-Token in the response header). + |
+
Status code: 200
+ +Parameter + |
+Type + |
+Description + |
+
|---|---|---|
stream_name + |
+String + |
+Name of the stream to which the dump task belongs. + |
+
task_name + |
+String + |
+Name of the dump task. + |
+
state + |
+String + |
+Dump task status. Possible values: +
Enumeration values: +
|
+
destination_type + |
+String + |
+Dump destination. Possible values: +
Enumeration values: +
|
+
create_time + |
+Long + |
+Time when the dump task is created. + |
+
last_transfer_timestamp + |
+Long + |
+Latest dump time of the dump task. + |
+
partitions + |
+Array of PartitionResult objects + |
+List of partition dump details. + |
+
obs_destination_description + |
++ | +Parameter list of OBS to which data in the DIS stream will be dumped. + |
+
dws_destination_descripton + |
++ | +Parameter list of the DWS to which data in the DIS stream will be dumped. + |
+
mrs_destination_description + |
++ | +Parameter list of the MRS to which data in the DIS stream will be dumped. + |
+
dli_destination_description + |
++ | +Parameter list of the DLI to which data in the DIS stream will be dumped. + |
+
cloudtable_destination_descripton + |
++ | +Parameter list of the CloudTable to which data in the DIS stream will be dumped. + |
+
Parameter + |
+Type + |
+Description + |
+
|---|---|---|
status + |
+String + |
+Current status of the partition. Possible values: +
Enumeration values: +
|
+
partition_id + |
+String + |
+Unique identifier of the partition. + |
+
hash_range + |
+String + |
+Possible value range of the hash key used by the partition. + |
+
sequence_number_range + |
+String + |
+Sequence number range of the partition. + |
+
parent_partitions + |
+String + |
+Parent partition. + |
+
Parameter + |
+Type + |
+Description + |
+
|---|---|---|
task_name + |
+String + |
+Name of the dump task. The task name consists of letters, digits, hyphens (-), and underscores (_). It must be a string of 1 to 64 characters. + |
+
agency_name + |
+String + |
+Name of the agency created on IAM. DIS uses an agency to access your specified resources. The parameters for creating an agency are as follows: +
If agencies have been created, you can obtain available agencies from the agency list by using the "Listing Agencies " API. +This parameter cannot be left blank and the parameter value cannot exceed 64 characters. +If there are dump tasks on the console, the system displays a message indicating that an agency will be automatically created. The name of the automatically created agency is dis_admin_agency. +Maximum: 64 + |
+
deliver_time_interval + |
+Integer + |
+User-defined interval at which data is imported from the current DIS stream into OBS. If no data is pushed to the DIS stream during the current interval, no dump file package will be generated. +Value range: 30-900 +Default value: 300 +Unit: second +Minimum: 30 +Maximum: 900 +Default: 300 + |
+
consumer_strategy + |
+String + |
+Offset. +
Default value: LATEST +Default: LATEST +Enumeration values: +
|
+
file_prefix + |
+String + |
+Directory to store files that will be dumped to OBS. Different directory levels are separated by slashes (/) and cannot start with slashes. +The value can contain a maximum of 50 characters, including letters, digits, underscores (_), and slashes (/). +This parameter is left empty by default. +Maximum: 50 + |
+
partition_format + |
+String + |
+Directory structure of the object file written into OBS. The directory structure is in the format of yyyy/MM/dd/HH/mm (time at which the dump task was created). +
Example: in 2017/11/10/14/49, the directory structure is 2017 > 11 > 10 > 14 > 49. 2017 indicates the outermost folder. +Default value: empty. +Note: +After data is successfully dumped, the directory structure is obs_bucket_path/file_prefix/partition_format. +Enumeration values: +
|
+
obs_bucket_path + |
+String + |
+Name of the OBS bucket used to store data from the DIS stream. + |
+
destination_file_type + |
+String + |
+Dump file format. Possible values: +
Note: +You can select Parquet or CarbonData only when Source Data Type is set to JSON and Dump Destination is set to OBS. +Default: text +Enumeration values: +
|
+
processing_schema + |
+ProcessingSchema object + |
+Dump time directory generated based on the timestamp of the source data and the configured partition_format. Directory structure of the object file written into OBS. The directory structure is in the format of yyyy/MM/dd/HH/mm. + |
+
record_delimiter + |
+String + |
+Delimiter for the dump file, which is used to separate the user data that is written into the dump file. +Value range: +
Default: \n + |
+
Parameter + |
+Type + |
+Description + |
+
|---|---|---|
timestamp_name + |
+String + |
+Attribute name of the source data timestamp. + |
+
timestamp_type + |
+String + |
+Type of the source data timestamp. +
|
+
timestamp_format + |
+String + |
+OBS directory generated based on the timestamp format. This parameter is mandatory when the timestamp type of the source data is String. +Value range: +
Enumeration values: +
|
+
Parameter + |
+Type + |
+Description + |
+
|---|---|---|
task_name + |
+String + |
+Name of the dump task. The task name consists of letters, digits, hyphens (-), and underscores (_). It must be a string of 1 to 64 characters. + |
+
agency_name + |
+String + |
+Name of the agency created on IAM. DIS uses an agency to access your specified resources. The parameters for creating an agency are as follows: +
If agencies have been created, you can obtain available agencies from the agency list by using the "Listing Agencies " API. +This parameter cannot be left blank and the parameter value cannot exceed 64 characters. +If there are dump tasks on the console, the system displays a message indicating that an agency will be automatically created. The name of the automatically created agency is dis_admin_agency. +Maximum: 64 + |
+
deliver_time_interval + |
+Integer + |
+User-defined interval at which data is imported from the current DIS stream into OBS. If no data is pushed to the DIS stream during the current interval, no dump file package will be generated. +Value range: 30-900 +Default value: 300 +Unit: second +Minimum: 30 +Maximum: 900 +Default: 300 + |
+
consumer_strategy + |
+String + |
+Offset. +
Default value: LATEST +Default: LATEST +Enumeration values: +
|
+
dws_cluster_name + |
+String + |
+Name of the DWS cluster that stores the data in the stream. + |
+
dws_cluster_id + |
+String + |
+ID of the DWS cluster to which will be dumped. + |
+
dws_database_name + |
+String + |
+Name of the DWS database that stores the data in the stream. + |
+
dws_schema + |
+String + |
+Schema of the DWS database to which data will be dumped. + |
+
dws_table_name + |
+String + |
+Name of the DWS table that stores the data in the stream. + |
+
dws_delimiter + |
+String + |
+Delimiter used to separate the columns in the DWS tables. +The value can be a comma (,), semicolon (;), or vertical bar (|). + |
+
user_name + |
+String + |
+Username of the DWS database to which data will be dumped. + |
+
user_password + |
+String + |
+Password of the DWS database to which data will be dumped. + |
+
kms_user_key_name + |
+String + |
+Key created in Key Management Service (KMS) and used to encrypt the password of the DWS database. + |
+
kms_user_key_id + |
+String + |
+ID of the key created in KMS and used to encrypt the password of the DWS database. + |
+
obs_bucket_path + |
+String + |
+Name of the OBS bucket used to temporarily store data in the DIS stream. + |
+
file_prefix + |
+String + |
+Self-defined directory created in the OBS bucket and used to temporarily store data in the DIS stream. Directory levels are separated by slashes (/) and cannot start with slashes. +The value can contain a maximum of 50 characters, including letters, digits, underscores (_), and slashes (/). +This parameter is left empty by default. + |
+
retry_duration + |
+String + |
+Duration when you can constantly retry dumping data to DWS after the dump fails. If the dump time exceeds the value of this parameter, the data that fails to be dumped to DWS will be backed up to the OBS bucket/file_prefix/dws_error directory. +Value range: 0-7,200 +Unit: second +Default value: 1,800 + |
+
dws_table_columns + |
+String + |
+Column to be dumped to the DWS table. If the value is null or empty, all columns are dumped by default. For example, c1,c2 indicates that columns c1 and c2 in the schema are dumped to DWS. +This parameter is left blank by default. + |
+
options + |
+Options object + |
+DWS fault tolerance option (used to specify various parameters of foreign table data). + |
+
Parameter + |
+Type + |
+Description + |
+
|---|---|---|
fill_missing_fields + |
+String + |
+Specifies whether to set the field to Null or enable an error message to be displayed in the error table when the last field in a row of the data source file is missing during database import. +Value range: +
Default value: false/off +Enumeration values: +
|
+
ignore_extra_data + |
+String + |
+Specifies whether to ignore excessive columns when the number of columns in a source data file exceeds that defined in the foreign table. This parameter is used only during data import. +Value range: +
Default value: false/off +Enumeration values: +
|
+
compatible_illegal_chars + |
+String + |
+Specifies whether to tolerate invalid characters during data import. Specifies whether to convert invalid characters based on the conversion rule and import them to the database, or to report an error and stop the import. +Value range: +
Default value: false/off +Enumeration values: +
|
+
reject_limit + |
+String + |
+Maximum number of data format errors allowed during the data import. If the number of data format errors does not reach the maximum, the data import is successful. +Value range: +
Default value: 0, indicating that error information is returned immediately + |
+
error_table_name + |
+String + |
+Name of the error table that records data format errors. After the parallel import is complete, you can query the error information table to obtain the detailed error information. + |
+
Parameter + |
+Type + |
+Description + |
+
|---|---|---|
task_name + |
+String + |
+Name of the dump task. The task name consists of letters, digits, hyphens (-), and underscores (_). It must be a string of 1 to 64 characters. + |
+
agency_name + |
+String + |
+Name of the agency created on IAM. DIS uses an agency to access your specified resources. The parameters for creating an agency are as follows: +
If agencies have been created, you can obtain available agencies from the agency list by using the "Listing Agencies " API. +This parameter cannot be left blank and the parameter value cannot exceed 64 characters. +If there are dump tasks on the console, the system displays a message indicating that an agency will be automatically created. The name of the automatically created agency is dis_admin_agency. +Maximum: 64 + |
+
deliver_time_interval + |
+Integer + |
+User-defined interval at which data is imported from the current DIS stream into OBS. If no data is pushed to the DIS stream during the current interval, no dump file package will be generated. +Value range: 30-900 +Default value: 300 +Unit: second +Minimum: 30 +Maximum: 900 +Default: 300 + |
+
consumer_strategy + |
+String + |
+Offset. +
Default value: LATEST +Default: LATEST +Enumeration values: +
|
+
mrs_cluster_name + |
+String + |
+Name of the MRS cluster to which data in the DIS stream will be dumped. +Note: +Only MRS clusters with non-Kerberos authentication are supported. + |
+
mrs_cluster_id + |
+String + |
+ID of the MRS cluster to which data in the DIS stream will be dumped. + |
+
mrs_hdfs_path + |
+String + |
+Hadoop Distributed File System (HDFS) path of the MRS cluster to which data in the DIS stream will be dumped. + |
+
file_prefix + |
+String + |
+Self-defined directory created in the OBS bucket and used to temporarily store data in the DIS stream. Directory levels are separated by slashes (/) and cannot start with slashes. +The value can contain a maximum of 50 characters, including letters, digits, underscores (_), and slashes (/). +This parameter is left empty by default. + |
+
hdfs_prefix_folder + |
+String + |
+Directory to store files that will be dumped to the chosen MRS cluster. Different directory levels are separated by slash (/). Value range: a string of 0 to 50 characters This parameter is left empty by default. + |
+
obs_bucket_path + |
+String + |
+Name of the OBS bucket used to temporarily store data in the DIS stream. + |
+
retry_duration + |
+String + |
+Time duration for DIS to retry if data fails to be dumped. If the retry time exceeds the value of this parameter, the data that fails to be dumped is backed up to the OBS bucket/file_prefix/mrs_error directory. +Value range: 0-7,200 +Unit: second +Default value: 1,800 +If this parameter is set to 0, DIS does not retry when the dump fails. + |
+
Parameter + |
+Type + |
+Description + |
+
|---|---|---|
task_name + |
+String + |
+Name of the dump task. The task name consists of letters, digits, hyphens (-), and underscores (_). It must be a string of 1 to 64 characters. + |
+
agency_name + |
+String + |
+Name of the agency created on IAM. DIS uses an agency to access your specified resources. The parameters for creating an agency are as follows: +
If agencies have been created, you can obtain available agencies from the agency list by using the "Listing Agencies " API. +This parameter cannot be left blank and the parameter value cannot exceed 64 characters. +If there are dump tasks on the console, the system displays a message indicating that an agency will be automatically created. The name of the automatically created agency is dis_admin_agency. +Maximum: 64 + |
+
deliver_time_interval + |
+Integer + |
+User-defined interval at which data is imported from the current DIS stream into OBS. If no data is pushed to the DIS stream during the current interval, no dump file package will be generated. +Value range: 30-900 +Default value: 300 +Unit: second +Minimum: 30 +Maximum: 900 +Default: 300 + |
+
consumer_strategy + |
+String + |
+Offset. +
Default value: LATEST +Default: LATEST +Enumeration values: +
|
+
dli_database_name + |
+String + |
+Name of the DLI database to which data in the DIS stream will be dumped. + |
+
dli_table_name + |
+String + |
+Name of the DLI table to which data in the DIS stream will be dumped. +Note: +Only tables whose data location is DLI are supported, and you must have the permission to insert data into the tables. + |
+
obs_bucket_path + |
+String + |
+Name of the OBS bucket used to temporarily store data in the DIS stream. + |
+
file_prefix + |
+String + |
+Self-defined directory created in the OBS bucket and used to temporarily store data in the DIS stream. Directory levels are separated by slashes (/) and cannot start with slashes. +The value can contain a maximum of 50 characters, including letters, digits, underscores (_), and slashes (/). +This parameter is left empty by default. + |
+
retry_duration + |
+String + |
+Time duration for DIS to retry if data fails to be dumped to DLI. If the retry time exceeds the value of this parameter, the data that fails to be dumped is backed up to the OBS bucket/file_prefix/dli_error directory. Value range: 0-7,200 Unit: second Default value: 1,800 If this parameter is set to 0, DIS does not retry when the dump fails. + |
+
Parameter + |
+Type + |
+Description + |
+
|---|---|---|
task_name + |
+String + |
+Name of the dump task. The task name consists of letters, digits, hyphens (-), and underscores (_). It must be a string of 1 to 64 characters. + |
+
agency_name + |
+String + |
+Name of the agency created on IAM. DIS uses an agency to access your specified resources. The parameters for creating an agency are as follows: +
If agencies have been created, you can obtain available agencies from the agency list by using the "Listing Agencies " API. +This parameter cannot be left blank and the parameter value cannot exceed 64 characters. +If there are dump tasks on the console, the system displays a message indicating that an agency will be automatically created. The name of the automatically created agency is dis_admin_agency. +Maximum: 64 + |
+
deliver_time_interval + |
+Integer + |
+User-defined interval at which data is imported from the current DIS stream into OBS. If no data is pushed to the DIS stream during the current interval, no dump file package will be generated. +Value range: 30-900 +Default value: 300 +Unit: second +Minimum: 30 +Maximum: 900 +Default: 300 + |
+
consumer_strategy + |
+String + |
+Offset. +
Default value: LATEST +Default: LATEST +Enumeration values: +
|
+
cloudtable_cluster_name + |
+String + |
+Name of the CloudTable cluster to which data will be dumped. +If you choose to dump data to OpenTSDB, OpenTSDB must be enabled for the cluster. + |
+
cloudtable_cluster_id + |
+String + |
+ID of the CloudTable cluster to which data will be dumped. +If you choose to dump data to OpenTSDB, OpenTSDB must be enabled for the cluster. + |
+
cloudtable_table_name + |
+String + |
+HBase table name of the CloudTable cluster to which data will be dumped. The parameter is mandatory when data is dumped to the CloudTable HBase. + |
+
cloudtable_schema + |
+CloudtableSchema object + |
+Schema configuration of the CloudTable HBase data. You can set either this parameter or opentsdb_schema, but this parameter is mandatory when data will be dumped to HBase. After this parameter is set, the JSON data in the stream can be converted to another format and then be imported to the CloudTable HBase. + |
+
opentsdb_schema + |
+Array of OpenTSDBSchema objects + |
+Schema configuration of the CloudTable OpenTSDB data. You can set either this parameter or opentsdb_schema, but this parameter is mandatory when data will be dumped to OpenTSDB. After this parameter is set, the JSON data in the stream can be converted to another format and then be imported to the CloudTable OpenTSDB. + |
+
cloudtable_row_key_delimiter + |
+String + |
+Delimiter used to separate the user data that generates HBase row keys. Value range: , . | ; \ - _ and ~ +Default value: . + |
+
obs_backup_bucket_path + |
+String + |
+Name of the OBS bucket used to back up data that failed to be dumped to CloudTable. + |
+
backup_file_prefix + |
+String + |
+Self-defined directory created in the OBS bucket and used to back up data that failed to be dumped to CloudTable. Directory levels are separated by slashes (/) and cannot start with slashes. +Value range: a string of letters, digits, and underscores (_) +The maximum length is 50 characters. +This parameter is left empty by default. + |
+
retry_duration + |
+String + |
+Time duration for DIS to retry if data fails to be dumped to CloudTable. If this threshold is exceeded, the data that fails to be dumped will be backed up to the OBS bucket/backup_file_prefix /cloudtable_error or OBS bucket/backup_file_prefix/opentsdb_error directory. +Value range: 0-7,200 +Unit: second +Default value: 1,800 + |
+
Parameter + |
+Type + |
+Description + |
+
|---|---|---|
row_key + |
+Array of RowKey objects + |
+HBase rowkey schema used by the CloudTable cluster to convert JSON data into HBase rowkeys. +Value range: 1-64 + |
+
columns + |
+Array of Column objects + |
+HBase column schema used by the CloudTable cluster to convert JSON data into HBase columns. +Value range: 1 to 4,096 + |
+
Parameter + |
+Type + |
+Description + |
+
|---|---|---|
value + |
+String + |
+JSON attribute name, which is used to generate HBase rowkeys for JSON data in the DIS stream. + |
+
type + |
+String + |
+JSON attribute type of JSON data in the DIS stream. Value range: +
Enumeration values: +
|
+
Parameter + |
+Type + |
+Description + |
+
|---|---|---|
column_family_name + |
+String + |
+Name of the HBase column family to which data will be dumped. + |
+
column_name + |
+String + |
+Name of the HBase column to which data will be dumped. +Value range: a string of 1 to 32 characters, consisting of only letters, digits, and underscores (_) + |
+
value + |
+String + |
+JSON attribute name, which is used to generate HBase column values for JSON data in the DIS stream. + |
+
type + |
+String + |
+JSON attribute type of JSON data in the DIS stream. +Value range: +
Enumeration values: +
|
+
Parameter + |
+Type + |
+Description + |
+
|---|---|---|
metric + |
+Array of OpenTSDBMetric objects + |
+Schema configuration of the OpenTSDB data metric in the CloudTable cluster. After this parameter is set, the JSON data in the stream can be converted to the metric of the OpenTSDB data. + |
+
timestamp + |
+OpenTSDBTimestamp object + |
+Schema configuration of the OpenTSDB data timestamp in the CloudTable cluster. After this parameter is set, the JSON data in the stream can be converted to the timestamp of the OpenTSDB data. + |
+
value + |
+OpenTSDBValue object + |
+Schema configuration of the OpenTSDB data value in the CloudTable cluster. After this parameter is set, the JSON data in the stream can be converted to the value of the OpenTSDB data. + |
+
tags + |
+Array of OpenTSDBTags objects + |
+Schema configuration of the OpenTSDB data tags in the CloudTable cluster. After this parameter is set, the JSON data in the stream can be converted to the tags of the OpenTSDB data. + |
+
Parameter + |
+Type + |
+Description + |
+
|---|---|---|
type + |
+String + |
+
Enumeration values: +
|
+
value + |
+String + |
+Constant value or JSON attribute name of the user data in the stream. This value is 1 to 32 characters long. Only letters, digits, and periods (.) are allowed. + |
+
Parameter + |
+Type + |
+Description + |
+
|---|---|---|
type + |
+String + |
+
|
+
value + |
+String + |
+JSON attribute name of the user data in the stream. Value range: a string of 1 to 32 characters, consisting of only letters, digits, and underscores (_) + |
+
format + |
+String + |
+This parameter is mandatory when type is set to String. When the value type of the JSON attribute of the user data in the stream is Date, format is required to convert the data format to generate the timestamp of OpenTSDB. +Value range: +
Enumeration values: +
|
+
Parameter + |
+Type + |
+Description + |
+
|---|---|---|
type + |
+String + |
+Dump destination. Possible values: Value range: +
|
+
value + |
+String + |
+Constant value or JSON attribute name of the user data in the stream. Value range: a string of 1 to 32 characters, consisting of only letters, digits, and underscores (_) + |
+
Parameter + |
+Type + |
+Description + |
+
|---|---|---|
name + |
+String + |
+Tag name of the OpenTSDB data that stores the data in the stream. Value range: a string of 1 to 32 characters, consisting of only letters, digits, and underscores (_) + |
+
type + |
+String + |
+Type name of the JSON attribute of the user data in the stream. +Value range: +
|
+
value + |
+String + |
+Constant value or JSON attribute name of the user data in the stream. Value range: a string of 1 to 32 characters, consisting of only letters, digits, and underscores (_) + |
+
Querying Dump Task Details
+GET https://{Endpoint}/v2/{project_id}/streams/{stream_name}/transfer-tasks/{task_name}
+Status code: 200
+Normal response.
+{
+ "stream_id" : "RdMFID6edQdf8eDzc9e",
+ "stream_name" : "newstream",
+ "task_name" : "newtask",
+ "task_id" : "As805BudhcH1lDs6gbn",
+ "destination_type" : "OBS",
+ "state" : "RUNNING",
+ "create_time" : 1606554932552,
+ "last_transfer_timestamp" : 1606984428612,
+ "obs_destination_description" : {
+ "agency_name" : "dis_admin_agency",
+ "file_prefix\"" : "",
+ "partition_format" : "yyyy/MM/dd",
+ "obs_bucket_path" : "obsbucket",
+ "deliver_time_interval" : 60,
+ "consumer_strategy" : "LATEST",
+ "retry_duration" : 0,
+ "destination_file_type" : "text",
+ "record_delimiter" : "\n"
+ },
+ "partitions" : [ {
+ "partitionId" : "shardId-0000000000",
+ "discard" : 0,
+ "state" : "RUNNING",
+ "last_transfer_timestamp" : 1606984428612,
+ "last_transfer_offset" : 289897
+ } ]
+}
+Status Code + |
+Description + |
+
|---|---|
200 + |
+Normal response. + |
+
See Error Codes.
+This API is used to change the number of partitions in a specific stream.
+PUT /v2/{project_id}/streams/{stream_name}
+ +Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
|---|---|---|---|
project_id + |
+Yes + |
+String + |
+Project ID. + |
+
stream_name + |
+Yes + |
+String + |
+Name of the stream whose partition quantity needs to be changed. +Maximum: 64 + |
+
Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
|---|---|---|---|
X-Auth-Token + |
+Yes + |
+String + |
+User token. +The token can be obtained by calling the IAM API (value of X-Subject-Token in the response header). + |
+
Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
|---|---|---|---|
stream_name + |
+Yes + |
+String + |
+Name of the stream whose partition quantity needs to be changed. +Maximum: 64 + |
+
target_partition_count + |
+Yes + |
+Integer + |
+Number of the target partitions. +The value is an integer greater than 0. +If the value is greater than the number of current partitions, scaling-up is required. If the value is less than the number of current partitions, scale-down is required. +Note: A maximum of five scale-up/down operations can be performed for each stream within one hour. If a scale-up/down operation is successfully performed, you cannot perform one more scale-up/down operation within the next one hour. +Minimum: 0 + |
+
None
+Changing Partition Quantity
+PUT https://{Endpoint}/v2/{project_id}/streams/{stream_name}
+
+{
+ "stream_name" : "newstream",
+ "target_partition_count" : 5
+}
+None
+Status Code + |
+Description + |
+
|---|---|
200 + |
+Normal response. + |
+
See Error Codes.
+This API is used to update the information about specified streams.
+PUT /v3/{project_id}/streams/{stream_name}
+ +Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
|---|---|---|---|
project_id + |
+Yes + |
+String + |
+Project ID. + |
+
stream_name + |
+Yes + |
+String + |
+Name of the stream whose partition quantity needs to be changed. + |
+
Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
|---|---|---|---|
stream_name + |
+Yes + |
+String + |
+Name of the stream to be updated. +Maximum: 64 + |
+
data_duration + |
+No + |
+Integer + |
+Period of time for which data is retained in the stream. Value range: 24-72 Unit: hour Default value: 24 If this parameter is left blank, the default value is used. +Maximum: 168 +Default: 24 + |
+
data_type + |
+No + |
+String + |
+Source data type. +
Default value: BLOB +Enumeration values: +
|
+
data_schema + |
+No + |
+String + |
+Source data structure that defines JSON and CSV formats. It is described in the syntax of the Avro schema. + |
+
auto_scale_enabled + |
+No + |
+Boolean + |
+Specifies whether to enable auto scaling. +
Default: false +Enumeration values: +
|
+
auto_scale_min_partition_count + |
+No + |
+Long + |
+Minimum number of partitions for automatic scale-down when auto scaling is enabled. +Minimum: 1 + |
+
auto_scale_max_partition_count + |
+No + |
+Long + |
+Maximum number of partitions for automatic scale-up when auto scaling is enabled. + |
+
None
+Updating Lifecycles of Streams
+PUT https://{Endpoint}/v3/{project_id}/streams/{stream_name}
+
+{
+ "stream_name" : "stz_test",
+ "data_duration" : 48
+}
+Updating Stream Types
+PUT https://{Endpoint}/v3/{project_id}/streams/{stream_name}
+
+{
+ "stream_name" : "stz_test",
+ "data_type" : "JSON"
+}
+None
+Status Code + |
+Description + |
+
|---|---|
204 + |
+Normal response. + |
+
See Error Codes.
+DIS provides efficient collection, transmission, and distribution capabilities for real-time data and provides a variety of APIs to help you quickly build real-time data applications.
+
The token obtained on IAM is valid for only 24 hours. If you want to use one token for authentication, you can cache it to avoid frequent calling.
+If you use a token for authentication, you must obtain the token and add X-Auth-Token to the request header of the API request.
+You have planned the region where DIS is located and determined the endpoint for calling an API based on the region.
+An endpoint is the request address for calling an API. Endpoints vary depending on services and regions. You can obtain endpoints from Regions and Endpoints.
+The following is an example of creating a stream with the simplest configuration.
+{
+"stream_name": "dis-DLpR",
+"partition_count": 1,
+"stream_type": "COMMON",
+"data_duration": 24
+}
+If the request is successful, 201 Created is returned.
+If the request fails, an error code and error information are returned. For details, see Error Codes.
+You can also create a stream that supports auto scaling. The number of partitions can be automatically increased or decreased based on the stream traffic. The following is an example configuration:
+{
+"stream_name": "dis-DLpR",
+"partition_count": 1,
+"stream_type": "COMMON",
+"data_duration": 24
+"auto_scale_enabled": true,
+"auto_scale_min_partition_count": 2,
+"auto_scale_max_partition_count": 10
+}
+In this example, a stream that supports auto scaling is created. The number of partitions to scale ranges from 2 to 10. If the stream has 10 partitions, auto scaling-out will not be triggered.
+If the request is successful, 201 Created is returned.
+If the request fails, an error code and error information are returned. For details, see Error Codes.
+You can also configure a schema for the stream. When using DIS to dump data to other services, you can map data based on the schema configured for the stream. The following is an example configuration:
+{
+"stream_name": "dis-DLpR",
+"partition_count": 1,
+"stream_type": "COMMON",
+"data_duration": 24
+"auto_scale_enabled": true,
+"auto_scale_min_partition_count": 1,
+"auto_scale_max_partition_count": 10
+"data_type": "JSON",
+"data_schema":
+"{\"type\":\"record\",\"name\":\"RecordName\",\"fields\":[{\"name\":\"key1\",\"type\":\"string\"},{\"name\":\"key2\",\"type\":\"string\"}]}"
+}
+In this example, a stream whose source data type is JSON and that contains the key1 and key2 attributes is created.
+If the request is successful, 201 Created is returned.
+If the request fails, an error code and error information are returned. For details, see Error Codes.
+This API is used to create a stream.
+When creating a stream, specify a stream type (common or advanced) and the number of partitions.
+By default, an account can create a maximum of 10 advanced stream partitions and 50 common stream partitions. You can submit a service ticket to increase the quota.
+POST /v2/{project_id}/streams
+ +Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
|---|---|---|---|
project_id + |
+Yes + |
+String + |
+Project ID. + |
+
Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
|---|---|---|---|
X-Auth-Token + |
+Yes + |
+String + |
+User token. +The token can be obtained by calling the IAM API (value of X-Subject-Token in the response header). + |
+
Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
|---|---|---|---|
stream_name + |
+Yes + |
+String + |
+Name of the stream. +The stream name can contain 1 to 64 characters, including letters, digits, underscores (_), and hyphens (-). +Maximum: 64 + |
+
partition_count + |
+Yes + |
+Integer + |
+Number of partitions. Partitions are the base throughput unit of a DIS stream. + |
+
stream_type + |
+No + |
+String + |
+Stream type. +
Enumeration values: +
|
+
data_type + |
+No + |
+String + |
+Source data type. +
Default value: BLOB +Enumeration values: +
|
+
data_duration + |
+No + |
+Integer + |
+Period of time for which data is retained in the stream. Value range: 24-72 Unit: hour Default value: 24 If this parameter is left blank, the default value is used. +Maximum: 168 +Default: 24 + |
+
auto_scale_enabled + |
+No + |
+Boolean + |
+Specifies whether to enable auto scaling. +
This function is disabled by default. +Default: false + |
+
auto_scale_min_partition_count + |
+No + |
+Long + |
+Minimum number of partitions for automatic scale-down when auto scaling is enabled. +Minimum: 1 + |
+
auto_scale_max_partition_count + |
+No + |
+Integer + |
+Maximum number of partitions for automatic scale-up when auto scaling is enabled. + |
+
data_schema + |
+No + |
+String + |
+Source data structure that defines JSON and CSV formats. It is described in the syntax of the Avro schema. + |
+
csv_properties + |
+No + |
+CSVProperties object + |
+Attributes of data in CSV format, such as delimiter. + |
+
compression_format + |
+No + |
+String + |
+Compression type of data. Currently, the value can be: +
Data is not compressed by default. +Enumeration values: +
|
+
tags + |
+No + |
+Array of Tag objects + |
+List of stream tags. + |
+
sys_tags + |
+No + |
+Array of SysTag objects + |
+Stream enterprise projects. + |
+
Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
|---|---|---|---|
delimiter + |
+No + |
+String + |
+Data separator. + |
+
Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
|---|---|---|---|
key + |
+No + |
+String + |
+Key. +
Minimum: 1 +Maximum: 36 + |
+
value + |
+No + |
+String + |
+Value. +
Minimum: 0 +Maximum: 43 + |
+
Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
|---|---|---|---|
key + |
+No + |
+String + |
+Key. +
Enumeration values: +
|
+
value + |
+No + |
+String + |
+Value. The value is the enterprise project ID, which needs to be obtained on the enterprise management page. +
|
+
None
+Creating Streams
+POST https://{Endpoint}/v2/{project_id}/streams
+
+{
+ "stream_name" : "newstream",
+ "partition_count" : 3,
+ "data_duration" : 24
+}
+None
+Status Code + |
+Description + |
+
|---|---|
201 + |
+Created + |
+
See Error Codes.
+This API is used to upload data to DIS streams.
+POST /v2/{project_id}/records
+ +Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
|---|---|---|---|
project_id + |
+Yes + |
+String + |
+Project ID. + |
+
Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
|---|---|---|---|
X-Auth-Token + |
+Yes + |
+String + |
+User token. +The token can be obtained by calling the IAM API (value of X-Subject-Token in the response header). + |
+
Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
|---|---|---|---|
stream_name + |
+Yes + |
+String + |
+Name of the stream. +Maximum: 60 + |
+
stream_id + |
+No + |
+String + |
+Unique ID of the stream. +If no stream is found by stream_name and stream_id is not empty, stream_id is used to search for the stream. +Note: +This parameter is mandatory when data is uploaded to the authorized stream. + |
+
records + |
+Yes + |
+Array of PutRecordsRequestEntry objects + |
+List of records to be uploaded. + |
+
Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
|---|---|---|---|
data + |
+Yes + |
+String + |
+Data to be uploaded. The uploaded data is the serialized binary data (character string encoded using Base64). For example, if the character string data needs to be uploaded, the character string after Base64 encoding is ZGF0YQ==. + |
+
explicit_hash_key + |
+No + |
+String + |
+Hash value of the data to be written to the partition. The hash value overwrites the hash value of partition_key. Value range: 0–long.max + |
+
partition_id + |
+No + |
+String + |
+Partition ID of the stream. The value can be in either of the following formats: +
For example, if a stream has three partitions, the partition identifiers are 0, 1, and 2, or shardId-0000000000, shardId-0000000001, and shardId-0000000002, respectively. + |
+
partition_key + |
+No + |
+String + |
+Partition to which data is written to. Note: +If the partition_id parameter is transferred, the partition_id parameter is used preferentially. If partition_id is not transferred, partition_key is used. + |
+
Status code: 200
+ +Parameter + |
+Type + |
+Description + |
+
|---|---|---|
failed_record_count + |
+Integer + |
+Number of data records that fail to be uploaded. + |
+
records + |
+Array of PutRecordsResultEntry objects + |
+List of upload results. + |
+
Parameter + |
+Type + |
+Description + |
+
|---|---|---|
partition_id + |
+String + |
+ID of the partition to which data is uploaded. + |
+
sequence_number + |
+String + |
+Sequence number of the data to be uploaded. A sequence number is a unique identifier for each record. DIS automatically allocates a sequence number the data producer calls the PutRecords operation to add data to the DIS stream. Sequence number of the same partition key usually changes with time. A longer interval between PutRecords requests results in a larger sequence number. + |
+
error_code + |
+String + |
+Error code. + |
+
error_message + |
+String + |
+Error message. + |
+
Uploading Data
+POST https://{Endpoint}/v2/{project_id}/records
+
+{
+ "stream_name" : "newstream",
+ "records" : [ {
+ "data" : "MTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTE="
+ } ]
+}
+None
+Status Code + |
+Description + |
+
|---|---|
200 + |
+Normal response. + |
+
See Error Codes.
+This API is used to download data from DIS streams.
+GET /v2/{project_id}/records
+ +Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
|---|---|---|---|
project_id + |
+Yes + |
+String + |
+Project ID. + |
+
Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
|---|---|---|---|
partition-cursor + |
+Yes + |
+String + |
+Data cursor, which needs to be obtained through the API for obtaining data cursors. +Value range: a string of 1 to 512 characters +Note: +The validity period of a data cursor is 5 minutes. + |
+
max_fetch_bytes + |
+No + |
+Integer + |
+Maximum number of bytes that can be obtained for each request. +Note: +If the value is less than the size of a single record in the partition, the record cannot be obtained. + |
+
Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
|---|---|---|---|
X-Auth-Token + |
+Yes + |
+String + |
+User token. +The token can be obtained by calling the IAM API (value of X-Subject-Token in the response header). + |
+
Status code: 200
+ +Parameter + |
+Type + |
+Description + |
+
|---|---|---|
records + |
+Array of Record objects + |
+List of downloaded records. + |
+
next_partition_cursor + |
+String + |
+Next iterator. +Note: +The validity period of a data cursor is 5 minutes. + |
+
Parameter + |
+Type + |
+Description + |
+
|---|---|---|
partition_key + |
+String + |
+Partition key set when data is being uploaded. +Note: +If the partition_key parameter is passed when data is uploaded, this parameter will be returned when data is downloaded. If partition_id instead of partition_key is passed when data is uploaded, no partition_key is returned. + |
+
sequence_number + |
+String + |
+Sequence number of the data record. + |
+
data + |
+String + |
+Downloaded data. +The downloaded data is the serialized binary data (Base64-encoded character string). +For example, the data returned by the data download API is "ZGF0YQ==", which is "data" after Base64 decoding. + |
+
timestamp + |
+Long + |
+Timestamp when the record is written to DIS. + |
+
timestamp_type + |
+String + |
+Timestamp data type. +
Default: CreateTime + |
+
Downloading Data
+GET https://{Endpoint}/v2/{project_id}/records
+Status code: 200
+Normal response.
+{
+ "records" : [ {
+ "partition_key" : "0",
+ "sequence_number" : "485",
+ "data" : "MTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTEx",
+ "timestamp" : 1527577402541,
+ "timestamp_type" : "CreateTime"
+ } ],
+ "next_partition_cursor" : "eyJpdGVyR2VuVGltZSI6MTQ5MDk1MDE1Nzc0NywiU3RyZWFtTmFtZSI6IjY2MCIsIlNoYXJkSWQiOiIwIiwiU2hhcmRJdGVyYXRvclR5cGUiOiJBVF9TRVFVRU5DRV9OVU1CRVIiLCJTdGFydGluZ1NlcXVlbmNlTnVtYmVyIjoiMjIiLCJUaW1lU3RhbXAiOjB9"
+}
+Status Code + |
+Description + |
+
|---|---|
200 + |
+Normal response. + |
+
See Error Codes.
+This API is used to obtain data cursors.
+GET /v2/{project_id}/cursors
+ +Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
|---|---|---|---|
project_id + |
+Yes + |
+String + |
+Project ID. + |
+
Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
|---|---|---|---|
stream-name + |
+Yes + |
+String + |
+Name of the stream. + |
+
partition-id + |
+Yes + |
+String + |
+Partition ID of the stream. The value can be in either of the following formats: +
For example, if a stream has three partitions, the partition identifiers are 0, 1, and 2, or shardId-0000000000, shardId-0000000001, and shardId-0000000002, respectively. + |
+
cursor-type + |
+No + |
+String + |
+Cursor type. +
Enumeration values: +
|
+
starting-sequence-number + |
+No + |
+String + |
+Serial number. A sequence number is a unique identifier for each record. DIS automatically allocates a sequence number when the data producer calls the PutRecords operation to add data to the DIS stream. SN of the same partition key usually changes with time. A longer interval between PutRecords requests results in a larger sequence number. +The sequence number is closely related to cursor types AT_SEQUENCE_NUMBER and AFTER_SEQUENCE_NUMBER. The two parameters determine the position of the data to be read. +Value range: 0 to 9,223,372,036,854,775,807 + |
+
timestamp + |
+No + |
+Long + |
+Timestamp when the data record starts to be read, which is closely related to cursor type AT_TIMESTAMP. The two parameters determine the position of the data to be read. +Note: +The timestamp is accurate to milliseconds. + |
+
Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
|---|---|---|---|
X-Auth-Token + |
+Yes + |
+String + |
+User token. +The token can be obtained by calling the IAM API (value of X-Subject-Token in the response header). + |
+
Status code: 200
+ +Parameter + |
+Type + |
+Description + |
+
|---|---|---|
partition_cursor + |
+String + |
+Data cursor. Value range: a string of 1 to 512 characters +Note: +The validity period of a data cursor is 5 minutes. +Minimum: 1 +Maximum: 512 + |
+
Obtaining Data Cursors
+GET https://{Endpoint}/v2/{project_id}/cursors
+Status code: 200
+Normal response.
+{
+ "partition_cursor" : "eyJnZXRJdGVyYXRvclBhcmFtIjp7InN0cmVhbS1uYW1lIjoianpjIiwicGFydGl0aW9uLWlkIjoiMCIsImN1cnNvci10eXBlIjoiQVRfU0VRVUVOQ0VfTlVNQkVSIiwic3RhcnRpbmctc2VxdWVuY2UtbnVtYmVyIjoiMTAifSwiZ2VuZXJhdGVUaW1lc3RhbXAiOjE1MDYxNTk1NjM0MDV9"
+}
+Status Code + |
+Description + |
+
|---|---|
200 + |
+Normal response. + |
+
See Error Codes.
+A status code is an HTTPS response issued by DIS to indicate whether an API request has been successfully completed.
+ +Status Code + |
+Status + |
+Description + |
+
|---|---|---|
100 + |
+Continue + |
+The server has received the initial part of the request and the client should continue to send the remaining part. +It is issued on a provisional basis while request processing continues. It alerts the client to wait for a final response. + |
+
101 + |
+Switching Protocols + |
+The requester has asked the server to switch protocols and the server has agreed to do so. The target protocol must be more advanced than the source protocol. +For example, the current HTTP protocol is switched to a later version of HTTP. + |
+
200 + |
+OK + |
+The server has successfully processed the request. + |
+
201 + |
+Created + |
+The request has been fulfilled, resulting in the creation of a new resource. + |
+
202 + |
+Accepted + |
+The request has been accepted for processing, but the processing has not been completed. + |
+
203 + |
+Non-Authoritative Information + |
+The server successfully processed the request, but is returning information that may be from another source. + |
+
204 + |
+NoContent + |
+The server has successfully processed the request, but does not return any content. +The status code is returned in response to an HTTPS OPTIONS request. + |
+
205 + |
+Reset Content + |
+The server has successfully processed the request, but does not return any content. Unlike a 204 response, this response requires that the requester reset the content. + |
+
206 + |
+Partial Content + |
+The server has successfully processed a part of the GET request. + |
+
300 + |
+Multiple Choices + |
+There are multiple options for the requested resource. For example, this code could be used to present a list of resource characteristics and addresses from which the client such as a browser may choose. + |
+
301 + |
+Moved Permanently + |
+This and all future requests should be permanently directed to the given URI indicated in this response. + |
+
302 + |
+Found + |
+The requested resource was temporarily moved. + |
+
303 + |
+See Other + |
+The response to the request can be found under another URI using a GET or POST method. + |
+
304 + |
+Not Modified + |
+The requested resource has not been modified. In such a case, there is no need to retransmit the resource since the client still has a previously-downloaded copy. + |
+
305 + |
+Use Proxy + |
+The requested resource is available only through a proxy. + |
+
306 + |
+Unused + |
+This HTTP status code is no longer used. + |
+
400 + |
+BadRequest + |
+The request is invalid. +The client should modify the request instead of re-initiating it. + |
+
401 + |
+Unauthorized + |
+The authentication information provided by the client is incorrect or invalid. + |
+
402 + |
+Payment Required + |
+Reserved for future use. + |
+
403 + |
+Forbidden + |
+The server has received the request and understood it, but the server is refusing to respond to it. +The client should modify the request instead of re-initiating it. + |
+
404 + |
+NotFound + |
+The requested resource could not be found. +The client should modify the request instead of re-initiating it. + |
+
405 + |
+MethodNotAllowed + |
+A request method is not supported for the requested resource. +The client should modify the request instead of re-initiating it. + |
+
406 + |
+Not Acceptable + |
+The server could not fulfill the request according to the content characteristics of the request. + |
+
407 + |
+Proxy Authentication Required + |
+This code is similar to 401, but indicates that the client must first authenticate itself with the proxy. + |
+
408 + |
+Request Time-out + |
+The server timed out waiting for the request. +The client may re-initiate the request without modifications at any later time. + |
+
409 + |
+Conflict + |
+The request could not be processed due to a conflict in the request. +For example, an edit conflict between multiple simultaneous updates or the resource that the client attempts to create already exists. + |
+
410 + |
+Gone + |
+The requested resource has been deleted permanently and will not be available again. +The status code indicates that the requested resource has been deleted permanently. + |
+
411 + |
+Length Required + |
+The server refused to process the request because the request does not specify the length of its content. + |
+
412 + |
+Precondition Failed + |
+The server does not meet one of the preconditions that the requester puts on the request. + |
+
413 + |
+Request Entity Too Large + |
+The request is larger than the server is willing or able to process. The server may close the connection to prevent the client from continuing the request. If the server temporarily cannot process the request, the response will contain a Retry-After header field. + |
+
414 + |
+Request-URI Too Large + |
+The URI provided was too long for the server to process. + |
+
415 + |
+Unsupported Media Type + |
+The server does not support the media type in the request. + |
+
416 + |
+Requested range not satisfiable + |
+The requested range is invalid. + |
+
417 + |
+Expectation Failed + |
+The server fails to meet the requirements of the Expect request-header field. + |
+
422 + |
+UnprocessableEntity + |
+The request was well-formed but was unable to be followed due to semantic errors. + |
+
429 + |
+TooManyRequests + |
+The client has sent more requests than its rate limit is allowed within a given amount of time, or the server has received more requests than it is able to process within a given amount of time. In this case, it is advisable for the client to re-initiate requests after the time specified in the Retry-After header of the response expires. + |
+
441 + |
+Authentication Error + |
+Authentication fails. + |
+
500 + |
+InternalServerError + |
+The server is able to receive the request but it could not understand the request. + |
+
501 + |
+Not Implemented + |
+The server does not support the requested function. + |
+
502 + |
+Bad Gateway + |
+The server was acting as a gateway or proxy and received an invalid request from a remote server. + |
+
503 + |
+ServiceUnavailable + |
+The requested service is invalid. +The client should modify the request instead of re-initiating it. + |
+
504 + |
+ServerTimeout + |
+The server could not return a timely response. The response will reach the client only if the request carries a timeout parameter. + |
+
505 + |
+HTTP Version not supported + |
+The server does not support the HTTP protocol version used in the request. + |
+
Released On + |
+Description + |
+
|---|---|
2018-10-25 + |
+Accepted in OTC 3.2. + |
+
2018-09-29 + |
+Modified the following contents: +Added tag management APIs + |
+
2018-09-26 + |
+Modified the following contents: +A status code was added in Status Codes. + |
+
2018-03-16 + |
+This issue is the first official release. + |
+
This API is used to query all streams created by the current tenant.
+During the query, specify the stream from which the stream list is returned and the maximum number of streams to be returned for a single request.
+GET /v2/{project_id}/streams
+ +Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
|---|---|---|---|
project_id + |
+Yes + |
+String + |
+Project ID. + |
+
Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
|---|---|---|---|
limit + |
+No + |
+Integer + |
+The maximum number of DIS streams to list in a single API call. +Value range: 1-100 Default value: 10 +Minimum: 1 +Maximum: 100 +Default: 10 + |
+
start_stream_name + |
+No + |
+String + |
+Name of the DIS stream to start the stream list with. The returned stream list does not contain this DIS stream name. +If pagination query is required, this parameter is not transferred for query on the first page. If the value of has_more_streams is true, the query is performed on the next page. The value of start_stream_name is the name of the last stream in the query result of the first page. + |
+
Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
|---|---|---|---|
X-Auth-Token + |
+Yes + |
+String + |
+User token. +The token can be obtained by calling the IAM API (value of X-Subject-Token in the response header). + |
+
Status code: 200
+ +Parameter + |
+Type + |
+Description + |
+
|---|---|---|
total_number + |
+Long + |
+Total number of all the DIS streams created by the current tenant. + |
+
stream_names + |
+Array of strings + |
+List of the streams meeting the current requests. + |
+
has_more_streams + |
+Boolean + |
+Specify whether there are more matching DIS streams to list. Possible values: +
Default: false + |
+
stream_info_list + |
+Array of StreamInfo objects + |
+Stream details. + |
+
Parameter + |
+Type + |
+Description + |
+
|---|---|---|
stream_name + |
+String + |
+Name of the stream. + |
+
create_time + |
+Long + |
+Time when the stream is created. The value is a 13-bit timestamp. + |
+
retention_period + |
+Integer + |
+Period for storing data in units of hours. + |
+
status + |
+String + |
+Current status of the stream. Possible values: +
Enumeration values: +
|
+
stream_type + |
+String + |
+Stream type. +
Enumeration values: +
|
+
data_type + |
+String + |
+Source data type. +
Default value: BLOB +Enumeration values: +
|
+
partition_count + |
+Integer + |
+Quantity of partitions. Partitions are the base throughput unit of a DIS stream. + |
+
auto_scale_enabled + |
+Boolean + |
+Specifies whether to enable auto scaling. +
This function is disabled by default. +Default: false + |
+
auto_scale_min_partition_count + |
+Integer + |
+Minimum number of partitions for automatic scale-down when auto scaling is enabled. +Minimum: 1 + |
+
auto_scale_max_partition_count + |
+Integer + |
+Maximum number of partitions for automatic scale-up when auto scaling is enabled. + |
+
tags + |
+Array of Tag objects + |
+List of stream tags. + |
+
sys_tags + |
+Array of SysTag objects + |
+Stream enterprise projects. + |
+
Parameter + |
+Type + |
+Description + |
+
|---|---|---|
key + |
+String + |
+Key. +
Minimum: 1 +Maximum: 36 + |
+
value + |
+String + |
+Value. +
Minimum: 0 +Maximum: 43 + |
+
Parameter + |
+Type + |
+Description + |
+
|---|---|---|
key + |
+String + |
+Key. +
Enumeration values: +
|
+
value + |
+String + |
+Value. The value is the enterprise project ID, which needs to be obtained on the enterprise management page. +
|
+
Querying Streams
+GET https://{Endpoint}/v2/{project_id}/streams
+Status code: 200
+Normal response.
+{
+ "total_number" : 1,
+ "stream_names" : [ "newstream" ],
+ "stream_info_list" : [ {
+ "stream_id" : "8QM3Nt9YTLOwtUVYJhO",
+ "stream_name" : "newstream",
+ "create_time" : 1593569685875,
+ "retention_period" : 24,
+ "status" : "RUNNING",
+ "stream_type" : "COMMON",
+ "data_type" : "BLOB",
+ "partition_count" : 1,
+ "tags" : [ ],
+ "auto_scale_enabled" : false,
+ "auto_scale_min_partition_count" : 0,
+ "auto_scale_max_partition_count" : 0
+ } ],
+ "has_more_streams" : false
+}
+Status Code + |
+Description + |
+
|---|---|
200 + |
+Normal response. + |
+
See Error Codes.
+This API is used to query details about a specified stream.
+GET /v2/{project_id}/streams/{stream_name}
+ +Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
|---|---|---|---|
project_id + |
+Yes + |
+String + |
+Project ID. + |
+
stream_name + |
+Yes + |
+String + |
+Stream to be queried. +Maximum: 60 + |
+
Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
|---|---|---|---|
start_partitionId + |
+No + |
+String + |
+Name of the partition to start the partition list with. The returned partition list does not contain this partition. + |
+
limit_partitions + |
+No + |
+Integer + |
+Maximum number of partitions to list in a single API call. Value range: 1-1,000 Default value: 100 +Minimum: 1 +Maximum: 1000 +Default: 100 + |
+
Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
|---|---|---|---|
X-Auth-Token + |
+Yes + |
+String + |
+User token. +The token can be obtained by calling the IAM API (value of X-Subject-Token in the response header). + |
+
Status code: 200
+ +Parameter + |
+Type + |
+Description + |
+
|---|---|---|
stream_name + |
+String + |
+Name of the stream. + |
+
create_time + |
+Long + |
+Time when a stream is created. The value is a 13-bit timestamp. + |
+
last_modified_time + |
+Long + |
+Time when a stream is the most recently modified. The value is a 13-bit timestamp. + |
+
status + |
+String + |
+Current status of the stream. Possible values: +
Enumeration values: +
|
+
stream_type + |
+String + |
+Stream type. +
Enumeration values: +
|
+
partitions + |
+Array of PartitionResult objects + |
+A list of partitions that comprise the DIS stream. + |
+
has_more_partitions + |
+Boolean + |
+Specifies whether there are more matching partitions of the DIS stream to list. +
|
+
retention_period + |
+Integer + |
+Period for storing data in units of hours. + |
+
stream_id + |
+String + |
+Unique identifier of the stream. + |
+
data_type + |
+String + |
+Source data type. +
Default value: BLOB +Enumeration values: +
|
+
data_schema + |
+String + |
+Source data structure that defines JSON and CSV formats. It is described in the syntax of the Avro schema. For details about Avro, go to http://avro.apache.org/docs/current/ + |
+
compression_format + |
+String + |
+Compression type of data. Currently, the value can be: +
Data is not compressed by default. +Enumeration values: +
|
+
csv_properties + |
+CSVProperties object + |
+Attributes of data in CSV format, such as delimiter. + |
+
writable_partition_count + |
+Integer + |
+Total number of writable partitions (including partitions in ACTIVE state only). + |
+
readable_partition_count + |
+Integer + |
+Total number of readable partitions (including partitions in ACTIVE and DELETED state). + |
+
update_partition_counts + |
+Array of UpdatePartitionCount objects + |
+List of scaling operation records. + |
+
tags + |
+Array of Tag objects + |
+List of stream tags. + |
+
sys_tags + |
+Array of SysTag objects + |
+Enterprise project of a stream. + |
+
auto_scale_enabled + |
+Boolean + |
+Specifies whether to enable auto scaling. +
This function is disabled by default. + |
+
auto_scale_min_partition_count + |
+Integer + |
+Minimum number of partitions for automatic scale-down when auto scaling is enabled. + |
+
auto_scale_max_partition_count + |
+Integer + |
+Maximum number of partitions for automatic scale-up when auto scaling is enabled. + |
+
Parameter + |
+Type + |
+Description + |
+
|---|---|---|
status + |
+String + |
+Current status of the partition. Possible values: +
Enumeration values: +
|
+
partition_id + |
+String + |
+Unique identifier of the partition. + |
+
hash_range + |
+String + |
+Possible value range of the hash key used by the partition. + |
+
sequence_number_range + |
+String + |
+Sequence number range of the partition. + |
+
parent_partitions + |
+String + |
+Parent partition. + |
+
Parameter + |
+Type + |
+Description + |
+
|---|---|---|
delimiter + |
+String + |
+Data separator. + |
+
Parameter + |
+Type + |
+Description + |
+
|---|---|---|
create_timestamp + |
+Long + |
+Scaling execution timestamp, which is a 13-digit timestamp. + |
+
src_partition_count + |
+Integer + |
+Number of partitions before scaling. + |
+
target_partition_count + |
+Integer + |
+Number of partitions after scaling. + |
+
result_code + |
+Integer + |
+Response code of the scaling operation. + |
+
result_msg + |
+Integer + |
+Response to the scaling operation. + |
+
auto_scale + |
+Boolean + |
+Specifies whether the scaling operation is automatic. +
|
+
Parameter + |
+Type + |
+Description + |
+
|---|---|---|
key + |
+String + |
+Key. +
Minimum: 1 +Maximum: 36 + |
+
value + |
+String + |
+Value. +
Minimum: 0 +Maximum: 43 + |
+
Parameter + |
+Type + |
+Description + |
+
|---|---|---|
key + |
+String + |
+Key. +
Enumeration values: +
|
+
value + |
+String + |
+Value. The value is the enterprise project ID, which needs to be obtained on the enterprise management page. +
|
+
Querying Stream Details
+GET https://{Endpoint}/v2/{project_id}/streams/{stream_name}
+Status code: 200
+Normal response.
+{
+ "stream_id" : "8QM3Nt9YTLOwtUVYJhO",
+ "stream_name" : "newstream",
+ "create_time" : 1593569685875,
+ "last_modified_time" : "1599050091026,",
+ "retention_period" : 24,
+ "status" : "RUNNING",
+ "stream_type" : "COMMON",
+ "data_type" : "BLOB",
+ "writable_partition_count" : 1,
+ "readable_partition_count" : 1,
+ "tags" : [ ],
+ "auto_scale_enabled" : false,
+ "auto_scale_min_partition_count" : 0,
+ "auto_scale_max_partition_count" : 0,
+ "partitions" : [ {
+ "status" : "ACTIVE",
+ "partition_id" : "shardId-0000000000",
+ "hash_range" : "[0 : 9223372036854775807]",
+ "sequence_number_range" : "[289911 : 289927]"
+ } ],
+ "has_more_partitions" : false
+}
+Status Code + |
+Description + |
+
|---|---|
200 + |
+Normal response. + |
+
See Error Codes.
+DIS provides self-developed APIs that comply with RESTful API design specifications. You can use DIS functions listed in API Description by calling these APIs.
+This section describes the structure of a REST API request, and uses the IAM API for obtaining a user token as an example to demonstrate how to call an API. The obtained token can then be used to authenticate the calling of other APIs.
+A request URI is in the following format:
+{URI-scheme}://{Endpoint}/{resource-path}?{query-string}
+Although a request URI is included in the request header, most programming languages or frameworks require the request URI to be transmitted separately.
+ +Parameter + |
+Description + |
+
|---|---|
URI-scheme + |
+Protocol used to transmit requests. All APIs use HTTPS. + |
+
Endpoint + |
+Domain name or IP address of the server bearing the REST service. The endpoint varies between services in different regions. It can be obtained from Regions and Endpoints. + |
+
resource-path + |
+Access path of an API for performing a specified operation. Obtain the path from the URI of an API. For example, the resource-path of the API used to obtain a user token is /v3/auth/tokens. + |
+
query-string + |
+Query parameter, which is optional. Ensure that a question mark (?) is included before each query parameter that is in the format of "Parameter name=Parameter value". For example, ? limit=10 indicates that a maximum of 10 data records will be displayed. + |
+
To simplify the URI display in this document, each API is provided only with a resource-path and a request method. The URI-scheme of all APIs is HTTPS, and the endpoints of all APIs in the same region are identical.
+Method + |
+Description + |
+
|---|---|
GET + |
+Requests the server to return specified resources. + |
+
PUT + |
+Requests the server to update specified resources. + |
+
POST + |
+Requests the server to add resources or perform special operations. + |
+
DELETE + |
+Requests the server to delete specified resources, for example, an object. + |
+
HEAD + |
+Same as GET except that the server must return only the response header. + |
+
PATCH + |
+Requests the server to update partial content of a specified resource. +If the resource does not exist, a new resource will be created. + |
+
For example, in the case of the API used to obtain a user token, the request method is POST, and the request is as follows:
+You can also add additional header fields to a request, such as the fields required by a specified URI or HTTP method. For example, to request for the authentication information, add Content-Type, which specifies the request body type.
+Parameter + |
+Description + |
+Mandatory + |
+Example + |
+
|---|---|---|---|
Host + |
+Specifies the server domain name and port number of the resources being requested. The value can be obtained from the URL of the service API. The value is in the format of Hostname:Port number. If the port number is not specified, the default port is used. The default port number for HTTPS is 443. + |
+No +This field is mandatory for AK/SK authentication. + |
+code.test.com +or +code.test.com:443 + |
+
Content-Type + |
+Specifies the request body MIME type. Its default value is application/json. Other values of this field will be provided for specific APIs if any. + |
+Yes + |
+application/json + |
+
Content-Length + |
+Specifies the length of the request body. The unit is byte. + |
+No + |
+3495 + |
+
X-Project-Id + |
+Specifies the project ID. Obtain the project ID by following the instructions in Obtaining a Project ID. + |
+No + |
+e9993fc787d94b6c886cbaa340f9c0f4 + |
+
X-Auth-Token + |
+Specifies the user token. +It is a response to the API used to obtain a user token. This API is the only one that does not require authentication. +After the request is processed, the value of X-Subject-Token in the header is the token value. + |
+No +This field is mandatory for token authentication. + |
+The following is part of an example token: +MIIPAgYJKoZIhvcNAQcCo...ggg1BBIINPXsidG9rZ + |
+
In addition to supporting token-based authentication, APIs also support authentication using access key ID/secret access key (AK/SK). During AK/SK-based authentication, an SDK is used to sign the request, and the Authorization (signature authentication) and X-Sdk-Date (time when the request is sent) header fields are automatically added to the request.
+For more information, see "AK/SK-based Authentication" in Authentication.
+The API used to obtain a user token does not require authentication. Therefore, only the Content-Type field needs to be added to requests for calling the API. An example of such requests is as follows:
+This part is optional. The body of a request is often sent in a structured format as specified in the Content-Type header field, such as JSON or XML. The request body transfers content except the request header.
+The request body varies between APIs. Some APIs do not require the request body, such as the APIs requested using the GET and DELETE methods.
+In the case of the API used to obtain a user token, the request parameters and parameter description can be obtained from the API request. The following provides an example request with a body included. Replace username, domainname, ******** (login password), and xxxxxxxxxxxxxxxxxx (project ID) with the actual values. To learn how to obtain a project ID, see Obtaining a Project ID.
+
The scope parameter specifies where a token takes effect. In the following example, the token takes effect only for the resources in a specified project. You can set scope to a domain or a project under a domain. In the following example, the token takes effect only for the resources in a specified project. For more information about this API, see obtaining a user token.
+
+Content-Type: application/json
+{
+ "auth": {
+ "identity": {
+ "methods": [
+ "password"
+ ],
+ "password": {
+ "user": {
+ "name": "username",
+ "password": "********",
+ "domain": {
+ "name": "domainname"
+ }
+ }
+ }
+ },
+ "scope": {
+ "project": {
+ "name": "xxxxxxxxxxxxxxxxxx"
+ }
+ }
+ }
+}
+If all data required for the API request is available, you can send the request to call the API through curl, Postman, or coding. In the response to the API used to obtain a user token, x-subject-token is the desired user token. This token can then be used to authenticate the calling of other APIs.
+This API is used to submit checkpoints.
+POST /v2/{project_id}/checkpoints
+ +Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
|---|---|---|---|
project_id + |
+Yes + |
+String + |
+Project ID. + |
+
Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
|---|---|---|---|
X-Auth-Token + |
+Yes + |
+String + |
+User token. +The token can be obtained by calling the IAM API (value of X-Subject-Token in the response header). + |
+
Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
|---|---|---|---|
app_name + |
+Yes + |
+String + |
+Name of the app, which is the unique identifier of a user data consumption program. + |
+
checkpoint_type + |
+Yes + |
+String + |
+Type of the checkpoint. +
Enumeration values: +
|
+
stream_name + |
+Yes + |
+String + |
+Name of the stream. + |
+
partition_id + |
+Yes + |
+String + |
+Partition identifier of the stream. The value can be in either of the following formats: +
For example, if a stream has three partitions, the partition identifiers are 0, 1, and 2, or shardId-0000000000, shardId-0000000001, and shardId-0000000002, respectively. + |
+
sequence_number + |
+Yes + |
+String + |
+Sequence number to be submitted, which is used to record the consumption checkpoint of the stream. Ensure that the sequence number is within the valid range. + |
+
metadata + |
+No + |
+String + |
+Metadata information of the consumer application. +The metadata information can contain a maximum of 1,000 characters. +Maximum: 1000 + |
+
None
+Submitting Checkpoints
+POST https://{Endpoint}/v2/{project_id}/checkpoints
+
+{
+ "stream_name" : "newstream",
+ "app_name" : "newapp",
+ "partition_id" : "0",
+ "sequence_number" : "2",
+ "checkpoint_type" : "LAST_READ"
+}
+None
+Status Code + |
+Description + |
+
|---|---|
201 + |
+Normal response. + |
+
See Error Codes.
+This API is used to add OBS dump tasks.
+POST /v2/{project_id}/streams/{stream_name}/transfer-tasks
+ +Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
|---|---|---|---|
project_id + |
+Yes + |
+String + |
+Project ID. + |
+
stream_name + |
+Yes + |
+String + |
+Name of the stream. +Maximum: 60 + |
+
Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
|---|---|---|---|
X-Auth-Token + |
+Yes + |
+String + |
+User token. +The token can be obtained by calling the IAM API (value of X-Subject-Token in the response header). + |
+
Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
|---|---|---|---|
destination_type + |
+Yes + |
+String + |
+Dump destination. Possible values: +
Default: NOWHERE +Enumeration values: +
|
+
obs_destination_descriptor + |
+No + |
++ | +Parameter list of OBS to which data in the DIS stream will be dumped. + |
+
Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
|---|---|---|---|
task_name + |
+Yes + |
+String + |
+Name of the dump task. The task name consists of letters, digits, hyphens (-), and underscores (_). It must be a string of 1 to 64 characters. + |
+
agency_name + |
+Yes + |
+String + |
+Name of the agency created on IAM. DIS uses an agency to access your specified resources. The parameters for creating an agency are as follows: +
If agencies have been created, you can obtain available agencies from the agency list by using the "Listing Agencies " API. +This parameter cannot be left blank and the parameter value cannot exceed 64 characters. +If there are dump tasks on the console, the system displays a message indicating that an agency will be automatically created. The name of the automatically created agency is dis_admin_agency. +Maximum: 64 + |
+
deliver_time_interval + |
+Yes + |
+Integer + |
+User-defined interval at which data is imported from the current DIS stream into OBS. If no data is pushed to the DIS stream during the current interval, no dump file package will be generated. +Value range: 30-900 +Default value: 300 +Unit: second +Minimum: 30 +Maximum: 900 +Default: 300 + |
+
consumer_strategy + |
+No + |
+String + |
+Offset. +
Default value: LATEST +Default: LATEST +Enumeration values: +
|
+
file_prefix + |
+No + |
+String + |
+Directory to store files that will be dumped to OBS. Different directory levels are separated by slashes (/) and cannot start with slashes. +The value can contain a maximum of 50 characters, including letters, digits, underscores (_), and slashes (/). +This parameter is left empty by default. +Maximum: 50 + |
+
partition_format + |
+No + |
+String + |
+Directory structure of the object file written into OBS. The directory structure is in the format of yyyy/MM/dd/HH/mm (time at which the dump task was created). +
Example: in 2017/11/10/14/49, the directory structure is 2017 > 11 > 10 > 14 > 49. 2017 indicates the outermost folder. +Default value: empty. +Note: +After data is successfully dumped, the directory structure is obs_bucket_path/file_prefix/partition_format. +Enumeration values: +
|
+
obs_bucket_path + |
+Yes + |
+String + |
+Name of the OBS bucket used to store data from the DIS stream. + |
+
destination_file_type + |
+No + |
+String + |
+Dump file format. Possible values: +
Note: +You can select Parquet or CarbonData only when Source Data Type is set to JSON and Dump Destination is set to OBS. +Default: text +Enumeration values: +
|
+
processing_schema + |
+No + |
+ProcessingSchema object + |
+Dump time directory generated based on the timestamp of the source data and the configured partition_format. Directory structure of the object file written into OBS. The directory structure is in the format of yyyy/MM/dd/HH/mm. + |
+
record_delimiter + |
+No + |
+String + |
+Delimiter for the dump file, which is used to separate the user data that is written into the dump file. +Value range: +
Default: \n + |
+
Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
|---|---|---|---|
timestamp_name + |
+Yes + |
+String + |
+Attribute name of the source data timestamp. + |
+
timestamp_type + |
+Yes + |
+String + |
+Type of the source data timestamp. +
|
+
timestamp_format + |
+No + |
+String + |
+OBS directory generated based on the timestamp format. This parameter is mandatory when the timestamp type of the source data is String. +Value range: +
Enumeration values: +
|
+
None
+POST https://{Endpoint}/v2/{project_id}/streams/{stream_name}/transfer-tasks
+
+{
+ "destination_type" : "OBS",
+ "obs_destination_descriptor" : {
+ "task_name" : "newtask",
+ "consumer_strategy" : "LATEST",
+ "agency_name" : "dis_admin_agency",
+ "destination_file_type" : "text",
+ "obs_bucket_path" : "obsbucket",
+ "file_prefix" : "",
+ "partition_format" : "yyyy/MM/dd/HH/mm",
+ "record_delimiter" : "|",
+ "deliver_time_interval" : 30
+ }
+}
+POST https://{Endpoint}/v2/{project_id}/streams/{stream_name}/transfer-tasks
+
+{
+ "destination_type" : "OBS",
+ "obs_destination_descriptor" : {
+ "task_name" : "newtask",
+ "consumer_strategy" : "LATEST",
+ "agency_name" : "dis_admin_agency",
+ "destination_file_type" : "parquet",
+ "obs_bucket_path" : "obsbucket",
+ "file_prefix" : "",
+ "partition_format" : "yyyy/MM/dd/HH/mm",
+ "record_delimiter" : "|",
+ "deliver_time_interval" : 30
+ }
+}
+None
+Status Code + |
+Description + |
+
|---|---|
201 + |
+Normal response. + |
+
See Error Codes.
+You can obtain a project ID by calling the API for Querying Project Information Based on the Specified Criteria.
+The API for obtaining the project ID is GET https://{Endpoint}/v3/projects/, where Endpoint indicates the endpoint of IAM. You can obtain the endpoint from Regions and Endpoints. For details about API authentication, see Authentication.
+The following is an example response. The value of id is the project ID. If multiple IDs are returned, obtain the desired project ID based on the actual region (name).
+{
+ "projects": [
+ {
+ "domain_id": "65382450e8f64ac0870cd180d14e684b",
+ "is_domain": false,
+ "parent_id": "65382450e8f64ac0870cd180d14e684b",
+ "name": "region_name",
+ "description": "",
+ "links": {
+ "next": null,
+ "previous": null,
+ "self": "https://www.example.com/v3/projects/a4a5d4098fb4474fa22cd05f897d6b99"
+ },
+ "id": "a4a5d4098fb4474fa22cd05f897d6b99",
+ "enabled": true
+ }
+ ],
+ "links": {
+ "next": null,
+ "previous": null,
+ "self": "https://www.example.com/v3/projects"
+ }
+}
+A project ID is required for some URLs when an API is called. To obtain a project ID, perform the following operations:
+On the My Credentials page, view project IDs in the project list.
+
DIS supports Representational State Transfer (REST) APIs, allowing you to call APIs using HTTPS. For details about API calling, see Calling APIs.
+An endpoint is the request address for calling an API. Endpoints vary depending on services and regions. For the endpoints of all services, see Regions and Endpoints.
+A domain is created upon successful registration. The domain has full access permissions for all of its cloud services and resources. It can be used to reset user passwords and grant user permissions. The domain is a payment entity and should not be used directly to perform routine management. For security purposes, create users and grant them permissions for routine management.
+A user is created using an accounta domain to use cloud services. Each user has its own identity credentials (password and access keys).
+The account, username, and password will be required for API authentication.
+Projects group and isolate resources (including compute, storage, and network resources) across physical regions. A default project is provided for each region, and subprojects can be created under each default project. Users can be granted permissions to access all resources in a specific project. For more refined access control, create subprojects under a project and create resources in the subprojects. Users can then be assigned permissions to access only specific resources in the subprojects.
+
When an application consumes data, the latest SN of the consumed data is recorded as a checkpoint. When the data is reconsumed, the consumption can be continued based on this checkpoint.
+Multiple applications can consume data in the same stream. The consumed data in the stream by each application is recorded by checkpoints generated for each application.
+
The validity period of a token is 24 hours. When using a token for authentication, cache it to prevent frequently calling the IAM API used to obtain a user token.
+A token specifies temporary permissions in a computer system. During API authentication using a token, the token is added to a request to get permissions for calling the API.
+When calling the API to obtain a user token, you must set auth.scope in the request body to project.
+{
+ "auth": {
+ "identity": {
+ "methods": [
+ "password"
+ ],
+ "password": {
+ "user": {
+ "name": "username",
+ "password": "********",
+ "domain": {
+ "name": "domainname"
+ }
+ }
+ }
+ },
+ "scope": {
+ "project": {
+ "id": "xxxxxxxxxxxxxxxxxx"
+ }
+ }
+ }
+}
+After a token is obtained, the X-Auth-Token header field must be added to requests to specify the token when calling other APIs, for example, the API used to query a connection list. For example, if the token is ABCDEFJ...., X-Auth-Token: ABCDEFJ.... can be added to a request as follows:
+
+GET https://{{endpoint}}/v1/{project_id}/connections
+Content-Type: application/json
+X-Auth-Token: ABCDEFJ....
+
AK/SK-based authentication supports API requests with a body not larger than 12 MB. For API requests with a larger body, token-based authentication is recommended.
+In AK/SK-based authentication, AK/SK is used to sign requests and the signature is then added to the requests for authentication.
+
The signing SDKs are only used for signing requests and different from the SDKs provided by services.
+After sending a request, you will receive a response, including a status code, response header, and response body.
+A status code is a group of digits, ranging from 1xx to 5xx. It indicates the status of a request. For more information, see Status Codes.
+For example, if status code 201 is returned for calling the API used to obtain a user token, the request is successful.
+Similar to a request, a response also has a header, for example, Content-Type.
+Figure 1 shows the response header fields for the API used to obtain a user token. The x-subject-token header field is the desired user token. This token can then be used to authenticate the calling of other APIs.
+ +The body of a response is often returned in structured format as specified in the Content-Type header field, such as JSON or XML. The response body transfers content except the response header.
+The following is part of the response body for the API used to obtain a user token.
+{
+ "token": {
+ "expires_at": "2019-02-13T06:52:13.855000Z",
+ "methods": [
+ "password"
+ ],
+ "catalog": [
+ {
+ "endpoints": [
+ {
+ "region_id": "******",
+......
+If an error occurs during API calling, an error code and a message will be displayed. The following shows an error response body.
+{
+ "error_msg": "The format of message is error",
+ "error_code": "AS.0001"
+}
+In the response body, error_code is an error code, and error_msg provides information about the error.
+Welcome to Data Ingestion Service API Reference. Data Ingestion Service (DIS) provides efficient collection, transmission, and distribution capabilities for real-time IoT and Internet data, supports multiple IoT protocols, and provides various APIs to help you quickly build real-time data applications.
+This document describes how to use application programming interfaces (APIs) to perform operations on DIS, such as uploading or downloading data. For details about all supported operations, see API Overview.
+If you plan to access DIS through an API, ensure that you are familiar with DIS concepts. For details, see "Service Overview" in the DIS User Guide.
+This chapter describes fine-grained permissions management for your DIS. If your cloud account does not need individual IAM users, then you may skip over this chapter.
+By default, new IAM users do not have any permissions assigned. You need to add a user to one or more groups, and assign permissions policies to these groups. The user then inherits permissions from the groups it is a member of. This process is called authorization. After authorization, the user can perform specified operations on DIS based on the permissions.
+You can grant users permissions by using roles and policies. Roles are a type of coarse-grained authorization mechanism provided by IAM that defines permissions related to user responsibilities. Policies define API-based permissions for operations on specific resources under certain conditions, allowing for more fine-grained, secure access control of cloud resources.
+Note:
+Policy-based authorization is useful if you want to allow or deny the access to an API.
+An account has all of the permissions required to call all APIs, but IAM users must have the required permissions specifically assigned. The permissions required for calling an API are determined by the actions supported by the API. Only users who have been granted permissions allowing the actions can call the API successfully. For example, if an IAM user queries MRS clusters using an API, the user must have been granted permissions that allow the dis:streams:list action.
+Supported Actions
+DIS provides system-defined policies that can be directly used in IAM. You can also create custom policies and use them to supplement system-defined policies, implementing more refined access control. Operations supported by policies are specific to APIs. The following are common concepts related to policies:
+· Permission: A statement in a policy that allows or denies certain operations.
+· APIs: REST APIs that can be called in a custom policy.
+· Action: Specific operations that are allowed or denied.
+· IAM or enterprise projects: Type of projects for which an action will take effect. Policies that contain actions supporting both IAM and enterprise projects can be assigned to user groups and take effect in both IAM and Enterprise Management. Policies that only contain actions for IAM projects can be used and only take effect for IAM.
+Note:
+The check mark (√) indicates that an action takes effect. The cross mark (x) indicates that an action does not take effect.
+Table 1 lists the actions that can be defined in custom policies of DIS. All actions listed in the following table support both Project and Enterprise Project.
+ +Permissions + |
+APIs + |
+Actions + |
+Project + |
+Enterprise Project + |
+
|---|---|---|---|---|
Creating a consumer app + |
+POST /v2/{project_id}/apps + |
+dis:apps:create + |
+√ + |
+× + |
+
Deleting an app + |
+DELETE /v2/{project_id}/apps/{app_name} + |
+dis:apps:delete + |
+√ + |
+× + |
+
Querying apps + |
+GET +/v2/{project_id}/apps + |
+dis:apps:list + |
+√ + |
+× + |
+
Querying app details + |
+GET +/v2/{project_id}/apps/{app_name} + |
+dis:apps:get + |
+√ + |
+× + |
+
Querying the app consumption status + |
+GET +/v2/{project_id}/apps/{app}/streams/{stream_name} + |
+dis:appState:get + |
+√ + |
+√ + |
+
Querying all events of a user in pagination mode + |
+GET +/v1/{project_id}/events + |
+dis:events:list + |
+√ + |
+× + |
+
Creating a subscription + |
+POST +/v1/{project_id}/event-subs + |
+dis:eventEnumSubs:create + |
+√ + |
+× + |
+
Deleting a subscription + |
+DELETE +/v1/{project_id}/event-subs/{sub_id} + |
+dis:eventEnumSubs:delete + |
+√ + |
+× + |
+
Modifying a subscription + |
+PUT +/v1/{project_id}/event-subs/{sub_id} + |
+dis:eventEnumSubs:update + |
+√ + |
+× + |
+
Querying all subscriptions of a user + |
+GET +/v1/{project_id}/event-subs + |
+dis:eventEnumSubs:list + |
+√ + |
+× + |
+
Adding a permission policy + |
+POST +/v2/{project_id}/streams/{streamName}/policies + |
+dis:streamPolicies:create + |
+√ + |
+√ + |
+
Querying permission policies + |
+GET +/v2/{project_id}/streams/{streamName}/policies + |
+dis:streamPolicies:list + |
+√ + |
+√ + |
+
Deleting a permission policy of a stream + |
+DELETE +/v2/{project_id}/streams/{streamName}/policies + |
+dis:streamPolicies:delete + |
+√ + |
+√ + |
+
Querying details of a stream + |
+GET +/v2/{project_id}/streams/{streamName} + |
+dis:streams:get + |
+√ + |
+√ + |
+
Creating a stream + |
+POST +/v2/{project_id}/streams + |
+dis:streams:create + |
+√ + |
+√ + |
+
Deleting a Stream + |
+DELETE +/v2/{project_id}/streams/{stream_name} + |
+dis:streams:delete + |
+√ + |
+√ + |
+
Querying streams + |
+GET +/v2/{project_id}/streams + |
+dis:streams:list + |
+√ + |
+× + |
+
Updating stream information + |
+PUT +/v2/{project_id}/streams/{stream_name}/update + |
+dis:streams:update + |
+√ + |
+√ + |
+
Creating a dump task + |
+POST +/v2/{project_id}/streams/{stream_name}/transfer-tasks + |
+dis:transferTasks:create + |
+√ + |
+√ + |
+
Updating a dump task + |
+PUT +/v2/{project_id}/streams/{stream_name}/transfer-tasks + |
+dis:transferTasks:update + |
+√ + |
+√ + |
+
Querying dump tasks + |
+GET +/v2/{project_id}/streams/{stream_name}/transfer-tasks + |
+dis:transferTasks:list + |
+√ + |
+√ + |
+
Querying details of a dump task + |
+GET +/v2/{project_id}/streams/{stream_name}/transfer-tasks/{task_name} + |
+dis:transferTasks:get + |
+√ + |
+√ + |
+
Deleting a dump task + |
+DELETE +/v2/{project_id}/streams/{stream_name}/transfer-tasks/{task_name} + |
+dis:transferTasks:delete + |
+√ + |
+√ + |
+
Uploading Data to a DIS Stream + |
+POST +/v2/{project_id}/records + |
+dis:records:write + |
+√ + |
+√ + |
+
Obtaining a data cursor + |
+GET +/v2/{project_id}/cursors + |
+dis:records:readCursor + |
+√ + |
+√ + |
+
Downloading data from a DIS stream + |
+GET +/v2/{project_id}/records + |
+dis:records:read + |
+√ + |
+√ + |
+
Adding a checkpoint + |
+POST +/v2/{project_id}/checkpoints + |
+dis:checkpoints:commit + |
+√ + |
+√ + |
+
Querying checkpoint details + |
+GET +/v2/{project_id}/checkpoints + |
+dis:checkpoints:get + |
+√ + |
+√ + |
+
Deleting a checkpoint + |
+DELETE +/v2/{project_id}/checkpoints + |
+dis:checkpoints:delete + |
+√ + |
+√ + |
+
Filtering streams by tag + |
+POST +/{project_id}/{resource_type}/resource_instances/action + |
+dis:tagResources:list + |
+√ + |
+× + |
+
Adding or deleting resource tags in batches + |
+POST +/{project_id}/{resource_type}/{resource_id}/tags/action + |
+dis:tagResources:update + |
+√ + |
+× + |
+
Adding a Tag to a Specified Stream + |
+POST +/{project_id}/{resource_type}/{resource_id}/tags + |
+dis:tagResources:create + |
+√ + |
+× + |
+
Deleting a tag of a specified stream + |
+DELETE +/{project_id}/{resource_type}/{resource_id}/tags/{key} + |
+dis:tagResources:delete + |
+√ + |
+× + |
+
Querying all tags of a specified region + |
+GET +/{project_id}/{resource_type}/tags + |
+dis:tags:list + |
+√ + |
+× + |
+
Note: For the actions not listed Table 1, for example, viewing app quota (/{projectId}/quotas) and viewing DIS resource statistics on the homepage (/v1/{projectId}/statistics), configure system-defined policy DIS User, DIS ReadOnlyAccess, DIS CommonOperations, or DIS FullAccess for users.
+