purge #
Deletes, for good, a finished job's archive (the old indice, with the old values of removed fields and failed documents) and its failed documents list.
On a done job, it gives back the disk space of the collection before the migration. On an aborted job, which has no archive, it only drops the failed documents list.
Query Syntax #
HTTP #
URL: http://kuzzle:7512/_/mapping-migration/migration/purge?jobId=<jobId>
Method: POST
Other protocols #
{
"controller": "mapping-migration/migration",
"action": "purge",
"jobId": "<jobId>"
}
Kourou #
kourou mapping-migration/migration:purge -a jobId=<jobId>
Arguments #
| Argument | Type | Description |
|---|
jobId | string | Required. Job identifier, from start, or archives[].jobId in status |
Response #
{
"indice": "&iot.sensors"
}
| Property | Type | Description |
|---|
indice | string | The deleted archive indice; null if the job had no archive (an aborted job) |
Possible errors #
| Error id | Status | When |
|---|
plugin.mapping-migration.forbidden | 403 | Missing collection:update on the job's collection |
plugin.mapping-migration.unknown_job | 404 | No archive nor failed documents for this job, and it is not the current one (already purged, or never existed) |
plugin.mapping-migration.job_running | 412 | The job is still running |
plugin.mapping-migration.unsupported_engine | 412 | Kuzzle does not run on Elasticsearch 8 |