I am using the mangagement unit/user search with the async enabled to simulate a delay as the number of record could be large.
POST /api/v2/workforcemanagement/managementunits/{mgtunitid}/agentschedules/searchforceAsync=true
I am returned a operation id but when using it against the
GET /api/v2/workforcemanagement/schedulingjobs/{jobId}
I get a 404.
Is this the correct API to be using?
If not what should I use?
For the record, the endpoint you found (GET /api/v2/workforcemanagement/schedulingjobs/{jobId}) is actually an unrelated resource for a different wfm feature. Currently the only way to get the results of the search job is via the notification topic.
Also note, that ?forceAsync=true flag is only intended for use during testing so you can test both the synchronous workflow (results are returned directly via your initial http call) and the asynchronous flow (results are returned via notification). There's no harm, technically, in always passing the flag but you should know your app will see improved performance by implementing it to work with either flow automatically as many searches will return synchronously if that flag is not set.