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

Upload and execute job

post

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=Y

Request body should contain xml containing job_configuration (job and job_execution_configuration wrapped in job_configuration tag).

Authorizations
Query parameters
xmlstring · enumOptional

Boolean flag set to either Y or N describing if xml or html reply should be produced.

Default: NPossible values:
Body
stringOptional

Job configuration XML

Responses
200

Request was processed and XML response is returned

text/xml
post
/kettle/addJob
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>

Generate job image

get

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-job
Authorizations
Query parameters
namestringRequired

Name of the job to be used for image generation.

idstringOptional

Carte id of the job to be used for image generation.

Responses
200

Request was processed

image/png
Responsestring · binary

Binary PNG image

get
/kettle/jobImage
GET /kettle/jobImage?name=text HTTP/1.1
Host: 
Authorization: Basic username:password
Accept: */*
binary

Get job status

get

Retrieves 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=Y
Authorizations
Query parameters
namestringRequired

Name of the job to be used for status generation.

xmlstring · enumOptional

Boolean flag which defines output format Y forces XML output to be generated. HTML is returned otherwise.

Default: NPossible values:
idstringOptional

Carte id of the job to be used for status generation.

fromintegerOptional

Start line number of the execution log to be included into response.

Responses
200

Request was processed

Responsestring

XML response containing job status details

get
/kettle/jobStatus
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 repository

get

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=Debug
Authorizations
Query parameters
jobstringRequired

Full path to the job in repository.

levelstringRequired

Logging level to be used for job execution (i.e. Debug).

Responses
200

Request was processed

get
/kettle/runJob
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?