Legacy Dev Forum Posts

 View Only

Sign Up

  • 1.  Agent schedules

    Posted 06-05-2025 18:18

    wu_edward | 2020-11-14 01:32:22 UTC | #1

    Hi,

    I tried to pull schedules of all agents. I was trying this end point /api/v2/workforcemanagement/businessunits/{businessUnitId}/agentschedules/search. For the body properties, if I didn't specify any user id, it would not return any schedules. However when I specified an user id, it returned the user's schedule. How can I get all users' schedule?

    { "startDate": "2020-11-13", "endDate": "2020-11-20", "userIds": ["d5f8a2d4-xxxx-xxxx-xxxx-7c0c892dd5a9"] }

    Thanks, Ed


    wu_edward | 2020-11-14 02:04:31 UTC | #2

    Or is there a way to get the list of agents in the BU? I was not able to find it.


    Langsford_Jay | 2020-11-30 13:48:27 UTC | #3

    You can use the following: https://developer.mypurecloud.com/api/rest/v2/workforcemanagement/#get-api-v2-workforcemanagement-businessunits--businessUnitId--weeks--weekId--schedules--scheduleId-

    While we do not currently have an endpoint to fetch all agents for a BU, we do have an endpoint to do this for a MU. So you would have to utilize the first endpoint below to get a list of all MUs, then iterate those calling the second endpoint below.


    system | 2020-12-31 13:41:46 UTC | #4

    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: 9316