GetOptimizeRun

Updated at:

Queries the status, errors, execution progress, type-related results, and artifact references of a specified run.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

agentloop:GetOptimizeRun

none

*OptimizeTask

acs:agentloop:{#regionId}:{#accountId}:agentspace/{#AgentSpaceName}/optimizetask/{#OptimizeTaskName}

None None

Request syntax

GET /agentspace/{agentSpace}/optimizetasks/{optimizeTaskName}/runs/{optimizeRunId} HTTP/1.1

Path Parameters

Parameter

Type

Required

Description

Example

agentSpace

string

No

The AgentSpace name.

my-agent-space

optimizeTaskName

string

No

The optimization task name.

efficiency-analysis

optimizeRunId

string

No

The execution instance ID.

or-20260812-0001

Request parameters

Parameter

Type

Required

Description

Example

No parameters required.

Response elements

Element

Type

Description

Example

object

The optimization task execution details.

requestId

string

The request ID.

9ACFB10A-1B2C-3D4E-5F6G-7H8I9J0K1L2M

optimizeRunId

string

The execution instance ID.

or-20260812-0001

optimizeTaskName

string

The optimization task name.

efficiency-analysis

type

string

The task type snapshot.

EfficiencyAnalysis

status

string

The execution status.

Succeeded

triggerType

string

The trigger type.

Scheduled

windowStartTime

integer

The start time of the analysis window in UNIX seconds.

1786432688000

windowEndTime

integer

The end time of the analysis window in UNIX seconds.

1786432690000

trajectoryCount

integer

The number of analyzed trajectories.

100

attemptCount

integer

The number of executed attempts.

1

maxAttempts

integer

The maximum number of attempts.

3

errorCode

string

The error code.

InternalError

errorMessage

string

The error message.

The optimize run failed.

currentStage

string

The current execution stage.

attribution

progress

object

The current execution progress. The fields are defined by the task type.

any

The value of a single field in the current execution progress. The fields are defined by the task type. This object can be empty if no progress information is provided.

{}

extra

object

The type-related information and immutable result references. For efficiency analysis, frozen outputBindings and tokenPublication release receipts are returned.

any

The value of a single field in the run type-related information. For example, preview indicates whether the run is a preview run.

false

createTime

string

The creation time.

2026-08-12T10:00:00Z

startTime

string

The first start time.

2026-08-12T10:00:01Z

finishTime

string

The completion time.

2026-08-12T10:01:00Z

Examples

Success response

JSON format

{
  "requestId": "9ACFB10A-1B2C-3D4E-5F6G-7H8I9J0K1L2M",
  "optimizeRunId": "or-20260812-0001",
  "optimizeTaskName": "efficiency-analysis",
  "type": "EfficiencyAnalysis",
  "status": "Succeeded",
  "triggerType": "Scheduled",
  "windowStartTime": 1786432688000,
  "windowEndTime": 1786432690000,
  "trajectoryCount": 100,
  "attemptCount": 1,
  "maxAttempts": 3,
  "errorCode": "InternalError",
  "errorMessage": "The optimize run failed.",
  "currentStage": "attribution",
  "progress": {
    "key": "{}"
  },
  "extra": {
    "key": "false"
  },
  "createTime": "2026-08-12T10:00:00Z",
  "startTime": "2026-08-12T10:00:01Z",
  "finishTime": "2026-08-12T10:01:00Z"
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.