Audit log improvements for developers

On this page

Still need help?

The Atlassian Community is here for you.

Ask the community

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

from

Date (date-time)
The start timestamp in ISO8601 format

to

Date (date-time)
The end timestamp in ISO8601 format

offset

Integer (int32)
The number of records to skip

pageCursor

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

limit

Integer (int32)

The maximum number of records returned

userIds

StringAudit event author identifiers separated by comma

categories

StringAudit categories separated by comma

actions

StringComma-separated list of actions which triggered the audit record

affectedObject

StringAffected object type and id separated by comma

search

StringSearch expression

outputFormat

StringWhat format output should the server create

scanLimit

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
Schema
{pagingInfo: {lastPage:booleannextPageOffset:integer (int32)nextPageCursor: {cursor:string}nextPageLink:stringsize:integer (int32)}entities: {}}


  • Status: 400 - Bad request
Schema
[ {type:stringmessage:string}]


GET /rest/auditing/1.0/configuration/coverage

Responses

  • Status: 200 - Successful operation
Schema
{levelByArea: {}}


  • Status: 400 - Bad request
Schema
[ {type:stringmessage:string}]


PUT /rest/auditing/1.0/configuration/coverage

Parameters

Body parameters

Name

Description

body *

{levelByArea: {}}

Responses

  • Status: 200 - Successful operation
Schema
{levelByArea: {}}


  • Status: 400 - Bad request
Schema
[ {type:stringmessage:string}]


GET /rest/auditing/1.0/configuration/retention

Responses

  • Status: 200 - Successful operation
Schema
{period: {years:integer (int32)months:integer (int32)days:integer (int32)chronology: {id:stringcalendarType:string}units:[ {timeBased:booleanduration: {seconds:integer (int64)nano:integer (int32)zero:booleannegative:boolean}dateBased:booleandurationEstimated:boolean}]zero:booleannegative:boolean}}
  • Status: 400 - Bad request
Schema
[ {type:stringmessage:string}]


PUT /rest/auditing/1.0/configuration/retention

Parameters

Body parameters

Name

Description

body *

{period: {years:integermonths:integerdays:integerchronology: { }units:[]zero:booleannegative:boolean}}

Responses

  • Status: 200 - Successful operation
Schema
{period: {years:integer (int32)months:integer (int32)days:integer (int32)chronology: {id:stringcalendarType:string}units:[ {timeBased:booleanduration: {seconds:integer (int64)nano:integer (int32)zero:booleannegative:boolean}dateBased:booleandurationEstimated:boolean}]zero:booleannegative:boolean}}
  • Status: 400 - Bad request
Schema
[ {type:stringmessage: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)
Last modified on Mar 11, 2020

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.