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

Querying Task Status

Updated on 2024-03-26 GMT+08:00

Function

This API is used to query the execution status of tasks, such as the status of disk creation, capacity expansion, and deletion.

URI

  • URI format

    GET /v1/{project_id}/jobs/{job_id}

  • Parameter description

    Parameter

    Mandatory

    Description

    project_id

    Yes

    Specifies the project ID.

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

    job_id

    Yes

    Specifies the task ID.

Request

The following example shows how to query the status of the task whose task ID is ff808081692a62c70169b4dcf9514264.

  • Example request
     GET https://{endpoint}/v1/{project_id}/jobs/ff808081692a62c70169b4dcf9514264

Response

  • Parameter description

    Parameter

    Type

    Description

    status

    String

    Specifies the task status.

    • SUCCESS: The task is successfully executed.
    • RUNNING: The task is in progress.
    • FAIL: The task fails.
    • INIT: The task is being initialized.

    entities

    Object

    Specifies the response to the task. For details, see •Parameters in the entities field.

    The content for each type of task is different.

    job_id

    String

    Specifies the task ID.

    job_type

    String

    Specifies the task type.

    • createVolume: creates a disk.
    • batchCreateVolume: batch creates disks.
    • deleteVolume: deletes a disk.
    • extendVolume: expands the disk capacity.
    • bulkDeleteVolume: batch deletes disks.
    • deleteSingleVolume: deletes disks one by one during a batch deletion.

    begin_time

    String

    Specifies the time when the task was started.

    Time format: YYYY-MM-DDTHH:MM:SS.SSS'Z'

    end_time

    String

    Specifies the time when the task finished.

    Time format: YYYY-MM-DDTHH:MM:SS.SSS'Z'

    error_code

    String

    Specifies the returned error code when the task execution fails.

    fail_reason

    String

    Specifies the cause of the task execution failure.

    error

    Object

    Specifies the error message returned when an error occurs. For details, see Parameters in the error field.

  • Parameter in the entities field

    Parameter

    Type

    Description

    name

    String

    Specifies the EVS disk name.

    size

    Integer

    Specifies the disk size, in GB.

    sub_jobs

    Array of Objects

    Specifies the information about a sub-job. For details, see •Parameters in the sub_jobs field.

    volume_id

    String

    Specifies the disk ID.

    volume_type

    String

    Specifies the disk type.

  • Parameters in the sub_jobs field

    Parameter

    Type

    Description

    status

    String

    Specifies the task status.

    • SUCCESS: The task is successfully executed.
    • RUNNING: The task is in progress.
    • FAIL: The task fails.
    • INIT: The task is being initialized.

    entities

    Object

    Specifies the response to the task. For details, see •Parameters in the entities field.

    The content for each type of task is different.

    job_id

    String

    Specifies the task ID.

    job_type

    String

    Specifies the task type.

    • createVolume: creates a disk.
    • batchCreateVolume: batch creates disks.
    • deleteVolume: deletes a disk.
    • extendVolume: expands the disk capacity.
    • bulkDeleteVolume: batch deletes disks.
    • deleteSingleVolume: deletes disks one by one during a batch deletion.

    begin_time

    String

    Specifies the time when the task was started.

    Time format: YYYY-MM-DDTHH:MM:SS.SSS'Z'

    end_time

    String

    Specifies the time when the task finished.

    Time format: YYYY-MM-DDTHH:MM:SS.SSS'Z'

    error_code

    String

    Specifies the returned error code when the task execution fails.

    fail_reason

    String

    Specifies the cause of the task execution failure.

  • Parameter in the entities field

    Parameter

    Type

    Description

    name

    String

    Specifies the EVS disk name.

    size

    Integer

    Specifies the disk size, in GB.

    volume_id

    String

    Specifies the disk ID.

    volume_type

    String

    Specifies the disk type.

  • Parameters in the error field

    Parameter

    Type

    Description

    message

    String

    The error message returned if an error occurs.

    code

    String

    The error code returned if an error occurs.

    For details about the error code, see Error Codes.

  • Example response
    {
        "status": "RUNNING", 
        "entities": {
            "volume_id": "bdf1bb37-f20f-4266-9a04-f43e0a127376"
        }, 
        "job_id": "4010a32d535527910153552b492c0002", 
        "job_type": "createVolume", 
        "begin_time": "2016-03-08T07:40:13.219Z", 
        "end_time": "", 
        "error_code": null, 
        "fail_reason": null
    }

    or

    {
        "status": "SUCCESS", 
        "entities": {
            "sub_jobs": [
                {
                    "status": "SUCCESS", 
                    "entities": {
                        "volume_id": "0b549095-4937-4849-8e4c-52aa027d64f7"
                    }, 
                    "job_id": "21917a8d52a19b040152a9f2f2e50041", 
                    "job_type": "createVolume", 
                    "begin_time": "2016-02-04T01:43:37.445Z", 
                    "end_time": "2016-02-04T01:44:02.239Z", 
                    "error_code": null, 
                    "fail_reason": null
                }, 
                {
                    "status": "SUCCESS", 
                    "entities": {
                        "volume_id": "e7bca1a2-d3ed-434f-86f4-a1f11aa80072"
                    }, 
                    "job_id": "21917a8d52a19b040152a9f2f2f60042", 
                    "job_type": "createVolume", 
                    "begin_time": "2016-02-04T01:43:37.462Z", 
                    "end_time": "2016-02-04T01:44:02.245Z", 
                    "error_code": null, 
                    "fail_reason": null
                }
            ]
        }, 
        "job_id": "21917a8d52a19b040152a9f2f1eb003e", 
        "job_type": "batchCreateVolume", 
        "begin_time": "2016-02-04T01:43:37.193Z", 
        "end_time": "2016-02-04T01:44:08.283Z", 
        "error_code": null, 
        "fail_reason": null
    }

    or

    {
        "error": {
            "message": "XXXX", 
            "code": "XXX"
        }
    }

Status Codes

  • Normal

    200

Error Codes

For details, see Error Codes.

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