Hi,
I've read the page of Atlassian Connect about REST APIs in Confluence. I've tried several of those APIs but I can't succeed to get enough information about users.
I'd like to get:
It seems the official way is just to access REST resources on behalf of the user, and we'll be told whether it's 403-Forbidden or not. It integrate well if the add-on hosts and serves data.
FYI, here's the JSON I get for http://localhost:1990/confluence/rest/prototype/1/search/user?query=admin
{ "totalSize": 1, "result": [ { "id": "589825", "type": "user", "title": "admin", "wikiLink": "[~admin]", "createdDate": { "friendly": "Jan 06, 2012", "date": "2012-01-06T13:33:40+0100" }, "creator": { "links": [ { "href": "http://localhost:1990/confluence/rest/prototype/1/user/system/anonymous", "rel": "self" } ], "avatarUrl": "/confluence/s/en_GB/5780/NOCACHE1/_/images/icons/profilepics/anonymous.png", "anonymous": true, "displayName": "Anonymous" }, "lastModifier": { "links": [ { "href": "http://localhost:1990/confluence/rest/prototype/1/user/system/anonymous", "rel": "self" } ], "avatarUrl": "/confluence/s/en_GB/5780/NOCACHE1/_/images/icons/profilepics/anonymous.png", "anonymous": true, "displayName": "Anonymous" }, "username": "admin", "userKey": "8a8082a04ed4a5f8014ed4a60a610003", "thumbnailLink": { "href": "http://localhost:1990/confluence/images/icons/profilepics/default.png", "type": "image/png", "rel": "thumbnail" }, "link": [ { "href": "http://localhost:1990/confluence/display/~admin", "type": "text/html", "rel": "alternate" }, { "href": "http://localhost:1990/confluence/spaces/flyingpdf/pdfpageexport.action?pageId=589825", "type": "application/pdf", "rel": "alternate" }, { "href": "http://localhost:1990/confluence/rest/prototype/1/content/589825", "rel": "self" } ] } ], "group": [] }
Community moderators have prevented the ability to post new answers.
If you access the REST resources from within an iframe, using AP.request
, it will be as the current user.
You may also want to look at conditions, which include things such as user_is_admin
.
If you feel like your usecase is not covered by these options, you can open up request for that.
This is the list of white-listed JIRA REST API endpoints: https://developer.atlassian.com/static/connect/docs/latest/scopes/jira-rest-scopes.html
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Peter, the link you provide is provided in my question, as the 2nd word, after "Hi".
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Ah yes, so it is. Also, administrators can change permissions on a whim at any moment, so you do need to handle 403 rejections.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.