Compute
Elastic Cloud Server
Huawei Cloud Flexus
Bare Metal Server
Auto Scaling
Image Management Service
Dedicated Host
FunctionGraph
Cloud Phone Host
Huawei Cloud EulerOS
Networking
Virtual Private Cloud
Elastic IP
Elastic Load Balance
NAT Gateway
Direct Connect
Virtual Private Network
VPC Endpoint
Cloud Connect
Enterprise Router
Enterprise Switch
Global Accelerator
Management & Governance
Cloud Eye
Identity and Access Management
Cloud Trace Service
Resource Formation Service
Tag Management Service
Log Tank Service
Config
OneAccess
Resource Access Manager
Simple Message Notification
Application Performance Management
Application Operations Management
Organizations
Optimization Advisor
IAM Identity Center
Cloud Operations Center
Resource Governance Center
Migration
Server Migration Service
Object Storage Migration Service
Cloud Data Migration
Migration Center
Cloud Ecosystem
KooGallery
Partner Center
User Support
My Account
Billing Center
Cost Center
Resource Center
Enterprise Management
Service Tickets
HUAWEI CLOUD (International) FAQs
ICP Filing
Support Plans
My Credentials
Customer Operation Capabilities
Partner Support Plans
Professional Services
Analytics
MapReduce Service
Data Lake Insight
CloudTable Service
Cloud Search Service
Data Lake Visualization
Data Ingestion Service
GaussDB(DWS)
DataArts Studio
Data Lake Factory
DataArts Lake Formation
IoT
IoT Device Access
Others
Product Pricing Details
System Permissions
Console Quick Start
Common FAQs
Instructions for Associating with a HUAWEI CLOUD Partner
Message Center
Security & Compliance
Security Technologies and Applications
Web Application Firewall
Host Security Service
Cloud Firewall
SecMaster
Anti-DDoS Service
Data Encryption Workshop
Database Security Service
Cloud Bastion Host
Data Security Center
Cloud Certificate Manager
Edge Security
Situation Awareness
Managed Threat Detection
Blockchain
Blockchain Service
Web3 Node Engine Service
Media Services
Media Processing Center
Video On Demand
Live
SparkRTC
MetaStudio
Storage
Object Storage Service
Elastic Volume Service
Cloud Backup and Recovery
Storage Disaster Recovery Service
Scalable File Service Turbo
Scalable File Service
Volume Backup Service
Cloud Server Backup Service
Data Express Service
Dedicated Distributed Storage Service
Containers
Cloud Container Engine
SoftWare Repository for Container
Application Service Mesh
Ubiquitous Cloud Native Service
Cloud Container Instance
Databases
Relational Database Service
Document Database Service
Data Admin Service
Data Replication Service
GeminiDB
GaussDB
Distributed Database Middleware
Database and Application Migration UGO
TaurusDB
Middleware
Distributed Cache Service
API Gateway
Distributed Message Service for Kafka
Distributed Message Service for RabbitMQ
Distributed Message Service for RocketMQ
Cloud Service Engine
Multi-Site High Availability Service
EventGrid
Dedicated Cloud
Dedicated Computing Cluster
Business Applications
Workspace
ROMA Connect
Message & SMS
Domain Name Service
Edge Data Center Management
Meeting
AI
Face Recognition Service
Graph Engine Service
Content Moderation
Image Recognition
Optical Character Recognition
ModelArts
ImageSearch
Conversational Bot Service
Speech Interaction Service
Huawei HiLens
Video Intelligent Analysis Service
Developer Tools
SDK Developer Guide
API Request Signing Guide
Terraform
Koo Command Line Interface
Content Delivery & Edge Computing
Content Delivery Network
Intelligent EdgeFabric
CloudPond
Intelligent EdgeCloud
Solutions
SAP Cloud
High Performance Computing
Developer Services
ServiceStage
CodeArts
CodeArts PerfTest
CodeArts Req
CodeArts Pipeline
CodeArts Build
CodeArts Deploy
CodeArts Artifact
CodeArts TestPlan
CodeArts Check
CodeArts Repo
Cloud Application Engine
MacroVerse aPaaS
KooMessage
KooPhone
KooDrive
Help Center/ Document Database Service/ API Reference/ APIs V3.0 (Recommended)/ Task Management/ Obtaining Information About a Task with a Specified ID

Obtaining Information About a Task with a Specified ID

Updated on 2024-04-02 GMT+08:00

Description

This API is used to obtain information about a task with a specified ID in the task center.

Restrictions

  • Currently, only asynchronous tasks in the task center of DDS Community Edition within one month can be queried.
  • After a job is generated, it takes several seconds to query the job ID.
  • The following asynchronous tasks can be queried: creating an instance (single node, replica set, or cluster), scaling up storage, changing instance class, adding nodes, restarting a node/instance, performing a primary/standby switchover, changing a private IP address, changing a security group, changing a database port, binding or unbinding an EIP, switching the SSL mode, changing an AZ, enabling the shard/config IP address, creating a physical backup/snapshot backup, restoration to a new instance using a backup, point-in-time recovery, database/table-level restoration to a specified time point, and adding read replicas.

URI

  • URI format

    GET /v3/{project_id}/jobs?id={id}

  • URI example

    https://dds.ap-southeast-1.myhuaweicloud.com/v3/0549b4a43100d4f32f51c01c2fe4acdb/jobs?id=a9767ede-fe0f-4888-9003-e843a4c90514

Requests

Parameter description

Table 1 Request parameters

Name

Type

IN

Mandatory

Description

X-Auth-Token

string

header

Yes

User token obtained from IAM. For details, see Authentication.

project_id

string

path

Yes

Project ID of a tenant in a region. To obtain the project ID, see Obtaining a Project ID.

id

string

query

Yes

The task ID.

Responses

  • Normal response
    Table 2 Parameter description

    Name

    Type

    Mandatory

    Description

    job

    Object

    Yes

    Task information. For details, see Table 3.

    Table 3 job field data structure description

    Name

    Type

    Mandatory

    Description

    id

    String

    Yes

    Task ID

    name

    String

    Yes

    Task name

    status

    String

    Yes

    Task execution status

    Valid value:
    • Running: The task is being executed.
    • Completed: The task is successfully executed.
    • Failed: The task fails to be executed.

    created

    String

    Yes

    Creation time in the "yyyy-mm-ddThh:mm:ssZ" format.

    T is the separator between the calendar and the hourly notation of time. Z indicates the time zone offset.

    ended

    String

    Yes

    End time in the "yyyy-mm-ddThh:mm:ssZ" format.

    T is the separator between the calendar and the hourly notation of time. Z indicates the time zone offset.

    progress

    String

    Yes

    Task execution progress

    NOTE:

    The execution progress (such as "60%", indicating the task execution progress is 60%) is displayed only when the task is being executed. Otherwise, "" is returned.

    instance

    Object

    Yes

    Instance on which the task is executed.

    For details, see Table 4.

    fail_reason

    String

    Yes

    Task failure information.

    Table 4 instance field data structure description

    Name

    Type

    Mandatory

    Description

    id

    String

    Yes

    Instance ID

    name

    String

    Yes

    DB instance name

    NOTE:

    In the response example, some tasks in the task center are used as examples.

  • Normal response example

    A task is successfully executed.

    {
      "job": {
        "id": "f85104b5-4a9c-4e0f-9505-fc5409d8f7ae",
        "name": "Create_MongoDB",
        "status": "Completed",
        "created": "2021-07-12T09:22:04+0000",
        "ended": "2021-07-12T10:10:13+0000",
        "progress": "",
        "instance": {
          "id": "d87f5b33049144ec95f0cab0a5f22cfbin02",
          "name": "dds-5ff4-sh"
        },
        "fail_reason": null
      }
    }

    A task is being executed:

    {
      "job": {
        "id": "9d10bfd1-affb-49c3-b977-298950a8d6fa",
        "name": "Create_MongoDB",
        "status": "Running",
        "created": "2021-07-13T07:28:43+0000",
        "ended": "2021-07-13T07:28:53+0000",
        "progress": "9%",
        "instance": {
          "id": "cf538a2dd8ec4b26860b27060902712fin02",
          "name": "dds-3a98-wcc"
        },
        "fail_reason": null
      }
    }

    A task fails to be executed:

    {
      "job": {
        "id": "a03b1b8a-b756-467c-8a49-38720c3d23ec",
        "name": "Restore_MongoDB_Replica",
        "status": "Failed",
        "created": "2021-07-13T04:55:58+0000",
        "ended": "2021-07-13T05:20:04+0000",
        "progress": "",
        "instance": {
          "id": "7beb15d5db9c4742b7c817789244844ein02",
          "name": "lenn-v3-restore-4"
        },
    "fail_reason": "Failed to upgrade the DB Agent."
      }
    }

SDK

Click Document Database Service DDS SDK to download the SDK or view the SDK document. To learn how to install and authenticate an SDK, read the Usage section.

Status Code

For more information, see Status Code.

Error Code

For more information, see Error Code.

We use cookies to improve our site and your experience. By continuing to browse our site you accept our cookie policy. Find out more

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback