Events

Additionally server sends events / notifications when there is some change.

All events have one common property which is:

  • event

    Eventenum

    The event property identifies the type of the event.

The job-related events (JobResults, JobAdd, JobDelete, JobState, and JobProgress) also contain customData when it was supplied to cmdAddJob. The value can be any JSON value and is copied unchanged. If the request omitted customData, job notifications omit the property. An explicitly supplied null remains present as "customData": null. The Status event is server-related rather than job-related and does not contain customData.


JobResults

The JobResults event is sent when job optimization if finished.

  • jobId
    int

    ID of the job that has been finished.

  • customData
    any

    The unchanged application-defined JSON value supplied to cmdAddJob. Omitted when the request omitted it; present as null when explicitly supplied as null.

  • results
    Output

    Results of the optimization in the form of an Output data group object.


JobAdd

The JobAdd event informs that a new job has been created and added to the queue.

  • jobId
    int

    ID of the job that has been created.

  • customData
    any

    The unchanged application-defined JSON value supplied to cmdAddJob. Omitted when the request omitted it; present as null when explicitly supplied as null.

JobAdd notification with customData

{
  "event": "JobAdd",
  "jobId": 42,
  "customData": {
    "requestId": "batch-42",
    "labels": ["rush"]
  }
}

JobDelete

The JobDelete event informs that a job has been just deleted.

  • jobId
    int

    ID of the job that has been deleted.

  • customData
    any

    The unchanged application-defined JSON value supplied to cmdAddJob. Omitted when the request omitted it; present as null when explicitly supplied as null.


JobState

The JobState event informs that job’s state has just changed

  • jobId
    int

    ID of the job the state of which has changed.

  • customData
    any

    The unchanged application-defined JSON value supplied to cmdAddJob. Omitted when the request omitted it; present as null when explicitly supplied as null.

  • state

    JobStateenum

    State of the job.

  • errorCode

    ErrorCodeenum

    If the job state is set to sError, then errorCode CustomProperty contains the error code.

  • errorDescription
    string

    Additional error information.


JobProgress

The JobProgress event informs about progress of a job.

  • jobId
    int

    ID of the job.

  • customData
    any

    The unchanged application-defined JSON value supplied to cmdAddJob. Omitted when the request omitted it; present as null when explicitly supplied as null.

  • progress
    float

    Optimization progress in percent on a scale from 0 to 100, so 100 means 100%.

  • combinationCount
    int

    Number of combinations checked.

  • score
    float

    Current score of the optimization.


Status

The Status event is sent when server’s state is changed.

  • status

    Statusenum

    The status of the server.

  • queueSize
    int

    The queue size, not including the active job.