I am trying to create a web hook programmatically using atlassian-connect-spring-boot. In the documentation, the following is specified:
@Autowired private AtlassianHostRestClients atlassianHostRestClients; public void doSomething() { atlassianHostRestClients.authenticatedAsAddon().getForObject("/rest/api/example", Void.class); }
I changed it to postForOject as the creation of a web hook is a POST but I get a 400 Bad Request, which I guess means the payload I am passing is wrong but I get no other details, my payload is as follows (Apologies about the format), which I found here
{
"url": "https://your-app.example.com/webhook-received",
"webhooks": [
{
"events": [
"jira:issue_created",
"jira:issue_updated"
],
"fieldIdsFilter": [
"summary",
"customfield_10029"
],
"jqlFilter": "project = PROJ"
},
{
"events": [
"jira:issue_deleted"
],
"jqlFilter": "project IN (PROJ, EXP) AND status = done"
},
{
"events": [
"issue_property_set"
],
"issuePropertyKeysFilter": [
"my-issue-property-key"
],
"jqlFilter": "project = PROJ"
}
]
}
atlassianHostRestClients.authenticatedAsAddon(AddonAuthenticationType.OAUTH2).getForObject("/rest/api/example", Void.class);
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.