CarteAPIDocumentation.md
Carte is Pentaho Data Integration's (PDI) remote server component that provides a web-based API for executing and monitoring transformations and jobs. This document describes the REST API endpoints available in Carte.
http://{hostname}:{port}/kettle
Default port: 8080
Carte supports basic HTTP authentication. You can configure username and password in the carte configuration.
Most endpoints support both XML and HTML output formats controlled by the xml parameter:
xml=Y - Returns XML responsexml=N or omitted - Returns HTML responseGET /kettle/status
Retrieves comprehensive server status including system information, running transformations, and jobs.
Parameters:
xml (optional, boolean) - Output format. Y for XML, HTML otherwise.Response: Server status including:
Example:
curl "http://localhost:8080/kettle/status?xml=Y"
GET /kettle/stopCarte
Gracefully shuts down the Carte server.
Parameters:
xml (optional, boolean) - Output formatResponse: Confirmation of shutdown request
POST /kettle/addTrans
Uploads and registers a transformation for execution.
Parameters:
Response: Transformation ID and status
GET /kettle/registerTrans
Registers a transformation from repository or file system.
Parameters:
name (required) - Transformation namexml (optional) - Output formatGET /kettle/transStatus
Retrieves status of a specific transformation.
Parameters:
name (required) - Transformation nameid (optional) - Transformation IDxml (optional) - Output formatfrom (optional) - Starting log line numbersendResult (optional) - Include execution resultsResponse: Transformation status including:
Example:
curl "http://localhost:8080/kettle/transStatus?name=my-transformation&xml=Y"
GET /kettle/startTrans
Starts execution of a registered transformation.
Parameters:
name (required) - Transformation nameid (optional) - Transformation IDxml (optional) - Output formatGET /kettle/stopTrans
Stops execution of a running transformation.
Parameters:
name (required) - Transformation nameid (optional) - Transformation IDxml (optional) - Output formatGET /kettle/pauseTrans
Pauses execution of a running transformation.
Parameters:
name (required) - Transformation nameid (optional) - Transformation IDxml (optional) - Output formatGET /kettle/removeTrans
Removes a transformation from the server.
Parameters:
name (required) - Transformation nameid (optional) - Transformation IDxml (optional) - Output formatGET /kettle/executeTrans
Executes a transformation synchronously and returns results.
Parameters:
name (required) - Transformation nameid (optional) - Transformation IDxml (optional) - Output formatGET /kettle/runTrans
Runs a transformation asynchronously.
Parameters:
name (required) - Transformation nameid (optional) - Transformation IDxml (optional) - Output formatGET /kettle/prepareExec
Prepares a transformation for execution without starting it.
Parameters:
name (required) - Transformation nameid (optional) - Transformation IDxml (optional) - Output formatGET /kettle/startExec
Starts execution of a prepared transformation.
Parameters:
name (required) - Transformation nameid (optional) - Transformation IDxml (optional) - Output formatGET /kettle/cleanupTrans
Cleans up resources used by a transformation.
Parameters:
name (required) - Transformation nameid (optional) - Transformation IDxml (optional) - Output formatGET /kettle/transImage
Retrieves a visual representation (image) of the transformation.
Parameters:
name (required) - Transformation nameid (optional) - Transformation IDResponse: PNG image of the transformation flow
POST /kettle/addJob
Uploads and registers a job for execution.
Parameters:
Response: Job ID and status
GET /kettle/registerJob
Registers a job from repository or file system.
Parameters:
name (required) - Job namexml (optional) - Output formatGET /kettle/jobStatus
Retrieves status of a specific job.
Parameters:
name (required) - Job nameid (optional) - Job IDxml (optional) - Output formatfrom (optional) - Starting log line numberResponse: Job status including:
Example:
curl "http://localhost:8080/kettle/jobStatus?name=my-job&xml=Y"
GET /kettle/startJob
Starts execution of a registered job.
Parameters:
name (required) - Job nameid (optional) - Job IDxml (optional) - Output formatGET /kettle/stopJob
Stops execution of a running job.
Parameters:
name (required) - Job nameid (optional) - Job IDxml (optional) - Output formatGET /kettle/removeJob
Removes a job from the server.
Parameters:
name (required) - Job nameid (optional) - Job IDxml (optional) - Output formatGET /kettle/executeJob
Executes a job synchronously and returns results.
Parameters:
name (required) - Job nameid (optional) - Job IDxml (optional) - Output formatGET /kettle/runJob
Runs a job asynchronously.
Parameters:
name (required) - Job nameid (optional) - Job IDxml (optional) - Output formatGET /kettle/jobImage
Retrieves a visual representation (image) of the job.
Parameters:
name (required) - Job nameid (optional) - Job IDResponse: PNG image of the job flow
GET /kettle/properties
Retrieves server configuration properties.
Parameters:
xml (optional) - Output formatResponse: Server properties and configuration
GET /kettle/nextSequence
Gets the next value from a named sequence.
Parameters:
name (required) - Sequence nameincrement (optional) - Increment amountxml (optional) - Output formatGET /kettle/sniffStep
Sniffs data output from a transformation step for analysis.
Parameters:
trans (required) - Transformation namestep (required) - Step namecopynr (optional) - Copy numbertype (optional) - Data typexml (optional) - Output formatPOST /kettle/addExport
Exports transformation or job resources.
Parameters:
GET /kettle/registerSlave
Registers a slave server in the cluster.
Parameters:
xml (optional) - Output formatGET /kettle/getSlaves
Retrieves list of registered slave servers.
Parameters:
xml (optional) - Output formatPOST /kettle/registerPackage
Registers a deployment package.
Parameters:
GET /kettle/allocateSocket
Allocates a server socket for communication.
Parameters:
rangeStart (required) - Starting port rangehostname (required) - Hostnameid (required) - Socket IDxml (optional) - Output formatGET /kettle/listSocket
Lists allocated server sockets.
Parameters:
xml (optional) - Output formatGET /carte/systemInfo
Retrieves system information in JSON format.
Response: JSON object with server status
GET /carte/configDetails
Retrieves configuration details in JSON format.
Response: JSON array with configuration parameters
GET /carte/transformations
Retrieves list of transformations in JSON format.
Response: JSON array of transformation entries
GET /carte/transformations/detailed
Retrieves detailed list of transformations in JSON format.
Response: JSON array with detailed transformation information
All endpoints return appropriate HTTP status codes:
200 OK - Request successful404 Not Found - Transformation/Job not found500 Internal Server Error - Server error occurredError responses include error messages in the specified format (XML or HTML).
Configure authentication in the carte configuration XML:
<slaveserver>
<name>slave-server-name</name>
<hostname>localhost</hostname>
<port>8080</port>
<username>admin</username>
<password>password</password>
</slaveserver>
Use HTTP Basic Authentication:
curl -u username:password "http://localhost:8080/kettle/status?xml=Y"
# Get status in XML format
curl "http://localhost:8080/kettle/status?xml=Y"
# Get status in HTML format
curl "http://localhost:8080/kettle/status"
# Start a transformation
curl "http://localhost:8080/kettle/startTrans?name=my-transformation&xml=Y"
# Check transformation status
curl "http://localhost:8080/kettle/transStatus?name=my-transformation&xml=Y"
# Stop the transformation
curl "http://localhost:8080/kettle/stopTrans?name=my-transformation&xml=Y"
# Start a job
curl "http://localhost:8080/kettle/startJob?name=my-job&xml=Y"
# Check job status
curl "http://localhost:8080/kettle/jobStatus?name=my-job&xml=Y"
# Stop the job
curl "http://localhost:8080/kettle/stopJob?name=my-job&xml=Y"
Sample carte configuration (carte-config.xml):
<?xml version="1.0" encoding="UTF-8"?>
<slave_config>
<slaveserver>
<name>Carte-Server</name>
<hostname>localhost</hostname>
<port>8080</port>
<username>admin</username>
<password>password</password>
<master>N</master>
</slaveserver>
<max_log_lines>10000</max_log_lines>
<max_log_timeout_minutes>1440</max_log_timeout_minutes>
<object_timeout_minutes>1440</object_timeout_minutes>
</slave_config>
Start Carte with configuration:
./carte.sh carte-config.xml
Enable debug logging to troubleshoot issues:
./carte.sh carte-config.xml -l DEBUG
Simple health check endpoint:
curl "http://localhost:8080/kettle/status"
If this returns a 200 status code, Carte is running properly.