Solved

Webhook and attachments

  • 18 June 2021
  • 2 replies
  • 260 views

Dear all,

 

Currently we are using the webhook API with some attachements, but we can't figure out the full path of the uploaded item:

This is a response example 
"uploads/04442dae-6d3a-43a9-bd62-5b61e8d61def/Gui.png"

Do you have any idea?

 

Regarda

icon

Best answer by genietim 22 June 2021, 15:22

View original

2 replies

Userlevel 7
Badge +6

Hi @caio-lopes1 ,

I don’t know anything about API, but I think @genietim does! Tagging him here in hopes he can help answer your question.

Sarah

Userlevel 7
Badge +12

Hi Caio Lopes!

(and Sarah, thanks for the shout-out.)

Assuming you can simply do GraphQL Queries, there are various queries on how you could get the full URL. Your query could look like this, for example:

query {
card(id: <your-Card-Id>) {
id suid attachments { url createdAt }
}
}

and

url

will be the full URL to your attachment.

 

If you need a specific attachment by field, you can query the field together with the attachment, for example:

query {
card(id: <your-Card-Id>) {
id suid attachments { url createdAt field { id internal_id label } }
}
}

and then filter with your code.

Reply