API Documentation
REST API
Overview
The current version of the API is 1.
Any request must include apiKey and appId parameters.
The response of any request is JSON of the following form:
{"status":<status>,"result":<result object/array>}
where can be “success” or “error”. If is “success” then “result” contains the result, which can be a JSON object or array depending on the request. If is “error”, then “result” contains the error message. For example:
{"status":"error","result":{"message":"apiKey parameter is required."}}
Reference
POST /api/v1/executeJob
Starts a job to execute an operation asynchronously. It returns jobId of the started job. jobId will be newly generated or the one provided as a parameter of the request. Poll /api/v1/getJobStatus with the jobId to get the status of the job.
An example of how to execute a scenario:
curl -H "Content-Type: application/json" -X POST -d '{"apiKey":"<your API key>","appId":"7","operation":{"opName": "RunScenario", "opParams": {"scenario": "Main", "parameters": {}}}}' "http://<host>/api/v1/executeJob"
GET /api/v1/getJobStatus
curl -i -H "Accept: application/json" -H "Content-Type: application/json" -X GET "http://<host>/api/v1/getJobStatus?apiKey=<your API key>&appId=7&jobId=<jobId returned by executeJob>"
GET /api/v1/getScenarios
Returns JSON array of scenarios that the user can execute.
The parameters are:
- <withLineage> (optional) - include the lineage (as returned by /api/v1/getLineage request) for each scenario. The value must be true or false. Considered false if <withLineage> is missing.
curl -i -H "Accept: application/json" -H "Content-Type: application/json" -X GET "http://<host>/api/v1/getScenarios?apiKey=<your API key>&appId=7"
11.1.2.4 GET /api/v1/getLineage
Returns lineage information for a scenario.
curl -i -H "Accept: application/json" -H "Content-Type: application/json" -X GET "http://<host>/api/v1/getLineage?apiKey=<your API key>&appId=7&scenarioName=DeduplicateContacts"
The response contains:
- specifications – A list of specifications that are executed by the scenario. Each specification contains specificationName and specificationType parameters. Other parameters depend on the specificationType. For example, if specificationType is “MatchOneSource” then the specification will include “matchTableName”, which is a table containing the result of applying all matching runs, and “consolidatedTableName”, which is a table containing the result of consolidation (aka merging).
- tablesCreated – A list of tables created by the scenario. Each table includes sourceName and tableName.