Importing a Flink Job
Function
This API is used to import Flink job data.
URI
- URI format
- Parameter description
Table 1 URI parameter Parameter
Mandatory
Type
Description
project_id
Yes
String
Project ID, which is used for resource isolation. For details about how to obtain its value, see Obtaining a Project ID.
Request
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
zip_file |
Yes |
String |
Path of the job ZIP file imported from OBS. You can enter a folder path to import all ZIP files in the folder.
NOTE:
The folder can contain only .zip files. |
is_cover |
No |
Boolean |
Whether to overwrite an existing job if the name of the imported job is the same as that of the existing job in the service. |
Response
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
is_success |
No |
String |
Indicates whether the request is successfully executed. Value true indicates that the request is successfully executed. |
message |
No |
String |
System prompt. If execution succeeds, the parameter setting may be left blank. |
job_mapping |
No |
Array of objects |
Information about the imported job. For details, see Table 4. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
old_job_id |
No |
Long |
ID of a job before being imported. |
new_job_id |
No |
Long |
ID of a job after being imported. If is_cover is set to false and a job with the same name exists in the service, the returned value of this parameter is -1. |
remark |
No |
String |
Results about an imported job. |
Example Request
Whether to overwrite the existing job if the name of the imported job is the same as that of an existing job when Flink job data is imported from OBS.
{ "zip_file": "test/ggregate_1582677879475.zip", "is_cover": true }
Example Response
{ "is_success": true, "message": "The job is imported successfully.", "job_mapping": [ { "old_job_id": "100", "new_job_id": "200", "remark": "Job successfully created" } ] }
Status Codes
Table 5 describes status codes.
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.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.