Get Queued Task Status

This API helps you query the vCenter Chargeback Manager about the status of a queued task.


User Privilege

Any user can call this API.

Syntax

The syntax for calling this method is:

GET /<Base_Url>/queuedTask/{queuedTaskId}

For example, GET https://123.123.123.123/vCenter-CB/api/queuedTask/15

Request Parameters

This API does not need a request XML.

API Response

The API returns an XML that provides details about the queued reports.

XPath

Type

Min Occurs

Max occurs

Description

QueuedTasks/QueuedTask

 

1

1

Represents the queued tasks.

QueuedTasks/QueuedTask/@id

xs:int

1

1

ID of the queued task.

QueuedTasks/QueuedTask/@type

xs:string

1

1

Type of the task. For example, GENERATE_REPORT.

QueuedTasks/QueuedTask/Status

xs:string

1

1

Status of the operation. Valid values are QUEUED, READY, IN_PROGRESS, COMPLETED, ERROR.

QueuedTasks/QueuedTask/Progress

xs:double

1

1

Progress of the operation in percentage.

QueuedTasks/QueuedTask/CreatedOn

xs:long

1

1

The time when the task was created.

QueuedTasks/QueuedTask/ModifiedOn

xs:long

1

1

Date on which the queued request was last modified.

QueuedTasks/QueuedTask/Result

 

1

1

The contents of this element vary depending on the type of the task.

QueuedTasks/QueuedTask/Result/Report

 

1

1

Represents the report that is being generated.

QueuedTasks/QueuedTask/Result/Report/@id

xs:int

1

1

ID of the report that is being generated.

QueuedTasks/QueuedTask/Result/Hierarchy

 

1

1

Represents the hierarchy for which the report is being generated.

QueuedTasks/QueuedTask/Result/Hierarchy/@id

xs:int

1

1

ID of the hierarchy for which the report is being generated.

QueuedTasks/QueuedTask/Result/Hierarchy/Name

xs:string

1

1

Name of the hierarchy for which the report is being generated.

QueuedTasks/QueuedTask/Errors/

xs:int

0

unbounded

Provides details of any error in processing the request.

QueuedTasks/QueuedTask/Errors/Error/@majorErrorCode

xs:int

1

1

The class of the error. It represents the HTTP Status codes.

QueuedTasks/QueuedTask/Errors/Error/@minorErrorCode

xs:int

1

1

The API error code. For example, it can indicate that the connection to the database failed.

QueuedTasks/QueuedTask/Errors/Error/@message

xs:string

1

1

A one-line, human-readable message that describes the error that occurred.

A sample response is provided here.

Error Response

The following table explains the error codes displayed by the API.

Error code

Description

VCB_ERR_INVALID_QUEUED_TASK_ID

Task ID is invalid.