Updated on 2026-11-06 GMT+08:00

Querying Flink Job Autoscaling History

Function

This API is used to query the autoscaling history of a Flink job, including detailed information about each scale-out and scale-in operation. This API is synchronous and supports paginated queries.

Calling Method

For details, see Calling APIs.

URI

GET /v2/workspaces/{workspace_id}/flink-jobs/{job_id}/autoscaling-histories

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

workspace_id

Yes

String

Definition: Workspace ID, used for resource isolation. For details about how to obtain the workspace ID, see Obtaining a Workspace ID.

Constraints: N/A

Range: 32 to 36 characters. Only letters, digits, and hyphens (-) are allowed.

Default Value: N/A

job_id

Yes

String

Definition: Flink job ID, used to uniquely identify a Flink job. For details, see Listing Flink Jobs.

Constraints: N/A

Range: UUIDv7 format, fixed at 36 characters.

Default Value: N/A

Table 2 Query Parameters

Parameter

Mandatory

Type

Description

offset

No

Integer

Definition: Index offset, used for pagination, starting from 0.

Constraints: N/A

Range: An integer from 0 to 100,000.

Default Value: 0

limit

No

Integer

Definition: Number of records to return, used for pagination.

Constraints: N/A

Range: An integer from 1 to 1,000.

Default Value: 100.

Request Parameters

Table 3 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

Definition: User token, used for API authentication and authorization. It can be obtained by calling the Obtaining an IAM User Token API.

Constraints: N/A

Range: Up to 65,534 characters.

Default Value: N/A

Response Parameters

Status code: 200

Table 4 Response body parameters

Parameter

Type

Description

autoscaling_histories

Array of AutoscalingHistory objects

Definition: Autoscaling history record list.

count

Integer

Definition: Total number of autoscaling history records.

Range: N/A

Table 5 AutoscalingHistory

Parameter

Type

Description

tuning_id

String

Definition: Unique tuning record ID.

Range: UUID format, 36 characters.

job_id

String

Definition: Flink job ID.

Range: UUIDv7 format, 36 characters.

action_type

String

Definition: Autoscaling action type.

Range

  • SCALE_OUT: Scale-out (parallelism increases).

  • SCALE_IN: Scale-in (parallelism decreases).

tuning_message

String

Definition: Tuning message, an internationalized human-readable string. Programmatic parsing is not recommended.

Range: N/A

old_resource_setting

old_resource_setting object

Definition: Resource configuration before the change.

Range: N/A

new_resource_setting

new_resource_setting object

Definition: Resource configuration after the change.

Range: N/A

trigger_time

String

Definition: Time when the tuning was triggered, in ISO 8601 UTC format.

Range: N/A

Table 6 old_resource_setting

Parameter

Type

Description

parallelism

Map<String,Integer>

Definition: Parallelism of each operator before the change, where key is the operator ID and value is the parallelism.

Range: N/A

Table 7 new_resource_setting

Parameter

Type

Description

parallelism

Map<String,Integer>

Definition: Parallelism of each operator after the change, where key is the operator ID and value is the parallelism.

Range: N/A

Status code: 400

Table 8 Response body parameters

Parameter

Type

Description

error_code

String

Definition: Error code, used to identify a specific error type.

Range: 1 to 256 characters.

error_msg

String

Definition: Error message, used to explain the cause of an error.

Range: 1 to 1,024 characters.

solution_msg

String

Definition: Resolution suggestion, used to provide a solution for the error.

Range: 0 to 1,024 characters.

Status code: 401

Table 9 Response body parameters

Parameter

Type

Description

error_code

String

Definition: Error code, used to identify a specific error type.

Range: 1 to 256 characters.

error_msg

String

Definition: Error message, used to explain the cause of an error.

Range: 1 to 1,024 characters.

solution_msg

String

Definition: Resolution suggestion, used to provide a solution for the error.

Range: 0 to 1,024 characters.

Status code: 403

Table 10 Response body parameters

Parameter

Type

Description

error_code

String

Definition: Error code, used to identify a specific error type.

Range: 1 to 256 characters.

error_msg

String

Definition: Error message, used to explain the cause of an error.

Range: 1 to 1,024 characters.

solution_msg

String

Definition: Resolution suggestion, used to provide a solution for the error.

Range: 0 to 1,024 characters.

Status code: 404

Table 11 Response body parameters

Parameter

Type

Description

error_code

String

Definition: Error code, used to identify a specific error type.

Range: 1 to 256 characters.

error_msg

String

Definition: Error message, used to explain the cause of an error.

Range: 1 to 1,024 characters.

solution_msg

String

Definition: Resolution suggestion, used to provide a solution for the error.

Range: 0 to 1,024 characters.

Status code: 500

Table 12 Response body parameters

Parameter

Type

Description

error_code

String

Definition: Error code, used to identify a specific error type.

Range: 1 to 256 characters.

error_msg

String

Definition: Error message, used to explain the cause of an error.

Range: 1 to 1,024 characters.

solution_msg

String

Definition: Resolution suggestion, used to provide a solution for the error.

Range: 0 to 1,024 characters.

Example Requests

Query the autoscaling history of a job and return the last 10 records.

GET /v2/workspaces/{workspace_id}/flink-jobs/{job_id}/autoscaling-histories?offset=0&limit=10

Example Responses

Status code: 200

{
  "autoscaling_histories" : [ {
    "tuning_id" : "a1b2c3d4-e5f6-xxxx-xxxx-ef1234567890",
    "job_id" : "01a038e4-4be8-xxxx-xxxx-c306ca6d2ade",
    "action_type" : "SCALE_OUT",
    "old_resource_setting" : {
      "parallelism" : {
        "source" : 2,
        "filter" : 2
      }
    },
    "new_resource_setting" : {
      "parallelism" : {
        "source" : 4,
        "filter" : 4
      }
    },
    "tuning_message" : "Parallelism scaled out from 2 to 4 for dae3eb9dfe017c04da35c041f0e70581.",
    "trigger_time" : "2026-08-25T10:30:00.000+00:00"
  } ],
  "count" : 15
}

Status code: 400

{
  "error_code" : "AIDataLake.01011001",
  "error_msg" : "Invalid parameter",
  "solution_msg" : "Please check the input parameters according to the documentation."
}

Status code: 401

{
  "error_code" : "AIDataLake.01011003",
  "error_msg" : "Auth Token not exists in header",
  "solution_msg" : "Please check if auth Token is included in the request header."
}

Status code: 403

{
  "error_code" : "AIDataLake.01011005",
  "error_msg" : "Current account has no permission",
  "solution_msg" : "Please connect administrators to add permission."
}

Status code: 404

{
  "error_code" : "AIDataLake.01051001",
  "error_msg" : "Flink job 019f609a-e90c-xxxx-xxxx-a4ec9018e7f2 does not exist",
  "solution_msg" : "Please check if Flink job 019f609a-e90c-xxxx-xxxx-a4ec9018e7f2 is entered correctly or has been deleted."
}

Status code: 500

{
  "error_code" : "AIDataLake.01010001",
  "error_msg" : "Internal system error",
  "solution_msg" : "Contact operations for analysis."
}

Status Codes

Status Code

Description

200

Request succeeded.

400

Invalid request parameters.

401

Authentication failed.

403

Insufficient permissions.

404

The Flink job does not exist.

500

Internal system error.