Updated on 2025-08-06 GMT+08:00

Listing Jobs

Function

This API is used to list the current user's jobs. You can set the job ID as the ID and query jobs whose IDs are greater than or less than the ID. You can also query jobs in specific status, for example, in running status or other. By default, all jobs are queried.

URI

  • URI format

    GET /v1.0/{project_id}/streaming/jobs

  • Parameter description
    Table 1 URI parameter

    Parameter

    Mandatory

    Type

    Description

    project_id

    Yes

    String

    Definition

    Project ID, which is used for resource isolation. For how to obtain a project ID, see Obtaining a Project ID.

    Example: 48cc2c48765f481480c7db940d6409d1

    Constraints

    None

    Range

    The value can contain up to 64 characters. Only letters and digits are allowed.

    Default Value

    None

    Table 2 query parameter description

    Parameter

    Mandatory

    Type

    Description

    job_type

    No

    String

    Definition

    Job type

    Constraints

    None

    Range

    • flink_sql_job: Flink SQL job
    • flink_opensource_sql_job: Flink OpenSource SQL job
    • flink_jar_job: User-defined Flink job

    Default Value

    None

    status

    No

    String

    Definition

    Job status

    Constraints

    None

    Range

    • job_init: The job is in the draft status.
    • job_submitting: The job is being submitted.
    • job_submit_fail: The job fails to be submitted.
    • job_running: The job is running. (The billing starts. After the job is submitted, a normal result is returned.)
    • job_running_exception (The billing stops. The job stops running due to an exception.)
    • job_downloading: The job is being downloaded.
    • job_idle: The job is idle.
    • job_canceling: The job is being stopped.
    • job_cancel_success: The job has been stopped.
    • job_cancel_fail: The job fails to be stopped.
    • job_savepointing: The savepoint is being created.
    • job_arrearage_stopped: The job is stopped because the account is in arrears. (The billing ends. The job is stopped because the user account is in arrears.)
    • job_arrearage_recovering: The recharged job is being restored. (The account in arrears is recharged, and the job is being restored).
    • job_finish: The job is completed.

    Default Value

    None

    queue_name

    No

    String

    Definition

    Queue name

    Constraints

    None

    Range

    None

    Default Value

    None

    order

    No

    String

    Definition

    Sorting style of the query results.

    Constraints

    None

    Range

    • asc: by time in ascending order
    • desc: by time in descending order

    Default Value

    The default value is desc.

    limit

    No

    Integer

    Definition

    Number of returned data records

    Constraints

    The maximum value is 100.

    Range

    0-100

    Default Value

    The default value is 10.

    name

    No

    String

    Definition

    Job name

    Constraints

    The value can contain 0 to 57 characters.

    Range

    None

    Default Value

    None

    offset

    No

    Integer

    Definition

    Job offset.

    Constraints

    None

    Range

    None

    Default Value

    None

    show_detail

    No

    Boolean

    Definition

    Whether to return job details. The default value is false. If this parameter is set to true, the job details are returned. For details, see Querying Job Details.

    Constraints

    None

    Range

    None

    Default Value

    false

    user_name

    No

    String

    Definition

    Username, which can be used as a filter

    Constraints

    None

    Range

    None

    Default Value

    None

    tags

    No

    String

    Definition

    Specifies a label for filtering.

    Constraints

    None

    Range

    None

    Default Value

    None

Request Parameters

None

Response Parameters

Table 3 Response parameters

Parameter

Mandatory

Type

Description

is_success

No

String

Definition

Whether the request is successfully executed

Range

true indicates that the request is successfully executed.

false indicates that the request fails to be executed.

message

No

String

Definition

System prompt. If the execution succeeds, this parameter is left blank.

Range

None

job_list

No

Object

Definition

Information about a job list. For details, see Table 4.

Range

None

Table 4 job_list parameters

Parameter

Mandatory

Type

Description

total_count

No

Integer

Definition

Number of records in the query result

Range

None

jobs

No

Array of objects

Definition

Information about a job. For details, see Table 5.

Range

None

Table 5 Jobs parameters

Parameter

Mandatory

Type

Description

job_id

No

Long

Definition

Job ID

Range

None

name

No

String

Definition

Name of the job.

Range

The value can contain 0 to 57 characters.

desc

No

String

Definition

Job description.

Range

The value can contain 0 to 512 characters.

user_name

No

String

Definition

Username. This parameter is valid only when show_detail is set to false.

Range

The value can contain up to 128 characters.

job_type

No

String

Definition

Job type

Range

  • flink_sql_job: Flink SQL job
  • flink_opensource_sql_job: Flink open-source SQL job
  • flink_jar_job: User-defined Flink job

status

No

String

Definition

Job status.

Range

  • job_init: The job is in the draft state.
  • job_submitting: The job is being submitted.
  • job_submit_fail: The job fails to be submitted.
  • job_running: The job is running.
  • job_running_exception: The job is running abnormally.
  • job_downloading: The job is being downloaded.
  • job_idle: The job is idle.
  • job_canceling: The job is being stopped.
  • job_cancel_success: The job has been stopped.
  • job_cancel_fail: The job fails to be stopped.
  • job_savepointing: A savepoint is being created.
  • job_arrearage_stopped: The job is stopped due to arrears.
  • job_arrearage_recovering: The job in arrears is being restored.
  • job_finish: The job is completed.

status_desc

No

String

Definition

Description of job status.

Range

None

create_time

No

Long

Definition

Time when a job is created. Example: 1516952770835

Range

An integer greater than or equal to 0

start_time

No

Long

Definition

Time when a job is started. The value 0 indicates that the process is not started.

Example: 1516952710740

Range

An integer greater than or equal to 0

duration

No

Long

Definition

Running duration of a job. Unit: ms. This parameter is valid only when show_detail is set to false.

Range

An integer greater than or equal to 0

root_id

No

Long

Definition

Parent job ID. This parameter is valid only when show_detail is set to false.

Range

None

graph_editor_enabled

No

Boolean

Definition

Whether the flow diagram can be edited. Value true indicates that the flow diagram can be edited, and false indicates that the flow diagram cannot be edited.

Range

None

has_savepoint

No

Boolean

Definition

Whether a job has a savepoint. Value true indicates that the job has a savepoint, and false indicates that the job does not have a savepoint.

Range

None

user_id

No

String

Definition

ID of the user who creates the job. This parameter is valid only when show_detail is set to true.

Range

None

project_id

No

String

Definition

ID of the project to which a job belongs. This parameter is valid only when show_detail is set to true.

Range

None

sql_body

No

String

Definition

Stream SQL statement. This parameter is returned only when show_detail is set to true.

Range

None

run_mode

No

String

Definition

Job running mode. The options are as follows: The value can be shared_cluster, exclusive_cluster, or edge_node. This parameter is valid only when show_detail is set to true.

Range

  • shared_cluster: indicates that the job is running on a shared cluster.
  • exclusive_cluster: indicates that the job is running on an exclusive cluster.
  • edge_node: indicates that the job is running on an edge node.

job_config

No

Object

Definition

Job configuration. This parameter is returned only when show_detail is set to true. For details, see Table 6.

Range

None

main_class

No

String

Definition

Main class of a JAR package. This parameter is returned only when show_detail is set to true.

Range

None

entrypoint_args

No

String

Definition

Job running parameter of the JAR file. Multiple parameters are separated by spaces. This parameter is valid only when show_detail is set to true.

Range

None

execution_graph

No

String

Definition

Job execution plan. This parameter is returned only when show_detail is set to true.

Range

None

update_time

No

Long

Definition

Time when a job is updated. This parameter is returned only when show_detail is set to true.

Range

None

queue_name

No

String

Definition

Queue name

Range

None

edge_group_ids

No

Array of Strings

Definition

List of edge computing group IDs. Use commas (,) to separate multiple IDs.

Range

None

restart_times

No

Integer

Definition

Number of restart times

Range

None

savepoint_path

No

String

Definition

Path for storing manually generated checkpoints

Range

None

Table 6 job_config parameters

Parameter

Mandatory

Type

Description

checkpoint_enabled

No

Boolean

Definition

Whether to enable the automatic job snapshot function.

Range

  • true: enabled
  • false: disabled

The default value is false.

checkpoint_mode

No

String

Definition

Snapshot mode

Range

There are two options:

  • exactly_once: indicates that data is processed only once.
  • at_least_once: indicates that data is processed at least once.

The default value is exactly_once.

checkpoint_interval

No

Integer

Definition

Snapshot interval. The unit is second. The default value is 10.

Range

None

log_enabled

No

Boolean

Definition

Whether to enable the log storage function. The default value is false.

Range

true: Enable log storage.

false: Disable log storage.

obs_bucket

No

String

Definition

Name of an OBS bucket.

Range

None

smn_topic

No

String

Definition

SMN topic name. If a job fails, the system will send a message to users subscribed to the SMN topic.

Range

None

root_id

No

Integer

Definition

Parent job ID.

Range

None

edge_group_ids

No

Array of Strings

Definition

List of edge computing group IDs. Use commas (,) to separate multiple IDs.

Range

None

manager_cu_number

No

Integer

Definition

Number of CUs of the management unit. The default value is 1.

Range

None

cu_number

No

Integer

Definition

Number of CUs selected for a job. This parameter is valid only when show_detail is set to true.

  • Minimum value: 2
  • Maximum value: 400

The default value is 2.

Range

None

parallel_number

No

Integer

Definition

Number of concurrent jobs set by a user. This parameter is valid only when show_detail is set to true.

  • Minimum value: 1
  • Maximum value: 2000

The default value is 1.

Range

None

restart_when_exception

No

Boolean

Definition

Whether to enable the function of restart upon exceptions.

Range

None

idle_state_retention

No

Integer

Definition

Expiration time.

Range

None

udf_jar_url

No

String

Definition

Name of the package that has been uploaded to the DLI resource management system. The UDF Jar file of the SQL job is uploaded through this parameter.

Range

None

dirty_data_strategy

No

String

Definition

Dirty data policy of a job

Range

  • 2:obsDir: Save. obsDir specifies the path for storing dirty data.
  • 1: Trigger a job exception
  • 0: Ignore

entrypoint

No

String

Definition

Name of the package that has been uploaded to the DLI resource management system. This parameter is used to customize the JAR file where the job main class is located.

Range

None

dependency_jars

No

Array of Strings

Definition

Name of the package that has been uploaded to the DLI resource management system. This parameter is used to customize other dependency packages.

Range

None

dependency_files

No

Array of Strings

Definition

Name of the resource package that has been uploaded to the DLI resource management system. This parameter is used to customize dependency files.

Range

None

executor_number

No

Integer

Definition

Number of compute nodes in a job.

Range

None

executor_cu_number

No

Integer

Definition

Number of CUs on a compute node

Range

None

execution_agency_urn

No

String

Definition

Name of the agency authorized to DLI.

This parameter is configurable in Flink 1.15.

Range

None

resume_checkpoint

No

Boolean

Definition

Whether to restore data from the latest checkpoint when the system automatically restarts upon an exception. The default value is false.

Range

None

runtime_config

No

String

Definition

Customizes optimization parameters when a Flink job is running.

Range

None

graph_editor_enabled

No

Boolean

Definition

Whether to enable flow diagram editing. The default value is false.

Range

None

graph_editor_data

No

String

Definition

Edited stream graph data. The default value is null.

Range

None

resume_max_num

No

Integer

Definition

Maximum retry attempts. –1 indicates there is no upper limit.

Range

None

checkpoint_path

No

String

Definition

Path for saving the checkpoint.

Range

None

config_url

No

String

Definition

OBS path of the config package uploaded by the user.

Range

None

tm_cus

No

int

Definition

Number of CUs per TaskManager node.

Range

None

tm_slot_num

No

int

Definition

Number of slots per TaskManager node.

Range

None

image

No

String

Definition

Custom image. The format is Organization name/Image name:Image version.

This parameter is valid only when feature is set to custom. You can use this parameter with the feature parameter to specify a user-defined Flink image for job running.

Range

None

feature

No

String

Definition

User-defined job feature. Type of the Flink image used by a job.

Range

  • basic: indicates that the basic Flink image provided by DLI is used.
  • custom: indicates that the user-defined Flink image is used.

flink_version

No

String

Definition

Flink version. This parameter is valid only when feature is set to basic. You can use this parameter with the feature parameter to specify the version of the DLI basic Flink image used for job running.

Range

None

operator_config

No

String

Definition

Operator's parallelism degree. The operator ID and degree of parallelism are displayed in JSON format.

Range

None

static_estimator_config

No

String

Definition

Estimation of static flow diagram resources.

Range

None

real_cu_number

No

Integer

Definition

Number of actually used CUs. The default value is 0, indicating that the value of cu_number is used.

Range

None

Example Request

None

Example Response

{
    "is_success": "true",
    "message": "Querying of the job list succeeds.",
    "job_list": {
        "total_count": 26,
        "jobs": [
            {
                "job_id": 146,
                "name": "aaaaa",
                "desc": "",
                "user_name": "",
                "job_type": "flink_sql_job",
                "status": "job_init",
                "status_desc": "",
                "create_time": 1578892414688,
                "duration": 0,
                "root_id": -1,
                "graph_editor_enabled": false,
                "has_savepoint": false
            }
        ]
    }
}

Status Codes

Table 7 describes the status code.

Table 7 Status codes

Status Code

Description

200

Job list query succeeds.

400

The input parameter is invalid.

Error Codes

If an error occurs when this API is invoked, the system does not return the result similar to the preceding example, but returns the error code and error information. For details, see Error Codes.