Help Center/ Data Lake Insight/ API Reference/ Flink Job Management APIs/ Triggering Savepoints for Flink Jobs
Updated on 2024-11-04 GMT+08:00

Triggering Savepoints for Flink Jobs

Function

This API is used to trigger savepoints for Flink jobs.

URI

POST /v1.0/{project_id}/streaming/jobs/{job_id}/savepoint

Table 1 URI parameters

Parameter

Mandatory

Type

Description

job_id

Yes

String

ID of a Flink job

project_id

Yes

String

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

Request Parameters

Table 2 Request body parameters

Parameter

Mandatory

Type

Description

action

Yes

String

Operation type

Enumerated value:

TRIGGER

savepoint_path

Yes

String

Savepoint path. Make sure you have authorized operations on OBS before using it.

Example: obs://bucket-name/dir/savepoint/

Response Parameters

Status code: 200

Table 3 Response body parameters

Parameter

Type

Description

is_success

Boolean

Whether the request is successfully executed. true indicates that the request is successfully executed.

message

String

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

Status code: 400

Table 4 Response body parameters

Parameter

Type

Description

error_code

String

Error code

error_msg

String

Error message

Status code: 500

Table 5 Response body parameters

Parameter

Type

Description

error_code

String

Error code

error_msg

String

Error message

Example Request

Trigger savepoints for a Flink job.

{
 "action": "TRIGGER",
 "savepoint_path": "obs://bucket-name/dir/savepoint"
}

Example Response

{
    "is_success": true,
    "message": "{\"is_success\":\"true\",\"message\":\"api.msg.deal_savepoint_success\"}"
}

Status Codes

Status Code

Description

200

The modification is successful.

400

Request error.

500

Internal server error.

Error Codes

See Error Codes.