I'm trying to access Confluence Audit Records using the following endpoint wiki/rest/api/audit per these docs but am receiving 401 errors.
I've been able to successfully access Audit Records using Basic Auth for Jira and am using the same token I created in the Developer Console. In the 3LO app, I've ensured I have the read audit record granular scope checked.
The documentation states that the Confluence Administrator' global permission is required, but my org is unable to grant me that permission. Instead, they've authorized my app, and believe this is sufficient.
The simple example I'm following for the CURL request from docs here:
curl -D- \
-X GET \
-H "Authorization: ${username:token}" \
-H "Content-Type: application/json" \
"https://${MY_SERVER}.atlassain.net/wiki/rest/api/audit"
HTTP/2 302
cache-control: max-age=0, private, must-revalidate
content-length: 11
date: Tue, 22 Aug 2023 19:08:44 GMT
location: http://ww1.atlassain.net
server: Cowboy
set-cookie: sid={COOKIE}; path=/; domain=.atlassain.net; expires=Sun, 09 Sep 2091 22:22:51 GMT; max-age=${AGE}; secure; HttpOnly
Redirecting% ~ .......................................................................................... took 4s at 03:08:44 PM
curl --location 'https://${MY_SERVER}.atlassian.net/wiki/rest/api/audit' \
--header 'Accept: application/json' \
--header 'Authorization: Basic ${ENCODED_TOKEN}' \
<html>
<head>
<title>Unauthorized (401)</title>
...
...
Hi @andrea_piazza ,
When you run the curl command, you use your own email and token. That means you will get a 401 when you are not a global admin.
The 3LO app permissions are independent of the Basic Auth you use with the curl commands.
Thank you! @marc -Collabello--Phase Locked- is there any way to access the audit records without global admin permissions, my IT staff only wants me to access audit records and nothing else so I can't have global permissions to write our integration. Thank you for your help!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
According to the documentation, it is possible through a 3LO app. However that likely won't work with curl.
I do not have experience with this.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.