GET

Get audit records

Returns all records in the audit log, optionally for a certain date range. This contains information about events like space exports, group membership changes, app installations, etc. For more information, see Audit log in the Confluence administrator's guide.

Permissions required: 'Confluence Administrator' global permission.

Data Security Policy: Exempt from app access rules
Scopes
read:audit-log:confluence

Connect apps cannot access this REST resource.

Request

Query parameters

startDate

string

endDate

string

searchString

string

start

integer

limit

integer

Responses

Returned if the requested records are returned.

application/json

AuditRecordArray
GET/wiki/rest/api/audit
1 2 3 4 5 6 7 8 9 10 11 12 // This sample uses Atlassian Forge // https://developer.atlassian.com/platform/forge/ import api, { route } from "@forge/api"; const response = await api.asUser().requestConfluence(route`/wiki/rest/api/audit`, { headers: { 'Accept': 'application/json' } }); console.log(`Response: ${response.status} ${response.statusText}`); console.log(await response.json());
200Response
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 { "results": [ { "author": { "type": "user", "displayName": "<string>", "operations": {}, "username": "<string>", "userKey": "<string>", "accountId": "<string>", "accountType": "<string>", "externalCollaborator": true, "isExternalCollaborator": true, "isGuest": true, "publicName": "<string>" }, "remoteAddress": "<string>", "creationDate": 59, "summary": "<string>", "description": "<string>", "category": "<string>", "sysAdmin": true, "superAdmin": true, "affectedObject": { "name": "<string>", "objectType": "<string>" }, "changedValues": [ { "name": "<string>", "oldValue": "<string>", "hiddenOldValue": "<string>", "newValue": "<string>", "hiddenNewValue": "<string>" } ], "associatedObjects": [ { "name": "<string>", "objectType": "<string>" } ] } ], "start": 2154, "limit": 2154, "size": 2154, "_links": {} }
POST

Create audit record

Creates a record in the audit log.

Permissions required: 'Confluence Administrator' global permission.

Data Security Policy: Exempt from app access rules
Scopes
read:audit-log:confluence, write:audit-log:confluence

Connect apps cannot access this REST resource.

Request

Request bodyapplication/json

The record to be created in the audit log.

author

object

remoteAddress

string

Required
creationDate

integer

summary

string

description

string

category

string

sysAdmin

boolean

affectedObject

AffectedObject

changedValues

array<ChangedValue>

associatedObjects

array<AffectedObject>

Responses

Returned if the record is created in the audit log.

application/json

AuditRecord
POST/wiki/rest/api/audit
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 // This sample uses Atlassian Forge // https://developer.atlassian.com/platform/forge/ import api, { route } from "@forge/api"; var bodyData = `{ "author": { "type": "user", "displayName": "<string>", "operations": {}, "username": "<string>", "userKey": "<string>" }, "remoteAddress": "<string>", "creationDate": 226, "summary": "<string>", "description": "<string>", "category": "<string>", "sysAdmin": true, "affectedObject": { "name": "<string>", "objectType": "<string>" }, "changedValues": [ { "name": "<string>", "oldValue": "<string>", "hiddenOldValue": "<string>", "newValue": "<string>", "hiddenNewValue": "<string>" } ], "associatedObjects": [ { "name": "<string>", "objectType": "<string>" } ] }`; const response = await api.asUser().requestConfluence(route`/wiki/rest/api/audit`, { method: 'POST', headers: { 'Accept': 'application/json', 'Content-Type': 'application/json' }, body: bodyData }); console.log(`Response: ${response.status} ${response.statusText}`); console.log(await response.json());
200Response
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 { "author": { "type": "user", "displayName": "<string>", "operations": {}, "username": "<string>", "userKey": "<string>", "accountId": "<string>", "accountType": "<string>", "externalCollaborator": true, "isExternalCollaborator": true, "isGuest": true, "publicName": "<string>" }, "remoteAddress": "<string>", "creationDate": 59, "summary": "<string>", "description": "<string>", "category": "<string>", "sysAdmin": true, "superAdmin": true, "affectedObject": { "name": "<string>", "objectType": "<string>" }, "changedValues": [ { "name": "<string>", "oldValue": "<string>", "hiddenOldValue": "<string>", "newValue": "<string>", "hiddenNewValue": "<string>" } ], "associatedObjects": [ { "name": "<string>", "objectType": "<string>" } ] }
GET

Export audit records

Exports audit records as a CSV file or ZIP file.

Permissions required: 'Confluence Administrator' global permission.

Data Security Policy: Exempt from app access rules
Scopes
read:audit-log:confluence

Connect apps cannot access this REST resource.

Request

Query parameters

startDate

string

endDate

string

searchString

string

format

string

Responses

Returned if the requested export of the audit records is returned.

application/zip text/csv

string

GET/wiki/rest/api/audit/export
1 2 3 4 5 6 7 8 9 10 11 12 // This sample uses Atlassian Forge // https://developer.atlassian.com/platform/forge/ import api, { route } from "@forge/api"; const response = await api.asUser().requestConfluence(route`/wiki/rest/api/audit/export`, { headers: { 'Accept': 'application/zip' } }); console.log(`Response: ${response.status} ${response.statusText}`); console.log(await response.text());
GET

Get retention period

Returns the retention period for records in the audit log. The retention period is how long an audit record is kept for, from creation date until it is deleted.

Permissions required: 'Confluence Administrator' global permission.

Data Security Policy: Exempt from app access rules
Scopes
read:audit-log:confluence

Connect apps cannot access this REST resource.

Request

This request has no parameters.

Responses

Returned if the requested retention period is returned.

application/json

RetentionPeriod
GET/wiki/rest/api/audit/retention
1 2 3 4 5 6 7 8 9 10 11 12 // This sample uses Atlassian Forge // https://developer.atlassian.com/platform/forge/ import api, { route } from "@forge/api"; const response = await api.asUser().requestConfluence(route`/wiki/rest/api/audit/retention`, { headers: { 'Accept': 'application/json' } }); console.log(`Response: ${response.status} ${response.statusText}`); console.log(await response.json());
200Response
1 2 3 4 { "number": 45, "units": "NANOS" }
PUT

Set retention period

Sets the retention period for records in the audit log. The retention period can be set to a maximum of 1 year.

Permissions required: 'Confluence Administrator' global permission.

Data Security Policy: Exempt from app access rules
Scopes
write:audit-log:confluence

Connect apps cannot access this REST resource.

Request

Request bodyapplication/json

The updated retention period.

number

integer

Required
units

string

Required

Responses

Returned if the retention period is updated.

application/json

RetentionPeriod
PUT/wiki/rest/api/audit/retention
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 // This sample uses Atlassian Forge // https://developer.atlassian.com/platform/forge/ import api, { route } from "@forge/api"; var bodyData = `{ "number": 45, "units": "NANOS" }`; const response = await api.asUser().requestConfluence(route`/wiki/rest/api/audit/retention`, { method: 'PUT', headers: { 'Accept': 'application/json', 'Content-Type': 'application/json' }, body: bodyData }); console.log(`Response: ${response.status} ${response.statusText}`); console.log(await response.json());
200Response
1 2 3 4 { "number": 45, "units": "NANOS" }
GET

Get audit records for time period

Returns records from the audit log, for a time period back from the current date. For example, you can use this method to get the last 3 months of records.

This contains information about events like space exports, group membership changes, app installations, etc. For more information, see Audit log in the Confluence administrator's guide.

Permissions required: 'Confluence Administrator' global permission.

Data Security Policy: Exempt from app access rules
Scopes
read:audit-log:confluence

Connect apps cannot access this REST resource.

Request

Query parameters

number

integer

units

string

searchString

string

start

integer

limit

integer

Responses

Returned if the requested records are returned.

application/json

AuditRecordArray
GET/wiki/rest/api/audit/since
1 2 3 4 5 6 7 8 9 10 11 12 // This sample uses Atlassian Forge // https://developer.atlassian.com/platform/forge/ import api, { route } from "@forge/api"; const response = await api.asUser().requestConfluence(route`/wiki/rest/api/audit/since`, { headers: { 'Accept': 'application/json' } }); console.log(`Response: ${response.status} ${response.statusText}`); console.log(await response.json());
200Response
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 { "results": [ { "author": { "type": "user", "displayName": "<string>", "operations": {}, "username": "<string>", "userKey": "<string>", "accountId": "<string>", "accountType": "<string>", "externalCollaborator": true, "isExternalCollaborator": true, "isGuest": true, "publicName": "<string>" }, "remoteAddress": "<string>", "creationDate": 59, "summary": "<string>", "description": "<string>", "category": "<string>", "sysAdmin": true, "superAdmin": true, "affectedObject": { "name": "<string>", "objectType": "<string>" }, "changedValues": [ { "name": "<string>", "oldValue": "<string>", "hiddenOldValue": "<string>", "newValue": "<string>", "hiddenNewValue": "<string>" } ], "associatedObjects": [ { "name": "<string>", "objectType": "<string>" } ] } ], "start": 2154, "limit": 2154, "size": 2154, "_links": {} }

Rate this page: