Skip to main content
Solved

Get data from connection fields through API


Nithael Sampaio
Forum|alt.badge.img

I built a python code to connect Pipefy to PowerBI, and achieved the result of a general exported report through a cards query, gathering all field data. But, connection fields only return their title in a similar fashion to “[connected_card_title]”.

 

Searching the API documentation I found reference to:

CardField values information, connectedRepoItems query
​​​​​​

Which I thought would be the solution to gather connected field data. Still, it only added to the field object the following:

{'connectedRepoItems': [{}], 'name': '...', 'value': '...'}

It can identify, correctly, which fields are connections, returning  [{}], and which fields aren’t returning ‘None’.

 

However, there is no information attached that could lead me to the connected card or register data.

 

Is there a way to directly gather data from a connected field, or will I need to pull data from all pipefy sources and compare titles to achieve it?

 

The problem of the latter is pipe connections where it’s possible to have cards with the same title and the added efficiency cost.

 

TL;DR Is there a query method that returns connected field data?

Best answer by lais_lot

Hey @Nithael Sampaio  , how are you doing today?

You can use the query below:

 

{
  cards(pipe_id:1234567){
    edges{
      node{
        child_relations{
          cards{
            title
            id
            fields{
              value
              name
            }
          }
          name
          id
        }
      }
    }
  }
}

If you want to know about the parents just change the "child_relations" to "parent_relations" :)

Hope it helps. If you have any questions, let me know!

View original
Did this topic help you find an answer to your question?

2 replies

lais_lot
Pipefy Staff
  • Pipefy Staff
  • 16 replies
  • Answer
  • August 3, 2020

Hey @Nithael Sampaio  , how are you doing today?

You can use the query below:

 

{
  cards(pipe_id:1234567){
    edges{
      node{
        child_relations{
          cards{
            title
            id
            fields{
              value
              name
            }
          }
          name
          id
        }
      }
    }
  }
}

If you want to know about the parents just change the "child_relations" to "parent_relations" :)

Hope it helps. If you have any questions, let me know!


Nithael Sampaio
Forum|alt.badge.img

Thank you very much @lais_lot , it works :grin:


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