Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

UI vs API for assigning

G M July 28, 2022

In my instance I can update the assignee in the UI, but If I use the API call it gives me a 403 response. I have developer access to the project. Does anyone know why it would block me only via the API?

API call:

PUT https://{jira-api}.com/rest/api/2/issue/{issueid}/assignee

data '{
"name": "null"
}'

 

response:

{
"errorMessages": [
"You do not have the permission to see the specified issue."
],
"errors": {}
}

1 answer

0 votes
Florian Bonniec
Community Champion
July 28, 2022

Hi

 

The user you use with the API is not the same you are using in the UI and both of you do not have the same access or you do not have access to the issue in JIRA.

 

You can use key instead ID to make sure there is no mistake and you are reaching the issue you are expecting.

G M July 29, 2022

I am using the same account for both the UI and the API call, which is why the permission is confusing. and I did try both the key and the ID separately but I got a 403 both times

Florian Bonniec
Community Champion
July 29, 2022

Have you add the following hearders to your request ?

"Content-Type", "application/json"

"Accept", "application/json"

G M July 29, 2022

yes I do

G M July 29, 2022

I had them already, still get a 403 :(

Florian Bonniec
Community Champion
July 29, 2022

What is the response if you do a GET of the same issue using the API ?

G M July 29, 2022

for this API I get a 405 error trying GET instead of PUT

Florian Bonniec
Community Champion
July 29, 2022

And for this one ?

 

GET https://{jira-api}.com/rest/api/2/issue/{issueid}

 

Removing /assignee

G M July 29, 2022

I get a 403 with that one

Florian Bonniec
Community Champion
July 29, 2022

When you write {jira-api}, you mean your jira instance base url ?

G M July 29, 2022

yes I do. The calls I've done to get issues, create tickets, and get priorities all work

Suggest an answer

Log in or Sign up to answer