The REST API provides the following methods for managing archive cleanup and Error Queue defragmentation tasks:
- GET /api/archivecleanup/cleanup
- POST /api/archivecleanup/cleanup
- DELETE /api/archivecleanup/cleanup
- GET /api/archivecleanup/cleanup/settings
- PUT /api/archivecleanup/cleanup/settings
- GET /api/archivecleanup/defrag
- POST /api/archivecleanup/defrag
- DELETE /api/archivecleanup/defrag
- GET /api/archivecleanup/defrag/settings
- PUT /api/archivecleanup/defrag/settings
GET /api/archivecleanup/cleanup
URI |
|
Description | Gets the archive cleanup status and results. |
Request Header |
|
Accept: application/vnd.orchestral.rhapsody.6_2+json |
|
Request Body |
Empty. |
Response Status |
|
Response Body |
The response body has the following structure: { "data":{ "manualStatus": { "status": "NOT_RUNNING", "result": "SUCCEEDED", "completionTime": "20150806T170751.603+1200", "runDuration": "PT0.592S", "filesRemoved": 0, "filesFailedToRemoved": 0, "diskSpaceFreed": 0, "diskSpaceFailedToFree": 0, "eligibleDefragMessages": 131301 }, "automaticStatus": { "status": "NOT_RUNNING", "result": "SUCCEEDED", "completionTime": "20150806T171000.523+1200", "runDuration": "PT0.521S", "filesRemoved": 0, "filesFailedToRemoved": 0, "diskSpaceFreed": 0, "diskSpaceFailedToFree": 0, "eligibleDefragMessages": 131289 } }, "error": null } The units for |
Access Rights | 'Organize archive cleanup REST API'. |
POST /api/archivecleanup/cleanup
URI |
|
Description |
Starts an archive cleanup. |
Request Header |
|
Request Body |
Empty. |
Response Status |
|
Response Body |
Empty. |
Access Rights |
Organize archive cleanup REST API |
DELETE /api/archivecleanup/cleanup
URI |
|
Description |
Cancels a running archive cleanup. |
Request Header |
|
Request Body |
Empty. |
Response Status |
|
Response Body |
Empty. |
Access Rights |
'Organize archive cleanup REST API'. |
GET /api/archivecleanup/cleanup/settings
URI |
|
Description | Retrieves the archive cleanup settings. |
Request Header | Accept: application/json |
Accept: application/vnd.orchestral.rhapsody.6_2+json |
|
Accept: application/vnd.orchestral.rhapsody.6_3+json |
|
Request Body | Empty. |
Response Status | 200 OK - operation successful. |
Response Body |
Returns the settings in JSON format. If a schedule is set then the current schedule type and settings are also returned:
|
Access Rights | 'Organize archive cleanup REST API'. |
PUT /api/archivecleanup/cleanup/settings
URI |
|
Description |
Allows the user to set the archive cleanup settings. |
Request Header |
|
Content-Type: application/vnd.orchestral.rhapsody.6_2+json |
|
Content-Type: application/vnd.orchestral.rhapsody.6_3+json |
|
Request Body |
Accepts new settings in JSON format. If a schedule is set then the appropriate schedule information is required. Any schedule type that is not set maintains the previous values:
|
Response Status |
|
Response Body | Empty. |
Access Rights | 'Organize archive cleanup REST API'. |
GET /api/archivecleanup/defrag
URI |
|
Description |
Retrieves the defragmentation task status and results. |
Request Header |
|
Accept: application/vnd.orchestral.rhapsody.6_2+json |
|
Request Body |
Empty. |
Response Status |
|
Response Body |
The response body has the following structure: { "data": { "currentStatus": "NOT_RUNNING", "lastRunResult": "SUCCEEDED", "completionTime": "20150806T170917.288+1200", "messagesDefragged": 2, "messagesFailedDefrag": 0, "stoppedPrematurely": true, "stoppedPrematurelyReason":"LIMITED_DISK_SPACE" }, "error": null } |
Access Rights | 'Organize message defragmentation REST API'. |
POST /api/archivecleanup/defrag
URI |
|
Description |
Starts a defragmentation task. |
Request Header |
|
Request Body |
Empty. |
Response Status |
|
Response Body |
Empty. |
Access Rights |
'Organize message defragmentation REST API'. |
DELETE /api/archivecleanup/defrag
URI |
|
Description |
Cancels a running defragmentation task. |
Request Header |
|
Request Body |
Empty. |
Response Status |
|
Response Body |
Empty. |
Access Rights |
'Organize message defragmentation REST API'. |
GET /api/archivecleanup/defrag/settings
URI |
|
Description |
Retrieves the defragmentation task settings. |
Request Header |
|
Accept: application/vnd.orchestral.rhapsody.6_2+json |
|
Request Body |
Empty. |
Response Status |
|
Response Body |
Returns the settings in JSON format. If a schedule is set then the current schedule type and settings are also returned:
|
Access Rights |
'Organize message defragmentation REST API'. |
PUT /api/archivecleanup/defrag/settings
URI |
|
Description |
Enables the user to set the defragmentation task settings. |
Request Header |
|
Content-Type: application/vnd.orchestral.rhapsody.6_2+json |
|
Request Body |
Accepts the new settings in JSON format. If a schedule is set then the appropriate schedule information is required:
|
Response Status | 204 No Content - operation successful. |
Response Body | Empty. |
Access Rights | 'Organize message defragmentation REST API'. |