Help Center/ AI DataLake/ API Reference/ Flink APIs/ Flink Job Autoscaling Management/ Querying Flink Job Autoscaling Configuration
Updated on 2026-11-06 GMT+08:00

Querying Flink Job Autoscaling Configuration

Function

This API is used to query the current autoscaling configuration of a Flink job. This API is synchronous.

Calling Method

For details, see Calling APIs.

URI

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

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

Request Parameters

Table 2 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 3 Response body parameters

Parameter

Type

Description

autoscaling_policy

AutoscalingPolicyResponse object

Definition: Autoscaling configuration.

Table 4 AutoscalingPolicyResponse

Parameter

Type

Description

enabled

Boolean

Definition: Whether to enable autoscaling.

Range

  • true: Enable autoscaling.

  • false: Disable autoscaling.

vertex_max_parallelism

Integer

Definition: Maximum operator parallelism.

Range: 1 to 1,000.

quota_cpu

Integer

Definition: CPU quota (unit: millicores).

Range: 500 to 40,000,000.

quota_memory

Long

Definition: Memory quota (unit: MB).

Range: 2,048 to 81,920,000.

custom_config

Map<String,String>

Definition: User-defined autoscaling configuration parameters in key-value pairs, passed as job.autoscaler.* parameters supported by the Flink Kubernetes Operator. Up to 50 parameters are supported, each value is 1 to 1,024 characters.

sync_status

String

Definition: Synchronization status of the autoscaling configuration. If the configuration fails to be delivered, the status is set to FAILED. You can re-invoke the update API to deliver the configuration again.

Range

  • PENDING: Configuration saved but not yet delivered.

  • SYNCED: Configuration has been delivered successfully.

  • FAILED: Configuration delivery failed. Re-delivery is required.

Status code: 400

Table 5 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 6 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 7 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 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: 500

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.

Example Requests

Query the current autoscaling configuration of a job.

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

Example Responses

Status code: 200

{
  "autoscaling_policy" : {
    "enabled" : true,
    "vertex_max_parallelism" : 1000,
    "quota_cpu" : 4000,
    "quota_memory" : 8192,
    "custom_config" : {
      "job.autoscaler.target.utilization.max" : "0.8",
      "job.autoscaler.target.catch-up.duration" : "10 min"
    },
    "sync_status" : "SYNCED"
  }
}

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.