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

Next challenges

Recent achievements

  • Global
  • Personal

Recognition

  • Give kudos
  • Received
  • Given

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

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

Why POST [domain].atlassian.net/rest/webhooks/1.0/webhooks return only previously created webhooks

Hello,
I met issue with registering webhooks via rest API.
I make POST request to [domain].atlassian.net/rest/webhooks/1.0/webhooks

with sample body:

{

"name": "my first webhook via rest",

"url": "https://www.example.com/webhooks",

"events": [

"jira:issue_created", "jira:issue_updated"

],

  "excludeIssueDetails" : false

}
And i get 200 response with previously created webhooks via Admin panel and new webhook isn't registered.

Thanks in advance for responses


Grettings
Damian

1 answer

0 votes
Dario B Atlassian Team Oct 30, 2020

Hello @Damian Sowiński

Welcome to the Atlassian Community!

Creating a webhook via REST API, if successful, is returning status  code 201 followed by the information about the webhook you just created (and not the previous ones).

I have just tested this and it works fine for me on 2 different Jira instances (free and standard):

curl -u <EMAIL-ADDRESS>:<API-TOKEN> -D- -H 'Accept: application/json' -H 'Content-Type: application/json' --data '{"name":"webhook via rest","url":"https://www.example.com/webhooks","events":["jira:issue_created","jira:issue_updated"],"excludeIssueDetails":false}' -X POST "https://<NAME>.atlassian.net/rest/webhooks/1.0/webhook"

HTTP/2 201
server: AtlassianProxy/1.15.8.1
.......


{"name":"webhook via rest","url":"https://www.example.com/webhooks","excludeBody":false,"filters":{"issue-related-events-section":""},"events":["jira:issue_updated","jira:issue_created"],"enabled":true,"payloadVersion":"V2","self":"https://<NAME>.atlassian.net/rest/webhooks/1.0/webhook/1"........}

 Webhoos-via-REST.jpg

 

 

If you are getting a different behavior, can you kindly run the same test with curl and paste the result in your reply hiding the sensitive data as I did above?

 

Cheers,
Dario

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
FREE
PERMISSIONS LEVEL
Site Admin
TAGS

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