Question

How to get all cards from phase?

  • 15 October 2021
  • 9 replies
  • 60 views

Userlevel 2

How to get all cards from phase? And if the phase has more 50 cards, what i have to do?


9 replies

Userlevel 6
Badge +4

Hello how are you? Do you want to move all these cards? If so, you can create an automation to move all those cards to the next stage. If you don't know how to create an automation, take a look at this article:
https://help.pipefy.com/pt-BR/articles/3675228-como-crio-uma-automacao-para-mover-cards

Userlevel 2

Hello Rafel,

I didn't explain it correctly, I'd like to get all the info for the cards of a specific phase through the api.
Userlevel 6
Badge +4

Hello @karmendes if the pipe have more than 50 cards tou should add the request pageInfo to the query, so answer will send a code that you could add as a param(after: ) to the request to start from there.

Ex: 

{
allCards(pipeId:**********) {
edges {
node {
id
}
}
pageInfo {
endCursor
startCursor
}}

}

Than:

{
allCards(pipeId:*********, after:"abcde") {
edges {
node {
id
}
}
pageInfo {
endCursor
startCursor
}}

}

 

Userlevel 7
Badge +6

@karmendes did you get the answer you needed?

Userlevel 2

Not Exactly, but i have other problem now.

Userlevel 6
Badge +4

Not Exactly, but i have other problem now.

How can i help you?

Userlevel 2

I am searching for all cards from specific phase from pipe, but my call to api when i pass pageInfo(endCursor) i have a error.

query
payload_test = {"query": "{phase(id:xxxxx,after:'xxx'){name cards_count cards {edges {node {age}}pageInfo {endCursor hasNextPage}}}}"}

I receive
{'errors': [{'message': 'Parse error on "\'" (error) at [1, 27]', 'locations': [{'line': 1, 'column': 27}]}]}

Userlevel 6
Badge +4

I am searching for all cards from specific phase from pipe, but my call to api when i pass pageInfo(endCursor) i have a error.

query
payload_test = {"query": "{phase(id:xxxxx,after:'xxx'){name cards_count cards {edges {node {age}}pageInfo {endCursor hasNextPage}}}}"}

I receive
{'errors': [{'message': 'Parse error on "\'" (error) at [1, 27]', 'locations': [{'line': 1, 'column': 27}]}]}

Maybe its beacuse you dont need this text at the start, you can run the query from the {phase...

Userlevel 6
Badge +4

I am searching for all cards from specific phase from pipe, but my call to api when i pass pageInfo(endCursor) i have a error.

query
payload_test = {"query": "{phase(id:xxxxx,after:'xxx'){name cards_count cards {edges {node {age}}pageInfo {endCursor hasNextPage}}}}"}

I receive
{'errors': [{'message': 'Parse error on "\'" (error) at [1, 27]', 'locations': [{'line': 1, 'column': 27}]}]}

Maybe its beacuse you dont need this text at the start, you can run the query from the {phase...

Like this 

 

Reply