Audit log improvements for developers
As part of the auditing feature, we have added the following endpoints to our REST API. Refer to this document for information on Java API method calls included in the audit log.
REST API
GET /rest/auditing/1.0/events
Parameters
Query parameters
Name | Description |
---|---|
| Date (date-time) The start timestamp in ISO8601 format |
| Date (date-time) The end timestamp in ISO8601 format |
| Integer (int32) The number of records to skip |
| StringLocation of last result returned in format of timestamp,ID. For making a request for page X, the value of this field can be obtained from pagingInfo->nextPageCursor in response for page X-1 |
| Integer (int32) The maximum number of records returned |
|
|
|
|
|
|
|
|
|
|
|
|
| Integer (int32) The maximum number of records to be scanned in the inverse insertion order, the default value is Integer.MAX_VALUE which means there is no limit |
Responses
- Status: 200 - Successful operation
{
"entities": [
{
"affectedObjects": [
{
"id": "string",
"name": "string",
"type": "string",
"uri": "string"
}
],
"author": {
"avatarUri": "string",
"id": "string",
"name": "string",
"type": "string",
"uri": "string"
},
"changedValues": [
{
"from": "string",
"i18nKey": "string",
"key": "string",
"to": "string"
}
],
"extraAttributes": [
{
"name": "string",
"nameI18nKey": "string",
"value": "string"
}
],
"method": "string",
"node": "string",
"source": "string",
"system": "string",
"timestamp": "2020-09-04T04:12:58.618Z",
"type": {
"action": "string",
"actionI18nKey": "string",
"category": "string",
"categoryI18nKey": "string"
}
}
],
"pagingInfo": {
"lastPage": true,
"nextPageCursor": {
"cursor": "string"
},
"nextPageLink": "string",
"nextPageOffset": 0,
"size": 0
}
}
- Status: 400 - Bad request
[
{
"errors": [
{
"key": "string",
"message": "string"
}
],
"message": "string",
"status": 0,
"timestamp": "string"
}
]
GET /rest/auditing/1.0/configuration/coverage
Responses
- Status: 200 - Successful operation
{
"levelByArea":{
"global-config-and-administration": "string",
"user-management": "string",
"permissions": "string",
"local-config-and-administration": "string",
"security": "string",
"end-user-activity": "string",
"ecosystem": "string"
}
}
- Status: 400 - Bad request
[
{
"errors": [
{
"key": "string",
"message": "string"
}
],
"message": "string",
"status": 0,
"timestamp": "string"
}
]
PUT /rest/auditing/1.0/configuration/coverage
Parameters
Body parameters
Name | Description |
---|---|
body * |
Example
The "advanced" and "full" parameters can only be set for Data Center.
|
Responses
- Status: 200 - Successful operation
- Status: 400 - Bad request
[
{
"errors": [
{
"key": "string",
"message": "string"
}
],
"message": "string",
"status": 0,
"timestamp": "string"
}
]
GET /rest/auditing/1.0/configuration/retention
Responses
- Status: 200 - Successful operation
{
"period":{
"years": 10,
"months": 0,
"days": 0
}
}
- Status: 400 - Bad request
[
{
"errors": [
{
"key": "string",
"message": "string"
}
],
"message": "string",
"status": 0,
"timestamp": "string"
}
]
PUT /rest/auditing/1.0/configuration/retention
Parameters
Body parameters
Name | Description |
---|---|
body * |
Example
|
Responses
- Status: 200 - Successful operation
- Status: 400 - Bad request
[
{
"errors": [
{
"key": "string",
"message": "string"
}
],
"message": "string",
"status": 0,
"timestamp": "string"
}
]
GET /rest/auditing/1.0/configuration/retention/file
Responses
- Status: 200 - Successful operation
{
"maxFileCount": 100
}
- Status: 400 - Bad request
[
{
"errors": [
{
"key": "string",
"message": "string"
}
],
"message": "string",
"status": 0,
"timestamp": "string"
}
]
PUT /rest/auditing/1.0/configuration/retention/file
Parameters
Body parameters
Name | Description |
---|---|
body * |
Example
|
Responses
- Status: 200 - Successful operation
- Status: 400 - Bad request
[
{
"errors": [
{
"key": "string",
"message": "string"
}
],
"message": "string",
"status": 0,
"timestamp": "string"
}
]
Java API
As part of this feature, we are auditing the following components and including these method calls in the audit log:
Components audited : (AuditService.audit() will be invoked):
- ProjectManager (com.atlassian.jira.project.ProjectManager)
- VersionManager (com.atlassian.jira.project.version.VersionManager)
- ProjectComponentManager (com.atlassian.jira.bc.project.component.ProjectComponentManager)
Components that are NOT audited:
- OptionsManager (com.atlassian.jira.issue.customfields.manager.OptionsManager)
- PermissionManager (com.atlassian.jira.security.PermissionManager)