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.
read:audit-log:confluence
Connect apps cannot access this REST resource.
string
string
string
integer
integer
Returned if the requested records are returned.
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());
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": {}
}
Creates a record in the audit log.
Permissions required: 'Confluence Administrator' global permission.
read:audit-log:confluence
, write:audit-log:confluence
Connect apps cannot access this REST resource.
The record to be created in the audit log.
object
string
Requiredinteger
string
string
string
boolean
AffectedObject
array<ChangedValue>
array<AffectedObject>
Returned if the record is created in the audit log.
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());
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>"
}
]
}
Exports audit records as a CSV file or ZIP file.
Permissions required: 'Confluence Administrator' global permission.
read:audit-log:confluence
Connect apps cannot access this REST resource.
string
string
string
string
Returned if the requested export of the audit records is returned.
string
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());
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.
read:audit-log:confluence
Connect apps cannot access this REST resource.
This request has no parameters.
Returned if the requested retention period is returned.
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());
1
2
3
4
{
"number": 45,
"units": "NANOS"
}
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.
write:audit-log:confluence
Connect apps cannot access this REST resource.
The updated retention period.
integer
Requiredstring
RequiredReturned if the retention period is updated.
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());
1
2
3
4
{
"number": 45,
"units": "NANOS"
}
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.
read:audit-log:confluence
Connect apps cannot access this REST resource.
integer
string
string
integer
integer
Returned if the requested records are returned.
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());
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: