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

Listing Flink Jobs

Function

This API is used to list Flink jobs under a workspace. This API is synchronous. The response contains summary information of the jobs. Pagination and multi-condition filtering are supported.

For complete information about a specific job, see View Flink Job Details.

Calling Method

For details, see Calling APIs.

URI

GET /v2/workspaces/{workspace_id}/flink-jobs

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

Table 2 Query Parameters

Parameter

Mandatory

Type

Description

marker

No

String

Definition: Pagination cursor, used to specify the starting position for the current query.

Constraints: Leave it empty or pass an empty string for the first query. To page backward to earlier data (page_reverse: false), pass the next_marker from the previous response. To page forward to newer data (page_reverse: true), pass the previous_marker from the previous response. In the latter case, this parameter is mandatory.

Range: UUID format, 36 characters. Only letters, digits, underscores (_), and hyphens (-) are supported.

Default Value: N/A

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.

page_reverse

No

Boolean

Definition: Pagination direction, used to control the page turning direction.

Constraints: Used together with the marker parameter. When page_reverse=true, the marker parameter must be passed. Otherwise, a 400 error is returned.

Range

  • true: Page forward (data before marker is queried).

  • false: Page backward (data after marker is queried).

Default Value: false

create_time_after

No

Long

Definition: Start time for filtering (inclusive), used to filter by creation time.

Constraints: N/A

Range: 0 to 4,102,416,000,000, 13-digit millisecond timestamp.

Default Value: N/A

create_time_before

No

Long

Definition: End time for filtering (inclusive), used to filter by creation time.

Constraints: N/A

Range: 0 to 4,102,416,000,000, 13-digit millisecond timestamp.

Default Value: N/A

endpoint_id

No

String

Definition: Endpoint ID of the job, used to filter jobs by endpoint.

Constraints: N/A

Range: UUID format, fixed at 36 characters.

Default Value: N/A

endpoint_name

No

String

Definition: Endpoint name of the job, used to filter jobs by endpoint. It can be obtained by calling the Listing Endpoints or Listing All Endpoints API.

Constraints: N/A

Range: 1 to 63 characters. Only lowercase letters, digits, and hyphens (-) are allowed. It must start with a lowercase letter and end with a lowercase letter or digit.

Default Value: N/A

name

No

String

Definition: Job name, used to filter jobs by fuzzy name matching.

Constraints: N/A

Range: 1 to 128 characters. Must start and end with a letter or digit. Only letters, digits, underscores (_), and hyphens (-) are allowed.

Default Value: N/A

job_id

No

String

Definition: Flink job ID, used to filter jobs by job ID. It can be obtained from the response of Creating a Flink Job.

Constraints: N/A

Range: UUIDv7 format, fixed at 36 characters.

Default Value: N/A

deployment_id

No

String

Definition: Deployed job ID, used to filter jobs by deployment ID.

Constraints: N/A

Range: 1 to 64 characters. Only letters, digits, underscores (_), and hyphens (-) are allowed.

Default Value: N/A

state

No

Array of strings

Definition: Flink job status, used to filter the job list by status. The array elements are FlinkJobState enum values:

  • CREATED: Created.

  • STARTING: Starting.

  • RUNNING: Running.

  • CANCELLING: Canceling.

  • FAILED: Failed.

  • CANCELLED: Canceled.

  • FINISHED: Finished.

Constraints: N/A

job_type

No

String

Definition: Job type, used to filter the list by job type.

Constraints: N/A

Range

  • FLINK_SQL_JOB: SQL job.

  • FLINK_JAR_JOB: Jar job.

Default Value: N/A

execution_mode

No

String

Definition: Execution mode, used to filter the job list by execution mode.

Constraints: N/A

Range

  • STREAMING: Streaming mode.

  • BATCH: Batch mode.

Default Value: N/A

create_user_id

No

String

Definition: Creator user ID (same as the IAM user ID), used to filter jobs by creator. For details, see Obtaining an Account ID.

Constraints: N/A

Range: 1 to 256 characters. Only letters and digits are allowed.

Default Value: N/A

labels

No

Array of strings

Definition: Tag filter criteria, used to filter jobs by tags. Format: key=value. Multiple tags are supported.

Constraints: Up to 10 tags.

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

page_info

MarkerPageInfo object

Definition: Pagination cursor information.

jobs

Array of FlinkJobSummary objects

Definition: Detailed Flink job list, containing 0 to 1,000 FlinkJobSummary objects.

Table 5 MarkerPageInfo

Parameter

Type

Description

next_marker

String

Definition: Cursor for paging backward to earlier data, used to obtain data created earlier than the current page. A null value indicates no earlier data.

Range: UUID format, 36 characters. Example: 6c98db52-cac2-xxxx-xxxx-b7793e95557d.

previous_marker

String

Definition: Cursor for paging forward to newer data, used together with page_reverse set to true to obtain data created later than the current page. A null value indicates that the current page is already the latest.

Range: UUID format, 36 characters. Example: 6c98db52-cac2-xxxx-xxxx-b7793e95557d.

current_count

Integer

Definition: Number of data items on the current page, used to identify the amount of data returned in the current response.

Range: Integer greater than or equal to 0. Maximum value: 1000.

Table 6 FlinkJobSummary

Parameter

Type

Description

job_id

String

Definition: Flink job ID.

Range: UUIDv7 format, fixed at 36 characters. Only lowercase letters, digits, and hyphens (-) are allowed.

name

String

Definition: Job name.

Range: 1 to 128 characters. Must start and end with a letter or digit. Only letters, digits, underscores (_), and hyphens (-) are allowed.

endpoint_id

String

Definition: Endpoint ID for job execution.

Range: UUID format, fixed at 36 characters.

endpoint_name

String

Definition: Endpoint name for job execution.

Range: 1 to 63 characters. Only lowercase letters, digits, and hyphens (-) are allowed. It must start with a lowercase letter and end with a lowercase letter or digit.

job_type

String

Definition: Job type.

Range

  • FLINK_JAR_JOB: Jar job.

  • FLINK_SQL_JOB: SQL job.

status

FlinkJobStatus object

Definition: Job status information, including the status value and status message.

execution_mode

String

Definition: Execution mode, used to specify the Flink job execution mode.

Range

  • STREAMING: Streaming mode.

  • BATCH: Batch mode.

metric

FlinkResourceMetric object

Definition: Job metric information, including CPU, memory, and disk usage.

create_time

Long

Definition: Creation timestamp.

Range: 0 to 4,102,416,000,000, 13-digit millisecond timestamp.

create_user

FlinkCreateUser object

Definition: Creator information.

update_time

Long

Definition: Update timestamp.

Range: 0 to 4,102,416,000,000, 13-digit millisecond timestamp.

update_user

FlinkUpdateUser object

Definition: Updater information.

log_url

String

Definition: Log archive path (OBS URL), used to view job execution logs.

Range: OBS URL format, 1 to 1,024 characters.

description

String

Definition: Job description.

Range: 1 to 512 characters.

start_time

Long

Definition: Job start timestamp (time when the job entered the RUNNING state).

Range: 0 to 4,102,416,000,000, 13-digit millisecond timestamp.

end_time

Long

Definition: Job end timestamp (time when the job entered the FINISHED, CANCELLED, or FAILED state).

Range: 0 to 4,102,416,000,000, 13-digit millisecond timestamp.

Table 7 FlinkJobStatus

Parameter

Type

Description

state

String

Definition: Current job status.

Range

  • CREATED: Created.

  • STARTING: Starting.

  • RUNNING: Running.

  • CANCELLING: Canceling.

  • FAILED: Failed.

  • CANCELLED: Canceled.

  • FINISHED: Finished.

state_message

String

Definition: Status message details, including supplementary information or error details for status changes.

Range: 0 to 1,024 characters.

Table 8 FlinkResourceMetric

Parameter

Type

Description

total_memory

Long

Definition: Total memory, in MB.

Range: 0 to 9,223,372,036,854,775,807.

total_cpu

Long

Definition: Total number of CPUs, in millicores.

Range: 0 to 9,223,372,036,854,775,807.

total_disk

Long

Definition: Total disk capacity, in GB.

Range: 0 to 9,223,372,036,854,775,807.

Table 9 FlinkCreateUser

Parameter

Type

Description

user_id

String

Definition: Creator user ID, used to identify the creator of the job.

Range: 1 to 128 characters. Only letters and digits are allowed.

user_name

String

Definition: Creator username, used to display the name of the job creator.

Range: 0 to 128 characters.

Table 10 FlinkUpdateUser

Parameter

Type

Description

user_id

String

Definition: Updater user ID, used to identify the updater of the job.

Range: 1 to 128 characters. Only letters and digits are allowed.

user_name

String

Definition: Updater user name, used to display the name of the job updater.

Range: 0 to 128 characters.

Status code: 400

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: 401

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.

Status code: 403

Table 13 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 14 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

  • List running Flink jobs in the workspace, with a maximum of 10 records per page.

    GET /v2/workspaces/{workspace_id}/flink-jobs?limit=10&state=RUNNING
  • List SQL jobs in streaming mode in the workspace, with a maximum of 20 records per page.

    GET /v2/workspaces/{workspace_id}/flink-jobs?limit=20&job_type=FLINK_SQL_JOB&execution_mode=STREAMING

Example Responses

Status code: 200

  • List running Flink jobs in the workspace, with a maximum of 10 records per page.

    {
      "page_info" : {
        "current_count" : 1
      },
      "jobs" : [ {
        "job_id" : "019f609a-e90c-xxxx-xxxx-a4ec9018e7f2",
        "name" : "test-flink-job",
        "endpoint_id" : "4702a179-xxxx-xxxx-81c3-6cd4d8090671",
        "endpoint_name" : "test-endpoint",
        "job_type" : "FLINK_JAR_JOB",
        "status" : {
          "state" : "RUNNING"
        },
        "execution_mode" : "STREAMING",
        "metric" : {
          "total_cpu" : 2000,
          "total_memory" : 8192,
          "total_disk" : 60
        },
        "create_time" : 1705896000000,
        "create_user" : {
          "user_id" : "1001",
          "user_name" : "testuser"
        },
        "update_time" : 1705896000000,
        "update_user" : {
          "user_id" : "1001",
          "user_name" : "testuser"
        },
        "log_url" : "obs://my-flink-bucket/aidatalake/workspace_57fd5733-xxxx-xxxx-85a9-c6e7f39b1891/flink/endpoint_4702a179-xxxx-xxxx-81c3-6cd4d8090671/jobs/logs/019f609a-e90c-xxxx-xxxx-a4ec9018e7f2",
        "description" : "Test Flink job.",
        "start_time" : 1705897000000,
        "end_time" : 0
      } ]
    }
  • List SQL jobs in streaming mode in the workspace, with a maximum of 20 records per page.

    {
      "page_info" : {
        "current_count" : 1
      },
      "jobs" : [ {
        "job_id" : "019f609b-f80d-xxxx-xxxx-b5ec9018e7f3",
        "name" : "test-sql-streaming-job",
        "endpoint_id" : "4702a179-xxxx-xxxx-81c3-6cd4d8090671",
        "endpoint_name" : "test-endpoint",
        "job_type" : "FLINK_SQL_JOB",
        "status" : {
          "state" : "FAILED",
          "state_message" : "START TIMEOUT"
        },
        "execution_mode" : "STREAMING",
        "metric" : {
          "total_cpu" : 2000,
          "total_memory" : 8192,
          "total_disk" : 60
        },
        "create_time" : 1705896000000,
        "create_user" : {
          "user_id" : "1001",
          "user_name" : "testuser"
        },
        "update_time" : 1705896000000,
        "update_user" : {
          "user_id" : "1001",
          "user_name" : "testuser"
        },
        "log_url" : "obs://my-flink-bucket/aidatalake/workspace_57fd5733-xxxx-xxxx-85a9-c6e7f39b1891/flink/endpoint_4702a179-xxxx-xxxx-81c3-6cd4d8090671/jobs/logs/019f609b-f80d-xxxx-xxxx-b5ec9018e7f3",
        "description" : "Test SQL streaming mode job.",
        "start_time" : 0,
        "end_time" : 1705898180816
      } ]
    }

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: 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.

500

Internal system error.