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

パラメーター

Query parameters

名前

説明

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, with objects separated by semicolon

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
{
  "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

パラメーター

Body parameters

名前

説明

body *

{
   "levelByArea":{
      "global-config-and-administration":"base",
      "user-management":"advanced",
      "permissions":"base",
      "local-config-and-administration":"full",
      "security":"advanced",
      "end-user-activity":"full",
      "ecosystem":"full"
   }
}
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

パラメーター

Body parameters

名前

説明

body *

{
   "period":{
      "years": 10
   }
}

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

The audit log file is only supported for Jira Data Center.


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

The audit log file is only supported for Jira Data Center.

パラメーター

Body parameters

名前

説明

body *

{
  "maxFileCount": 100
}

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)
最終更新日 2020 年 9 月 7 日

この内容はお役に立ちましたか?

はい
いいえ
この記事についてのフィードバックを送信する
Powered by Confluence and Scroll Viewport.