cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
lkaspar
Resolver I
Resolver I

Pagination Error with Zendesk API

Hi All,

 

I am using the Zendesk API to get a list of users in Zendesk - Zendesk developers - API docs.

 

The maximum number of records returned per page is 100.

 

When I issue a GET request without pagination turned on, it only fetches the first 100 records

lkaspar_0-1617849651721.png

 

If I turn on Pagination and set the threshold to 100 

 

lkaspar_1-1617849764283.png

 

I get this error:

 

The response is not a valid paginated response. The paginated response is missing a property 'value' of type array.

 

 

The schema of the response looks like this:

 

 

{
    "type": "object",
    "properties": {
        "users": {
            "type": "array",
            "items": {
            }
        },
        "next_page": {
            "type": "string"
        },
        "previous_page": {},
        "count": {
            "type": "integer"
        }
    }
}

 

 

It looks like Flow is complaining about the property being called users and not value.

 

Any help would be appreciated.

 

4 REPLIES 4
ChristianAbata
Super User
Super User

hi @lkaspar  if the error is on compose , what you need to do is change the inside compose formula, because if you active the pagination the schema could be different. And the expressions are not updated automatically



Did I answer your question? Please consider to Mark
my post as a solution! to guide others :winking_face:

Proud to be a Flownaut!


If you want you can follow me at www.christianabata.com Quieres contenido en español? Síguenos en Power Automate LA
lkaspar
Resolver I
Resolver I

Hi @ChristianAbata  - the error is on GetUsers

lkaspar_1-1617851116296.png

 

 

I am using the Compose to see how many records are actually returned.

 

ChristianAbata
Super User
Super User

@lkaspar  could you try adding this to your schema {"body":{"value":[]}}



Did I answer your question? Please consider to Mark
my post as a solution! to guide others :winking_face:

Proud to be a Flownaut!


If you want you can follow me at www.christianabata.com Quieres contenido en español? Síguenos en Power Automate LA
lkaspar
Resolver I
Resolver I

@ChristianAbata - I am afraid I don't know where you want me to modify the schema. I am not able to issue the GET request or receive a response which I could parse if I turn on pagination. Flow just fails with this error

lkaspar_0-1617851646551.png

 

 

Helpful resources

Announcements
 WHAT’S NEXT AT MICROSOFT IGNITE 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Register for a Free Workshop.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

September Events 2022

Check out all of these events

Attend in person or online, there are incredible conferences and events happening all throughout the month of September.

Users online (3,873)