Solved

API query limit

  • 20 December 2023
  • 6 replies
  • 70 views

Userlevel 2

Hello,

I've begun some PHP integrations to extract statistics from Pipefy, using this query:

 $query = <<<GRAPHQL
    {
        pipe(id: xxxxxxxxx) { 
            phases {
                name
                cards(first: 100) { 
                    edges {
                        node {
                            id
                            fields {
                                name
                                value
                            }
                            assignees {
                                name
                            }
                        }
                    }
                }
            }
        }
    }
    GRAPHQL;

 

The data is being displayed in a vertical menu format, and it's working wonderfully. However, there's one issue: a specific phase only shows a maximum of 30 records. I understand this is due to an API pagination limitation, but I need a workaround. For instance, if we have 100 cards in one phase, how can I retrieve all of them?  How do I modify my code?

 

Thanks

J

icon

Best answer by antonio-nykael 20 December 2023, 11:10

View original

6 replies

Userlevel 6
Badge +1

Hello,

The maximum is: 50 cards/records per pipe or 30 cards per phase.

You can check more details about pagination at this link: 

 

Userlevel 2

I've attempted to adjust my code numerous times, but to no avail. Could you assist me in understanding how to alter my current GraphQL query to include 60 cards per phase?

Userlevel 7
Badge +12

Hi @Jay2241 ; you will have to make more than one query to get 60 cards. There is simply no query allowed that returns more than 30 cards per phase, so you have to use pagination and therewith more than one query. Think of it like pages in a book, each page only allows 30 cards, but you can just open the next page to get more.

Userlevel 2

Hi @Jay2241 ; you will have to make more than one query to get 60 cards. There is simply no query allowed that returns more than 30 cards per phase, so you have to use pagination and therewith more than one query. Think of it like pages in a book, each page only allows 30 cards, but you can just open the next page to get more.

 

this means just to get a stats of 60 cards (i.e the status of the cards) we will have to use up 2 API calls from our quota? 

Userlevel 7
Badge +12

Unfortunately, yes.

Userlevel 2

Ok, it’s too expensive. Thank you for your input though. 

Reply