Help Center/ Data Replication Service/ API Reference/ APIs V5.0/ Task Details/ Querying Details About a Subscription Task
Updated on 2026-09-07 GMT+08:00

Querying Details About a Subscription Task

Function

This API is used to query details about a subscription task based on the enterprise project and task ID.

Authorization Information

Each account has all the permissions required to call all APIs, but IAM users must be assigned the required permissions.

  • If you are using role/policy-based authorization, see Permissions and Supported Actions for details on the required permissions.
  • If you are using identity policy-based authorization, no identity policy-based permissions are required for calling this API.

URI

GET /v5/{project_id}/subscriptions/{job_id}

Table 1 URI parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Project ID of a tenant in a region

For details about how to obtain the project ID, see Obtaining a Project ID.

job_id

Yes

String

Task ID.

Request Parameters

Table 2 Request header parameters

Parameter

Mandatory

Type

Description

Content-Type

No

String

MIME type of the request body. Use the default value application/json. For APIs used to upload objects or images, the value varies depending on the flow type.

X-Auth-Token

Yes

String

User token obtained from IAM.

It is a response to the API for obtaining a user token. This API is the only one that does not require authentication.

After a request is processed, the value of X-Subject-Token in the header is the token value.

X-Language

No

String

Request language type.

Enumerated values:

  • en-us

  • zh-cn

Response Parameters

Status code: 200

Table 3 Response body parameters

Parameter

Type

Description

id

String

Task ID.

name

String

Task name.

The task name can be 4 to 50 characters in length. It is case-insensitive and can contain only letters, digits, hyphens (-), and underscores (_).

  • Minimum length: 4

  • Maximum length: 50

ip

String

Internal network IP address.

enterprise_project_id

String

Enterprise project ID.

status

String

Task status. The value can be:

CONFIGURATION: The task is being configured.

CREATING: The task is being created.

CREATE_FAILED: The task fails to be created.

STARTJOBING: The task is being started.

STARTJOB_FAILED: The task fails to be started.

SUBSCRIPTION_STARTED: The task is normal.

SUBSCRIPTION_FAILED: The task is abnormal.

DELETED: The task has been deleted.

FROZEN: The task is frozen.

REBUILD_NODE_STARTED: The subscription task is being restored.

REBUILD_NODE_FAILED: The subscription task fails to be restored.

NODE_UPGRADE_START: The upgrade starts.

NODE_UPGRADE_COMPLETE: The upgrade is complete.

NODE_UPGRADE_FAILED: The upgrade failed.

subscription_data_type

object

Type of the subscribed data, including data definition language (DDL) and data manipulation language (DML).

For details, see SubscriptionDataType.

source_endpoint

object

Source DB instance information about a data subscription task.

For details, see SubscriptionEndpointInfo.

created_time

String

Creation time, which is a timestamp.

begin_time

String

Start time, which is a timestamp.

now_time

String

Current time, which is a timestamp.

engine_type

String

Data flow type. Currently, only MySQL is supported.

charge_info

object

Billing mode. The value is NULL if no fee is charged.

For details, see ChargeInfoVo.

description

String

Description

Table 4 SubscriptionDataType

Parameter

Type

Description

is_dml_subscribed

Boolean

Whether Data Manipulation Language (DML) data has been subscribed to. The value can be:

true: DML data has been subscribed to.

false: DML data has not been subscribed to.

is_ddl_subscribed

Boolean

Whether Data Definition Language (DML) data has been subscribed to. The value can be:

true: DDL data has been subscribed to.

false: DDL data has not been subscribed to.

Table 5 SubscriptionEndpointInfo

Parameter

Type

Description

db_instance_id

String

DB instance ID.

name

String

Database name.

ip

String

Database private IP address.

port

Integer

Database port.

type

String

Database type.

user_name

String

Database username.

Table 6 ChargeInfoVo

Parameter

Type

Description

charge_mode

String

Billing mode. The value can be:

  • on_demand: pay-per-use billing

  • period: yearly/monthly billing

period_type

String

Subscription period type. This parameter is available and mandatory when charge_mode is set to period. The value can be:

  • month: monthly subscriptions

  • year: yearly subscriptions

period_num

Integer

Subscription duration. This parameter is available and mandatory when charge_mode is set to period.

If period_type is set to month, the value ranges from 1 to 9.

When period_type is set to year, the value ranges from 1 to 3 or can be 5.

is_auto_renew

Boolean

Whether automatic renewal is enabled for yearly/monthly instances. The renewal period is the same as the original period, and the order will be automatically paid during the renewal. The value can be:

  • true: Automatic renewal is enabled.

  • false: Automatic renewal is disabled.

is_auto_pay

Boolean

Whether the order will be automatically paid after yearly/monthly instances are created. This parameter does not affect the payment mode of automatic renewal. The value can be:

  • true: The order will be automatically paid.

  • false: The order will be manually paid.

Status code: 400

Table 7 Response body parameters

Parameter

Type

Description

error_code

String

Error code.

error_msg

String

Error message.

Example Request

Querying details about a subscription task

https://{endpoint}/v5/054ba152d480d55b2f5dc0069e7ddef0/subscriptions/c7debc9c-8e09-4a5d-8dd6-cc44f78jb20r

Example Response

Status code: 200

{
  "id" : "a66f645f-ca53-4fe6-95c7-415bffb52b30",
  "name" : "DRS-12352",
  "ip" : "192.168.40.161",
  "enterprise_project_id" : "0",
  "status" : "CONFIGURATION",
  "created_time" : "1769850901972",
  "begin_time" : null,
  "now_time" : "1769869904969",
  "subscription_data_type" : {
    "is_dml_subscribed" : true,
    "is_ddl_subscribed" : true
  },
  "source_endpoint" : {
    "db_instance_id" : "7e1124d2-c876-43a5-b7e9-6c893b946fdd",
    "ip" : "192.168.38.23",
    "type" : "mysql",
    "port" : 3306,
    "user_name" : "drsFull",
    "name" : "test-ha-src-56-migration-instance1"
  }
}

Status code: 400

Bad Request

{
  "error_code" : "DRS.10000023",
  "error_msg" : "program exception"
}

Status Codes

Status Code

Description

200

OK

400

Bad Request

For other statuses, see Status Code.

Error Code

For details, see Error Code.