So in my app I need to check whether a user is able to administer Confluence in the cloud. Unfortunately it’s not easy to find in the documentation. Of course you would expect to find something like this in some /user endpoint but if you click through the nested objects it only shows entity type values for targetType.
But if you actually hit the endpoint you will notice that there is another undocumented targetType: application.
...
"operations": [
{
"operation": "use",
"targetType": "application"
},
{
"operation": "administer",
"targetType": "application"
},
{
"operation": "create_space",
"targetType": "application"
}
],
...
So this is exactly what you need when you want to check whether a user is a Confluence administrator. It’s just hidden well.
The respective URLs to use are:
https://{YOUR_URL}.atlassian.net/wiki/rest/api/user/current?expand=operations
or
https://{YOUR_URL}.atlassian.net/wiki/rest/api/user?accountId={USER_ID}&expand=operations
Thanks again @daniel and @mike-scriptlover for the help!
(Posting here so other people will be able to find this via Google in the future
)



