Skip to main content

GetTaskStatus

Gets the status of a task.

Debug

You can run this API directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After a successful run, OpenAPI Explorer can automatically generate SDK code examples. Debug

Authorization information

The following table describes the authorization information for this API. You can use it in the Action element of a RAM policy statement to grant RAM users or RAM roles the permission to call this API. Details are as follows:
  • Action: the specific permission point.
  • Access level: the access level of each action. Valid values: Write, Read, or List.
  • Resource type: the resource types that support authorization for the action. Details are as follows:
    • For required resource types, an asterisk (*) is added as a prefix.
    • For actions that do not support resource-level authorization, All resources is used.
  • Condition key: the condition keys defined by the cloud service itself.
  • Related action: other permissions required to successfully perform the action. The caller must also have the permissions of the related actions for the operation to succeed.
ActionAccess levelResource typeCondition keyRelated action
dianjin:GetTaskStatusget
*All resources
*
    None
None

Request syntax

GET /{workspaceId}/api/task/status HTTP/1.1

Request parameters

NameTypeRequiredDescriptionExample value
workspaceIdstringYes

The workspace ID.

llm-xxxx
taskIdstringYes

The task ID.

17071319

Response parameters

NameTypeDescriptionExample value
object

ResultCode

costlong

The time consumed.

null
datastring

The response data, which is the task status.

  • invalid: Parameters/dependent resources are unavailable.
  • success: Completed.
  • evict: Canceled.
  • error: Failed.
  • running: Running.
  • pending: Queued.
running
dataTypestring

The data type.

null
errCodestring

The error code.

0
messagestring

The error message.

ok
requestIdstring

The request ID.

30F6AD44-F078-540D-B5A5-1E519C8E9E6D
successboolean

Indicates whether the request was successful.

true
timestring

The timestamp.

2024-04-24 11:54:34

Examples

Success response JSON format
{
  "cost": 0,
  "data": "running",
  "dataType": null,
  "errCode": 0,
  "message": "ok",
  "requestId": "30F6AD44-F078-540D-B5A5-1E519C8E9E6D",
  "success": true,
  "time": "2024-04-24 11:54:34"
}

Error codes

Visit the Error Center to view more error codes.