I am trying to find out if a user has permissions to administer a specific Jira project, but the REST API responds to wrong information or I am not calling it correctly.
You said you were trying to find the permissions “of a user” but then you used the /rest/api/3/mypermissions endpoint. That endpoint is for checking your permissions, not another user’s permissions.
If you are saying the you know you have Administer Project permission on the project ‘TEST’ but the REST API is telling you that you don’t have Administer Project permissions, then that is a different topic.
You might want to read the documentation for that endpoint again, especially the part that says:
If no account ID is provided, the operation returns details for the logged in user.
Given that you didn’t provide an account ID in your request, the REST API did exactly what you asked it to do, and returned the permissions of the logged in user… which is you.
I think what’s happening here is that your user, although it can see the project settings, is not a member of a project role or group where Administer Projects permission has been granted to (refer to the blue box in the image below). In which case, the REST API is returning the correct response. Also, I notice in your screenshot that your test project is a company-managed project, hence, you need to verify the permission schemes.
To verify that, click on permission helper (the one in the red box), and test your user if it has Administer Projects permission. If indeed you do not have the said permission, you can expand the text in the modal to explain what went wrong.
If my gut feel is correct, you just need to add your user in a project role or group with Administer Project permission, call the API again - either the /mypermissions or the bulk permission - then there should be changes in the response (what you’re expecting).