Expanding all the values in the JSON response

Hi,

I am getting an unexpanded attribute in the JSON response for a few API endpoints, which expand when called for a single key.
For eg. in case of the Evaluation forms endpoint
https://api.mypurecloud.com/api/v2/quality/forms/evaluations
I am getting below response, where the questionGroups is not expanded.

{

"entities": [

    {

        "id": <form-id>,

        "name": <form-name>,

        "modifiedDate": "2010-08-06T20:25:31.182Z",

        "published": false,

        "contextId": <id>,

        **"questionGroups": [],**

        "weightMode": "SCALED",

        "selfUri": "/api/v2/quality/forms/evaluations/<form-id>"

    }

But when I GET for https://api.mypurecloud.com/api/v2/quality/forms/evaluations/"specific form ID", the questionGroups is expanded with all the details in it.

I need this to happen in the normal endpoint Url, so that I can get full list with the deepest object expanded.
This is also happening in the "routing/flows" or "routing/queues" endpoints in GET calls.

Hi,

The only valid value that can be used as an expand parameter is publishHistory. The questionGroups cannot be expanded and is left as an empty list for legacy reasons.
If you want to get expanded questionGroups the best option is to use /api/v2/quality/forms/evaluations to get a list of evaluations IDs and call /api/v2/quality/forms/evaluations/"specific form ID" for each ID to get the expanded questionGroups.

You mentioned it's the " best option" but are there any other options available? My org also needs to questionGroups expanded and it would be more convenient if we did not need to pass the form id since we will likely have many forms.

The API resources Ronan posted are the correct way to get evaluation data. You can request new features and share your use case at https://genesyscloud.ideas.aha.io/.

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