Inserts/updates an export rule document.
HTTP POST /ctreplay/:domain?/saveExportRule
Path variables:
Name | Mandatory | Type | Description |
---|---|---|---|
domain | NO | STRING | Unique domain identifier |
Authorization: BEARER
Request body:
Name | Mandatory | Type | Description |
---|---|---|---|
document | YES | OBJECT | export rule object to be saved/updated. (if id property is present the profile will be updated, otherwise a new profile will be inserted) |
Response:
Type: JSON
Name | Type | Description |
---|---|---|
result | BOOLEAN | If true, the service response was performed correctly |
error | NULL / STRING | Contains the error description if an error has occurred in the request |
document | OBJECT | The document saved on mongo db. |
Example:
Request:
http://<hostname>:<port>/ctreplay/default/saveExportRule
Request Body:
{ "document":{ "name" : "Esportazione ogni notte", "enable" : true, "schedule" : "0 0 1 * * *", "query" : "{\"macroactivity\": \"DEFAULT\"}", "destination" : { "type" : "fs", "path" : "/destination", "server" : "", "port" : "", "username" : "", "password" : "" }, "format" : "zip", "fileNamePattern" : "callId", "maxNumber" : 500, "blockSize" : "100", "action" : "export", "user" : "admin" } }
Response:
{ "result": true, "error": null, "document": { "name": "Esportazione ogni notte", "enable": true, "schedule": "0 0 1 * * *", "query": "{\"macroactivity\": \"DEFAULT\"}", "destination": { "type": "fs", "path": "/destination", "server": "", "port": "", "username": "", "password": "" }, "format": "zip", "fileNamePattern": "callId", "maxNumber": 500, "blockSize": "100", "action": "export", "user": "admin", "$setOnInsert": { "__v": 0 }, "_id": "5f5a4a561f05c72768e22d85" } }