Schedules asynchronous history cleanup (See History cleanup).

Method

POST /history/cleanup

Parameters

Query Parameters

Name Description
executeAtOnce When true the job will be scheduled for nearest future. When false, the job will be scheduled for next batch window start time. Default is true.

Request Body

Not used

Result

Result is not reliable any more

Be aware, that since v. 7.9.0, the correct response object is not guaranteed any more. Use GET /history/cleanup/jobs to find history cleanup jobs.

A JSON object representing scheduled job.See Get Job for the structure and example.

Response Codes

Code Media type Description
200 application/json Request successful.
400 application/json Returned if some of the query parameters are invalid.

Example

Request

POST /history/cleanup

Response

  1. {
  2. "id":"074bd92a-1a95-11e7-8ceb-34f39ab71d4e",
  3. "jobDefinitionId":null,
  4. "processInstanceId":null,
  5. "processDefinitionId":null,
  6. "processDefinitionKey":null,
  7. "executionId":null,
  8. "exceptionMessage":null,
  9. "retries":3,
  10. "dueDate":"2017-04-06T13:57:45.000+0200",
  11. "suspended":false,
  12. "priority":0,
  13. "tenantId":null
  14. }

原文: https://docs.camunda.org/manual/7.9/reference/rest/history/history-cleanup/post-history-cleanup/