Skip to main content
Question

JIRA SERVICE MANAGEMENT PUT REQUEST WEBHOOKS

  • 21 June 2024
  • 2 replies
  • 18 views

Hi all, I am trying to do a put request in Zapier since I want to assign a JIRA ticket in Jira Service Management based on the previous steps I created.

In Postman I have managed to do a PUT request with Basic Auth (username + password which is API token) and this body:

{

"fields": {

"assignee": {

"accountId": "example"

}

}

}

Could you please give me some guidance on how to resolve this issue? Many thanks in advance!

Here are the screenshots:

 

This post has been closed for comments. Please create a new post if you need help or have a question about this topic.

2 replies

Userlevel 7
Badge +14

Hi @Jelena 

Error: The ticket does not exist or you are not authorized to view it.

 

If you are trying to update a ticket to set an assignee, then try this Jira API endpoint docs: https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issues/#api-rest-api-3-issue-issueidorkey-assignee-put

 

NOTE: Make sure to set both Headers.

 

// This sample uses Atlassian Forge
// https://developer.atlassian.com/platform/forge/
import api, { route } from "@forge/api";

var bodyData = `{
"accountId": "5b10ac8d82e05b22cc7d4ef5"
}`;

const response = await api.asUser().requestJira(route`/rest/api/3/issue/{issueIdOrKey}/assignee`, {
method: 'PUT',
headers: {
'Accept': 'application/json',
'Content-Type': 'application/json'
},
body: bodyData
});

console.log(`Response: ${response.status} ${response.statusText}`);
console.log(await response.json());

 

 

Many thanks!