Revert Snapshot- POST /modelsnapshots/<jobId>/revert

Reverts to a specified snapshot, restoring the model state.


Ensure that the job is in a CLOSED state before attempting to revert to a saved snapshot. Sending data to a CLOSED job will change its status to RUNNING, so also ensure that data is not imminently scheduled to be sent.


Revert to a saved snapshot with a specific description for job kpi_measure

curl -X POST 'http://localhost:8080/engine/v2/modelsnapshots/kpi_measure/revert?description=07MAR16_REF632_VALID'

Revert to the first saved snapshot prior to a certain time for job kpi_measure:

curl -X POST 'http://localhost:8080/engine/v2/modelsnapshots/kpi_measure/revert?time=2016-03-01T18:42:00Z'

Revert to a specific snapshot id for job kpi_measure:

curl -X POST 'http://localhost:8080/engine/v2/modelsnapshots/kpi_measure/revert?snapshotId=1234567890'


snapshotId:Reverts to the snapshot with this ID.
time:Reverts to the snapshot of this exact time, or the most recent one prior to this time.
description:Reverts to the snapshot with this description.
 Delete the results in the time period between the latest results and the time of the reverted snapshot, as well as reset the model to accept records for this time period.

One of snapshotId, time or description must be specified.


Status code 200 (Ok).

If successful for either of the above, the API returns the model snapshot that was reverted to, for example:

  "documentId" : "1234567890",
  "exists" : true,
  "type" : "modelSnapshot",
  "document" : {
    "description" : "01MAR16_REF630_VALID",
    "timestamp" : "2016-03-01T13:35:56.000+0000",
    "restorePriority" : 1457618890518,
    "snapshotId" : "1234567890",
    "snapshotDocCount" : 1,
    "modelSizeStats" : {
      "modelBytes" : 544831,
      "totalByFieldCount" : 20,
      "totalPartitionFieldCount" : 2,
      "totalOverFieldCount" : 0,
      "bucketAllocationFailuresCount" : 0,
      "memoryStatus" : "OK"
    "latestRecordTimeStamp" : "2016-03-01T11:28:40.000+0000"


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