saveProfile
Inserts/updates a profile document.
HTTP POST /ctreplay/:domain?/saveProfile
Path variables:
Name | Mandatory | Type | Description |
---|---|---|---|
domain | NO | STRING | Unique domain identifier |
Authorization: BEARER (token returned by EasyCIM SSO)
Request body:
Name | Mandatory | Type | Description |
---|---|---|---|
document | YES | OBJECT | profile 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 |
id | STRING | document id. (only if new document is created, otherwise empty string) |
Example:
Request:
http://<hostname>:<port>/ctreplay/default/saveProfile
Request Body to update an existent profile (“id” field is present):
{
"document":{
"id": "5eea3d2919eb88cfb639fecb",
"name":"default",
"description":"profilo default",
"securityRules":{
"onlyPartner":true,
"onlyCallcenter":true,
"onlyMacroactivity":false,
"onlyTags": "{\"tags.ECID\" : \"saasher|11|41479|57\"}"
},
"allowedActions":{
"canPlay":true,
"canDownload":true,
"canEdit":true,
"canDelete":true,
"canListenOriginalAudio":true
},
"securityRules":{
"onlyPartner":true,
"onlyCallcenter":false,
"onlyMacroactivity":false,
"onlyTags":""
},
"hideTags":[
"agent",
"callId"
],
"searchableTags":[
"ECID",
"AGENT"
],
"editableTags": [
{
"name": "validazione",
"type": "select",
"immutable" : false
"options": ["YES","NO"]
},
{
"name": "note",
"type": "text",
"immutable" : false
}
],
"hideTagsForSearch" : [
"ecid"
]
}
}
Response:
{
"result": true,
"id": "",
"error": null
}
Request Body to save a new profile (“id” field is not present):
{
"document":{
"description":"profilo visibilità solo partner",
"name":"onlyPartner",
"hideTags":[
],
"allowedActions":{
"canPlay":true,
"canDownload":true,
"canEdit":true
},
"securityRules":{
"onlyPartner":true,
"onlyCallcenter":false,
"onlyMacroactivity":false,
"onlyTags":"{\"tags.ECID\" : \"saasher|11|41479|57\"}"
},
"hideTags":[
"agent",
"callId"
],
"searchableTags":[
"ECID",
"AGENT"
],
"editableTags":[
{
"options":[
"YES",
"NO"
],
"name":"validazione",
"type":"select"
},
{
"options":[
],
"name":"note",
"type":"text"
}
],
"hideTagsForSearch" : [
"ecid",
"agent"
]
}
}
Response: