Skip to main content
Solved

[API] List All Cards

  • November 28, 2022
  • 2 replies
  • 752 views

nortonmnobrega

I wanted to know if I can use the API to list all the cards I have in a pipe to be able to set up an integration.

Best answer by marcos.pedrosa

Hello there, @nortonmnobrega
Hope you’re doing alright 😃


You can use the exemple query below in order to list the cards in a pipe. 
 {
cards(pipe_id: 123456, first: 10, search: {title: "Stark"}) {
 edges {
 node {
 id
 title
 assignees {
 id
 }
 comments {
 text
 }
 comments_count
 current_phase {
 name
 }
 done
 due_date
 fields {
 name
 value
 }
 labels {
 name
 }
 phases_history {
 phase {
 name
 }
 firstTimeIn
 lastTimeOut
 }
 url
 }
 }
 }
}


You can use the attributes below if you need to filter the cards. 

 

It’s important to say that we have pagination so you can see all cards within the phase. The current limit of cards/records shown is 30 cards per phase and 50 cards per pipe. Pagination works like this;

  {    allCards(pipeId: 123456, first: 50) {    pageInfo {      hasNextPage      endCursor    }    edges {      node {        id      }    }  }}

You will set the
pageInfo 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 {hasNextPageendCursor}edges {node {id}}}}

 

Please let me know if this helps, alright ?

 

View original
Did this topic help you find an answer to your question?
This topic has been closed for comments

2 replies

marcos.pedrosa
Pipefy Staff
Forum|alt.badge.img+2
  • Pipefy Staff
  • 41 replies
  • Answer
  • November 28, 2022

Hello there, @nortonmnobrega
Hope you’re doing alright 😃


You can use the exemple query below in order to list the cards in a pipe. 
 {
cards(pipe_id: 123456, first: 10, search: {title: "Stark"}) {
 edges {
 node {
 id
 title
 assignees {
 id
 }
 comments {
 text
 }
 comments_count
 current_phase {
 name
 }
 done
 due_date
 fields {
 name
 value
 }
 labels {
 name
 }
 phases_history {
 phase {
 name
 }
 firstTimeIn
 lastTimeOut
 }
 url
 }
 }
 }
}


You can use the attributes below if you need to filter the cards. 

 

It’s important to say that we have pagination so you can see all cards within the phase. The current limit of cards/records shown is 30 cards per phase and 50 cards per pipe. Pagination works like this;

  {    allCards(pipeId: 123456, first: 50) {    pageInfo {      hasNextPage      endCursor    }    edges {      node {        id      }    }  }}

You will set the
pageInfo 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 {hasNextPageendCursor}edges {node {id}}}}

 

Please let me know if this helps, alright ?

 


marcos.pedrosa
Pipefy Staff
Forum|alt.badge.img+2

Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings