How to get all cards from phase? And if the phase has more 50 cards, what i have to do?
How to get all cards from phase?
Best answer by marcos.pedrosa
Hello Renato and team,
in order to show all cards form a phase, you can use the query below:
query{
phase(id:XXXXXX){
cards{
edges{
node{
id
title
}
}
}
}
}
The current limit of cards/records shown is 30 cards per phase and 50 cards per pipe. Since our API has pagination in place, you’ll need to use the following example in order to list all the cards.
{
allCards(pipeId: 123456, first: 50) {
pageInfo {
hasNextPage
endCursor
}
edges {
node {
id
}
}
}
}
You will set thepageInfo
attribute and it will return the "endcursor
", with the endcursor you can see the other cards within that phase, putting it as an argument in the "after
" command. Example:
{
allCards(pipeId:123456, first:50, after:"WyIyLjI1IiwiMTg1LjAiLDI2ODc1OTNd"){
pageInfo {
hasNextPage
endCursor
}
edges {
node {
id
}
}
}
}
Hope that helps 😃
Reply
Join us in the Pipefy Community! 🚀
No account yet? Create an account
Login with your Pipefy credentials
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.