/
saveExportRule
saveExportRule
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",
"exportWithTags": false
}
}
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",
"exportWithTags": false,
"user": "admin",
"$setOnInsert": {
"__v": 0
},
"_id": "5f5a4a561f05c72768e22d85"
}
}
, multiple selections available,
Related content
saveImportRule
saveImportRule
More like this
getExportRules
getExportRules
More like this
saveUser
saveUser
More like this
getImportRules
getImportRules
More like this
deleteExportRule
deleteExportRule
More like this
getProfiles
getProfiles
More like this