Missing Download URL from API response

Hi

I’m hoping someone can tell me how to obtain the results from the historical adherence API call using the API Explorer when the downloadUrl is missing.

Following this post, I successfully subscribed to the workforcemanagement.historicaladherencequery Topic under 'Notifications' and then ran the API from 'API Explorer' (/api/v2/workforcemanagement/adherence/historical). I received an Id and that queryState in 'Processing':

{
    "id": "0bd64b20-cc03-498a-93b9-a8ff9de6b8dc",
    "queryState": "Processing"
}

This documentation says that I should receive the Download URL within the completion notification response:

{
    "id": "string",
    "downloadUrl": "string",
    "downloadUrls": [
        {}
    ],
}

But I only receive this:

{
    "id": "0bd64b20-cc03-498a-93b9-a8ff9de6b8dc",
    "queryState": "Complete"
}

Can anyone advise how I can get the downloadURLs? From what I've read I've followed the steps correctly (i.e. subscribed and then run the query)

Thanks
Richard

What did you post to /api/v2/workforcemanagement/adherence/historical ?

Not returning a downloadUrls is normal behavior for this API if you've asked for something it can't or won't give, instead of an warning/error message you just get a successful nothing that tells you nothing.

To take it a step further - this API by design will never return the download url in the initial response, as the historical adherence queries take too long to return inline.

Per the doc, the downloadUrls property is For notification purposes only

POST /api/v2/workforcemanagement/adherence/historical

The following link contains a tutorial on subscribing to the websocket notification to retrieve the result of the historical adherence query:

https://developer.genesys.cloud/api/tutorials/historical-adherence-query/#language=java&step=0

Hey Richard,
I would recommend that you verify that the users you are requesting for are members of Management Units. If none of the users are members of a Management Unit, it is not possible to calculate historical adherence. Which leads to no download urls in the notification response.

Thanks for your help everyone. I can't explain it but when I run it this morning I get a download URL.. Maybe the underlying data has changed or maybe something I did but great to get the data I need.

Useful information nonetheless for when it fails next - I'll know what to look out for, and anyone else who has this issue.

Cheers

1 Like

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