Forums

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

Getting 302 status code when calling the endpoint rest/api/2/attachment/meta as a logged in user

Emil Pedersen August 10, 2023

I'm trying to access the endpoint rest/api/2/attachment/meta to be able to find out the upload limit for the attachments. This works fine when I'm logged in as an admin. But when I'm logged in as a user, the rest/api/2/attachment/meta returns a status code of 302 with a new location for the user to be redirected to. Why can't i access this endpoint as a logged in user? Is there any permissions that the logged in user is missing to be able to successfully reach the endpoint?

Screenshot 2023-08-10 at 14.25.08.png

1 answer

0 votes
Kurt Klinner
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 12, 2023

@Emil Pedersen 

Just had a quick look to the API documentation

Consumers of this resource may also need to check if the logged in user has permission to upload or otherwise manipulate attachments

 

Does the user you are using have the right set of permissions?

You might want to double check for the version you are using

https://docs.atlassian.com/software/jira/docs/api/REST/8.20.0/#attachment-getAttachmentMeta

 

Cheers

Kurt

Emil Pedersen August 29, 2023

Hi @Kurt Klinner,

Thank you for responding to this issue. I have checked the permissions and the user has sufficient permissions to create/view/delete attachments. Even with the correct permissions still no success. I decided to write my own end point instead of using the rest/api/2/attachment/meta end point.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
SERVER
TAGS
AUG Leaders

Atlassian Community Events