Skip to main content

RebuildTask

Rebuilds an existing task. You cannot rebuild tasks that are queued or currently executing.

Operation description

Before you use this API, make sure that you fully understand the billing methods and pricing of the Dianjin service. Prerequisites You have activated Alibaba Cloud Model Studio and the Dianjin service. You have obtained the workspaceId: obtain the workspace identifier.

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:RebuildTasknone
*All resources
*
    None
None

Request syntax

POST /{workspaceId}/api/task/rebuild HTTP/1.1

Request parameters

NameTypeRequiredDescriptionExample value
workspaceIdstringYes

The workspace ID.

llm-xxxxx
bodyobjectNo

The request body.

taskIdsarrayYes

A list of task IDs.

taskIdstringNo

A task ID.

3894763764

Response parameters

NameTypeDescriptionExample value
objectResultCode<List<Map<String, Object>>>
successbooleanIndicates whether the request was successful.true
dataTypestringThe data type.null
timestringThe timestamp.2024-04-24 11:54:34
errCodestringThe error code.0
messagestringThe error message.ok
dataarray<object>The response data.
dataobjectThe response result of the rebuild task operation. taskId indicates the task ID, status indicates the status of the operation (success indicates success, and error indicates failure), and message is the detailed information.
{
    "message": "任务正在执行中,不能重新构建",
    "taskId": "-253103935",
    "status": "error"
}
{ "message": "The task is being executed and cannot be rebuilt.", "taskId": "-253103935", "status": "error" }
requestIdstringThe request ID.EF4B5C9B-3BC8-5171-A47B-4C5CF3DC3258
costlongThe time consumed.null

Examples

Success response JSON format
{
  "success": true,
  "dataType": null,
  "time": "2024-04-24 11:54:34",
  "errCode": 0,
  "message": "ok",
  "data": [
    {
      "message": "任务正在执行中,不能重新构建",
      "taskId": -253103935,
      "status": "error"
    }
  ],
  "requestId": "EF4B5C9B-3BC8-5171-A47B-4C5CF3DC3258",
  "cost": 0
}

Error codes

Visit the Error Center to view more error codes.