Legacy Dev Forum Posts

 View Only

Sign Up

Update Queue with putRoutingQueue method

  • 1.  Update Queue with putRoutingQueue method

    Posted 06-05-2025 18:15

    Gurwan_Duplenne | 2019-10-17 14:21:35 UTC | #1

    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


    tim.smith | 2019-10-17 14:32:59 UTC | #2

    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.


    Gurwan_Duplenne | 2019-10-17 14:45:06 UTC | #3

    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 ?


    tim.smith | 2019-10-17 15:05:59 UTC | #4

    getRoutingQueues


    Gurwan_Duplenne | 2019-10-17 15:12:13 UTC | #5

    Works like a charm, thx a lot for your time again.


    Gurwan_Duplenne | 2019-10-18 06:41:10 UTC | #6

    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


    tim.smith | 2019-10-18 15:21:37 UTC | #7

    You can set the page size, but the resource is always paged.


    Gurwan_Duplenne | 2019-10-18 15:24:18 UTC | #8

    what do you recommend so ? pageSize=300 to be sure to have all in one ?


    tim.smith | 2019-10-18 15:49:16 UTC | #9

    Per the documentation GET /api/v2/routing/queues/divisionviews/all:


    system | 2019-11-18 15:49:20 UTC | #10

    This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.


    This post was migrated from the old Developer Forum.

    ref: 6278