Carte APIs Jobs
Provides information on web service calls to create, run, and delete jobs. Calls for getting images, statuses and for starting and stopping jobs are also included.
DEPRECATED: This endpoint is deprecated and may be removed in future versions.
Uploads and executes job configuration XML file. Uploads xml file containing job and job_execution_configuration (wrapped in job_configuration tag) to be executed and executes it. Method relies on the input parameter to determine if xml or html reply should be produced. The job_configuration xml is transferred within request body. Job name of the executed job will be returned in the Response object or message describing error occurred. To determine if the call successful or not you should rely on result parameter in response.
Example Request:
POST /kettle/addJob/?xml=YRequest body should contain xml containing job_configuration (job and job_execution_configuration wrapped in job_configuration tag).
Boolean flag set to either Y or N describing if xml or html reply should be produced.
NPossible values: Job configuration XML
Request was processed and XML response is returned
Internal server error occurs during request processing
POST /kettle/addJob HTTP/1.1
Host:
Authorization: Basic username:password
Content-Type: application/xml
Accept: */*
Content-Length: 6
"text"<?xml version="1.0" encoding="UTF-8"?>
<webresult>
<result>OK</result>
<message>Job 'dummy-job' was added to Carte with id fb4a92ff-6852-4307-9f74-3c74bd61f829</message>
<id>fb4a92ff-6852-4307-9f74-3c74bd61f829</id>
</webresult>
Generates PNG image of the specified job currently present on Carte server. Job name and Carte job ID (optional) are used for specifying which job to get information for. Response is a binary of the PNG image.
Example Request:
GET /kettle/jobImage?name=dummy-jobName of the job to be used for image generation.
Carte id of the job to be used for image generation.
Request was processed
Binary PNG image
Internal server error occurs during request processing
GET /kettle/jobImage?name=text HTTP/1.1
Host:
Authorization: Basic username:password
Accept: */*
binaryRetrieves status of the specified job. Status is returned as HTML or XML output depending on the input parameters. Status contains information about last execution of the job.
Example Request:
GET /kettle/jobStatus/?name=dummy-job&xml=YName of the job to be used for status generation.
Boolean flag which defines output format Y forces XML output to be generated. HTML is returned otherwise.
NPossible values: Carte id of the job to be used for status generation.
Start line number of the execution log to be included into response.
Request was processed
XML response containing job status details
Internal server error occurs during request processing
GET /kettle/jobStatus?name=text HTTP/1.1
Host:
Authorization: Basic username:password
Accept: */*
<?xml version="1.0" encoding="UTF-8"?>
<jobstatus>
<jobname>dummy-job</jobname>
<id>c56961b2-c848-49b8-abde-76c8015e29b0</id>
<status_desc>Finished</status_desc>
<error_desc/>
<logging_string></logging_string>
<first_log_line_nr>0</first_log_line_nr>
<last_log_line_nr>37</last_log_line_nr>
<result>
<lines_input>0</lines_input>
<lines_output>0</lines_output>
<lines_read>0</lines_read>
<lines_written>0</lines_written>
<lines_updated>0</lines_updated>
<lines_rejected>0</lines_rejected>
<lines_deleted>0</lines_deleted>
<nr_errors>0</nr_errors>
<nr_files_retrieved>0</nr_files_retrieved>
<entry_nr>0</entry_nr>
<result>Y</result>
<exit_status>0</exit_status>
<is_stopped>N</is_stopped>
<log_channel_id>10e2c832-07da-409a-a5ba-4b90a234e957</log_channel_id>
<log_text/>
<result-file></result-file>
<result-rows></result-rows>
</result>
</jobstatus>
Execute job from enterprise repository. Repository should be configured in Carte xml file. Response contains ERROR result if error happened during job execution.
Example Request:
GET /kettle/runJob?job=home%2Fadmin%2Fdummy-job&level=DebugFull path to the job in repository.
Logging level to be used for job execution (i.e. Debug).
Request was processed
Internal server error occurs during request processing
GET /kettle/runJob?job=text&level=text HTTP/1.1
Host:
Authorization: Basic username:password
Accept: */*
<webresult>
<result>OK</result>
<message>Job started</message>
<id>8c082e8f-b4fe-40bc-b424-e0f881a61874</id>
</webresult>
Was this helpful?

