Hello guys,
I've to update 234 queue on a specific parameter. I found in documentation the body i've to pass to putRoutingQueue(queueId, body) method,
var queueIds = ["b9a34ac9-c41b-4c54-afd7-542d968fb847",
"278145b6-fbf8-4d2d-aa31-f0542d4b6142"]
var queueName = []
// boucle sur les queues
for (var i = 0; i < queueIds.length; i++) {
var queueId = queueIds[i]; // String | Queue ID
var body = {
"acwSettings": {
"timeoutMs": 480000,
}
}
apiInstance.putRoutingQueue(queueId, body)
.then((data) => {
console.log(putRoutingQueue success! data: ${JSON.stringify(data, null, 2)}
);
})
.catch((err) => {
console.log('There was a failure calling putRoutingQueue');
console.error(err);
});
};
but when i execute it on purecloud code editor, an error occured
"message": "The name property must not be empty.",
I don't want to update name, just the timeout .. how should i do this ?
Thanks for support
Cheers
A PUT operation replaces the configuration with the configuration you specify. If there was a name and you're not sending a name in the request, you're asking that the name be removed from the configuration. Best practice is to retrieve the queue's configuration, update that configuration to suit your needs, then send that configuration in the PUT request.
1 Like
Thanks for your quick answer. Ok i see, i was trying with 2 queue on wich i know the id .. ut do you know to retrieve only all queue id of my organisation ?
Works like a charm, thx a lot for your time again.
Just one last question about this method getRoutingQueues, i'm looking a way to optimize requests i did.
is there a way to list all queue without handling paging ? i mean as 25 items is the default size, when i've got
"pageSize": 25,
"pageNumber": 1,
"total": 178,
"firstUri": "/api/v2/routing/queues/divisionviews/all?pageSize=25&pageNumber=1",
"selfUri": "/api/v2/routing/queues/divisionviews/all?pageSize=25&pageNumber=1",
"lastUri": "/api/v2/routing/queues/divisionviews/all?pageSize=25&pageNumber=8",
"nextUri": "/api/v2/routing/queues/divisionviews/all?pageSize=25&pageNumber=2",
"pageCount": 8
i need to make 7 more calls ..
Thanks by advance
You can set the page size, but the resource is always paged.
what do you recommend so ? pageSize=300 to be sure to have all in one ?
system
Closed
November 18, 2019, 3:49pm
10
This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.