Create Job - POST /jobs

Creates a new analysis job. The job configuration is supplied as a new analysis configuration object.

Optional data description and analysis limits object parameters can be supplied which describe the format of your data and set limits on the number of field values and time buckets to be analyzed.

Example

Create a new job expecting JSON formatted data with a single detector and transform to uppercase the contents of the ‘airline’ field. Note that fieldnames and fieldvalues are case sensitive; ‘airline’ is not the same field as ‘AIRLINE’.

curl -X POST -H 'Content-Type: application/json' 'http://localhost:8080/engine/v2/jobs' -d '
{
    "id" : "airline",
    "description" : "Website response time",
    "analysisConfig" : {
        "detectors" :[
            {
                "function":"metric",
                "fieldName":"responsetime",
                "byFieldName":"AIRLINE"
            }
        ]
    },
    "dataDescription" : {
        "format":"JSON",
        "timeField":"timestamp",
        "timeFormat":"epoch_ms"
    },
    "transforms" : [
        {
          "transform":"uppercase",
          "inputs":"airline",
          "outputs":"AIRLINE"
        }
    ]
}'

The HTTP ‘Content-Type’ header must be set to ‘application/json’.

For further examples, see here.

Parameters

overwrite:If ‘true’ then any existing job with the same ID will be deleted to make way for the new job. If not specified the default is ‘false’.

Request Body

A job configuration must be supplied in order to create a new job, as show in the example above. This must contain core properties, details of the analysis to be performed and a description of the input data formats. This may optionally also contain details of any pre-processing transforms and analysis size limits. The majority of these fields cannot be updated once the job has been created, so please ensure the values are correct.

Returns

Status code 201 upon successful job creation.

Errors

See the Error Codes documentation for the full list of errors that may be returned by the API.