Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

How do you list all webhook ID's monitoring a model?

Edited

How do I find out the webhook ID's currently monitoring a model?

2 answers

@Ryan 

You can list the Webhooks via api and extract the idModel. 

I have the idModel, what I need is the webhook id.

What API call do I make? Can you point me to some documentation?

@Ryan 

I don't work with Rest API directly since I am using py-trello. Looking at the library and comparing with Trello API documentation it should be 

https://developer.atlassian.com/cloud/trello/rest/api-group-tokens/#api-tokens-token-webhooks-get


url = "/tokens/%s/webhooks" % token
return self._existing_hook_objs(self.fetch_json(url), token)

Hi @milynnus

Thanks for replying. What is the token in this scenario?

Is the token mentioned in this API reference documentation different to the token for authentication (i.e. secret & user token)?

https://developer.atlassian.com/cloud/trello/rest/api-group-tokens/#api-tokens-token-get

Thanks for your help.

@Ryan 

 

Tried my hand on using REST API "as is". With the documented API example I got a 401. I supplied the key and it returned the list I wanted.

 

url = "https://api.trello.com/1/tokens/{}/webhooks".format(client.resource_owner_key)

headers = {
"Accept": "application/json"
}

query = {
'key': client.api_key,
'token': client.resource_owner_key
}

response = requests.request(
"GET",
url,
headers=headers,
params=query
)

print(response.text)

@Ryan 

Because I am using BenkoBoard , there were webhooks registered with the token I used for that application. It is also the one I used for my application development hence I have a client - hence client.resource_owner_key...etc

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Posted in Trello

Taco Tuesday: Your favorite Trello blog takeaway

Hello friends! From the community that brought you Welcome Wednesday, Throwback Thursday and Friday Fun, welcome to Taco Tuesday, a weekly discussion about all things Trello. The best part? One Tac...

215 views 10 9
Join discussion

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you