Querying Subscription Tasks - ShowSubscriptionLists
Function
This API is used to query subscription tasks by enterprise project, engine type, network type, task status, task name, or 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
POST /v5/{project_id}/subscriptions
|
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. |
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
limit |
No |
Integer |
Maximum number of records that can be returned. The default value is 10. |
|
offset |
No |
Integer |
Offset. The records after this offset will be queried. The default value is 0. |
Request 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 response is returned, the value of X-Subject-Token in the response header is the token value. |
|
X-Language |
No |
String |
Request language type. Enumerated values: |
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
job_type |
Yes |
String |
Task scenario. |
|
engine_type |
No |
String |
Engine type. |
|
net_type |
No |
String |
Network type. |
|
name |
No |
String |
Task ID or name. |
|
status |
No |
String |
Task status. |
|
enterprise_project_id |
No |
String |
Enterprise project ID. Default value: "", indicating that tasks in all enterprise projects are queried. |
|
sort_key |
No |
String |
The keyword based on which the returned results are sorted. The default value is create_time. |
|
sort_dir |
No |
String |
Result sorting order. The value can be desc (descending order) or asc (ascending order). The default value is desc. |
|
instance_ids |
No |
Array of strings |
List of DB instance IDs. A maximum of 10 IDs are supported. |
|
instance_ip |
No |
String |
DB instance IP address. |
|
tags |
No |
Map<String,String> |
Tag. |
|
service_name |
No |
String |
Service name. |
|
description |
No |
String |
Description. |
|
is_billing |
No |
Boolean |
Billing mode. The value can be Yes, No, or All. If this parameter is left blank, the default value All is used. |
|
begin_at |
No |
String |
Consumption time. |
Response Parameters
Status code: 200
|
Parameter |
Type |
Description |
|---|---|---|
|
total_count |
Integer |
Total number of records in the list, which is irrelevant to pagination. |
|
jobs |
SubscriptionListResp object |
Task information list. |
|
Parameter |
Type |
Description |
|---|---|---|
|
id |
String |
Task ID. |
|
name |
String |
Task name. |
|
status |
String |
Task status. |
|
create_time |
String |
Time when a task is created. |
|
begin_time |
String |
Consumption start time. |
|
description |
String |
Task description. |
|
now_time |
String |
Current time. |
|
job_action |
JobActions object |
The collection of task operation commands. |
|
enterprise_project_id |
String |
Enterprise project ID. |
Status code: 400
|
Parameter |
Type |
Description |
|---|---|---|
|
error_code |
String |
Error code. |
|
error_msg |
String |
Error message. |
Example Requests
Querying the subscription task list
https://{endpoint}/v5/054ba152d480d55b2f5dc0069e7ddef0/subscriptions?limit=10&offset=0
{
"db_use_type" : "subscription",
"engine_type" : "",
"net_type" : "",
"status" : "",
"sort_key" : "",
"sort_dir" : "",
"enterprise_project_id" : "",
"is_billing" : "false",
"begin_at" : "",
"description" : ""
}
Example Responses
Status code: 200
OK
{
"total_count" : 2,
"jobs" : [ {
"id" : "a24fd980-92cb-4fbb-ab0a-34815115b14d",
"name" : "DRS-4885",
"status" : "CONFIGURATION",
"create_time" : "1764225816102",
"begin_time" : null,
"description" : null,
"now_time" : "1764300104574",
"job_action" : {
"available_actions" : [ "FREE_RESOURCE", "PRE_CHECK", "MODIFY_CONFIGURATION", "CHANGE" ],
"unavailable_actions" : [ "CREATE", "START", "CHOOSE_OBJECT", "RETRY", "RESET", "DELETE", "QUERY_PRE_CHECK", "CHANGE_MODE", "MODIFY_DB_CONFIG", "SWITCH_OVER", "RESET_DB_PWD", "PAUSE", "JUMP_RETRY", "START_INCR", "MODIFY_TASK_NUMBER", "CONTINUE_JOB", "STOP_JOB", "CONTINUE_CAPTURE", "STOP_CAPTURE", "CONTINUE_APPLY", "API_CONFIGURATION_ACTION", "STOP_APPLY", "PAY_ORDER", "UNSUBSCRIBE", "TO_PERIOD", "TO_RENEW", "ORDER_INFO", "CLONE" ],
"current_action" : null
},
"enterprise_project_id" : "0"
}, {
"id" : "09f1b3a6-e69f-4f07-aad9-1dd6b40b0d87",
"name" : "DRS-8845",
"status" : "STARTJOBING",
"createtime" : "1758857715673",
"begintime" : "1758859045000",
"description": "RDS instance name: Auto-Single-src-57-dr-1",
"nowtime" : "1764300104574",
"job_action" : {
"available_actions" : [ "FREE_RESOURCE", "PRE_CHECK", "MODIFY_CONFIGURATION", "CHANGE" ],
"unavailable_actions" : [ "CREATE", "START", "CHOOSE_OBJECT", "RETRY", "RESET", "DELETE", "QUERY_PRE_CHECK", "CHANGE_MODE", "MODIFY_DB_CONFIG", "SWITCH_OVER", "RESET_DB_PWD", "PAUSE", "JUMP_RETRY", "START_INCR", "MODIFY_TASK_NUMBER", "CONTINUE_JOB", "STOP_JOB", "CONTINUE_CAPTURE", "STOP_CAPTURE", "CONTINUE_APPLY", "API_CONFIGURATION_ACTION", "STOP_APPLY", "PAY_ORDER", "UNSUBSCRIBE", "TO_PERIOD", "TO_RENEW", "ORDER_INFO", "CLONE" ],
"current_action" : null
},
"enterprise_project_id" : "0"
} ]
}
Status code: 400
Bad Request
{
"error_code" : "DRS.10000001",
"error_msg" : "Failed."
}
Status Code
|
Status Code |
Description |
|---|---|
|
200 |
OK |
|
400 |
Bad Request |
Error Code
For details, see Error Code.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot