Solved

[API] List All Cards

  • 28 November 2022
  • 2 replies
  • 503 views

Userlevel 1

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.

icon

Best answer by marcos.pedrosa 28 November 2022, 15:18

View original

This topic has been closed for comments

2 replies

Userlevel 6
Badge

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 ?

 

Userlevel 6
Badge

More info can be found here:

https://developers.pipefy.com/reference/cards