Atlassian: Get audit records
Atlassian auditRecords.getAuditRecords: arguments, response, policy and SDK examples.
← Audit records operations · Get started
Operation atlassian.getauditrecords
Provider route: GET /{cloudId}/rest/api/3/auditing/record. Alter supplies the connection’s credentials and routing.
Call through Alter
Section titled “Call through Alter”Install @alter-ai/sdk @alter-ai/atlassian with npm, or alter-sdk-atlassian with pip. Supply your connected customer’s grant ID and the arguments described below.
import { App } from "@alter-ai/sdk";import { AtlassianIntegration } from "@alter-ai/atlassian";
async function execute(input: Parameters<AtlassianIntegration["auditRecords"]["getAuditRecords"]>[0]) { const app = new App({ apiKey: process.env.ALTER_API_KEY! }); try { const provider = new AtlassianIntegration(app, { grantId: process.env.PROVIDER_GRANT_ID! }); const call = await provider.auditRecords.getAuditRecords(input); const result = await call.wait(); return result.bodyJson(); } finally { await app.close(); }}import osfrom alter_sdk import Appfrom alter_sdk_atlassian import AtlassianIntegration
async def execute(arguments): async with App(api_key=os.environ["ALTER_API_KEY"]) as app: provider = AtlassianIntegration(app, {"grant_id": os.environ["PROVIDER_GRANT_ID"]}) call = await provider.audit_records.get_audit_records(arguments) result = await call.wait() return result.body_json()| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Additional keys: not allowed |
path | object | Required within parent | Additional keys: not allowed |
path.cloudId | string | Required within parent | Pattern: ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$ |
query | object | Optional | Additional keys: not allowed |
query.offset | integer | Optional | Default: 0 Format: int32 |
query.limit | integer | Optional | Default: 1000 Format: int32 |
query.filter | string | Optional | |
query.from | string | Optional | |
query.to | string | Optional |
Response
Section titled “Response”Response media type: application/json. The table describes the pinned successful response. Referenced models link to their complete fields.
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | Model | Root | Expand Get audit records — response body |
Referenced models: Get audit records — response body
Schemas
Section titled “Schemas”Get audit records — response body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Container for a list of audit records. |
limit | JSON | Optional | |
limit (anyOf 1) | JSON | Alternative | |
limit (anyOf 1) (anyOf 1) | integer | Alternative | The requested or default limit on the number of audit items to be returned. Format: int32 Read only: true |
limit (anyOf 1) (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
limit (anyOf 2) | null | Alternative | |
offset | JSON | Optional | |
offset (anyOf 1) | JSON | Alternative | |
offset (anyOf 1) (anyOf 1) | integer | Alternative | The number of audit items skipped before the first item in this list. Format: int32 Read only: true |
offset (anyOf 1) (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
offset (anyOf 2) | null | Alternative | |
records | JSON | Optional | |
records (anyOf 1) | array | Alternative | The list of audit items. Read only: true |
records (anyOf 1)[] | Model | Each item | Expand Get audit records — response body — records The list of audit items item |
records (anyOf 2) | null | Alternative | |
total | JSON | Optional | |
total (anyOf 1) | JSON | Alternative | |
total (anyOf 1) (anyOf 1) | integer | Alternative | The total number of audit items returned. Format: int64 Read only: true |
total (anyOf 1) (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
total (anyOf 2) | null | Alternative |
Referenced models: Get audit records — response body — records The list of audit items item
Get audit records — response body — records The list of audit items item
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | An audit record. |
associatedItems | JSON | Optional | |
associatedItems (anyOf 1) | array | Alternative | The list of items associated with the changed record. Read only: true |
associatedItems (anyOf 1)[] | Model | Each item | Expand Get audit records — response body — records The list of audit items item object Item id, name, parent Id, parent Name, type Name |
associatedItems (anyOf 2) | null | Alternative | |
authorKey | JSON | Optional | |
authorKey (anyOf 1) | string | Alternative | Deprecated, use `authorAccountId` instead. The key of the user who created the audit record. Read only: true |
authorKey (anyOf 2) | null | Alternative | |
category | JSON | Optional | |
category (anyOf 1) | string | Alternative | The category of the audit record. For a list of these categories, see the help article [Auditing in Jira applications](https://confluence.atlassian.com/x/noXKM). Read only: true |
category (anyOf 2) | null | Alternative | |
changedValues | JSON | Optional | |
changedValues (anyOf 1) | array | Alternative | The list of values changed in the record event. Read only: true |
changedValues (anyOf 1)[] | Model | Each item | Expand Get audit records — response body — records The list of audit items item changed Values The list of values changed in the record event item |
changedValues (anyOf 2) | null | Alternative | |
created | JSON | Optional | |
created (anyOf 1) | JSON | Alternative | |
created (anyOf 1) (anyOf 1) | string | Alternative | The date and time on which the audit record was created. Read only: true |
created (anyOf 1) (anyOf 2) | integer | Alternative | |
created (anyOf 2) | null | Alternative | |
description | JSON | Optional | |
description (anyOf 1) | string | Alternative | The description of the audit record. Read only: true |
description (anyOf 2) | null | Alternative | |
eventSource | JSON | Optional | |
eventSource (anyOf 1) | string | Alternative | The event the audit record originated from. Read only: true |
eventSource (anyOf 2) | null | Alternative | |
id | JSON | Optional | |
id (anyOf 1) | JSON | Alternative | |
id (anyOf 1) (anyOf 1) | integer | Alternative | The ID of the audit record. Format: int64 Read only: true |
id (anyOf 1) (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
id (anyOf 2) | null | Alternative | |
objectItem | JSON | Optional | |
objectItem (anyOf 1) | Model | Alternative | Expand Get audit records — response body — records The list of audit items item object Item id, name, parent Id, parent Name, type Name |
objectItem (anyOf 2) | null | Alternative | |
remoteAddress | JSON | Optional | |
remoteAddress (anyOf 1) | string | Alternative | The URL of the computer where the creation of the audit record was initiated. Read only: true |
remoteAddress (anyOf 2) | null | Alternative | |
summary | JSON | Optional | |
summary (anyOf 1) | string | Alternative | The summary of the audit record. Read only: true |
summary (anyOf 2) | null | Alternative |
Referenced models: Get audit records — response body — records The list of audit items item object Item id, name, parent Id, parent Name, type Name, Get audit records — response body — records The list of audit items item changed Values The list of values changed in the record event item
Get audit records — response body — records The list of audit items item object Item id, name, parent Id, parent Name, type Name
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Details of an item associated with the changed record. |
id | JSON | Optional | |
id (anyOf 1) | string | Alternative | The ID of the associated record. Read only: true |
id (anyOf 2) | null | Alternative | |
name | JSON | Optional | |
name (anyOf 1) | string | Alternative | The name of the associated record. Read only: true |
name (anyOf 2) | null | Alternative | |
parentId | JSON | Optional | |
parentId (anyOf 1) | string | Alternative | The ID of the associated parent record. Read only: true |
parentId (anyOf 2) | null | Alternative | |
parentName | JSON | Optional | |
parentName (anyOf 1) | string | Alternative | The name of the associated parent record. Read only: true |
parentName (anyOf 2) | null | Alternative | |
typeName | JSON | Optional | |
typeName (anyOf 1) | string | Alternative | The type of the associated record. Read only: true |
typeName (anyOf 2) | null | Alternative |
Get audit records — response body — records The list of audit items item changed Values The list of values changed in the record event item
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Details of names changed in the record event. |
changedFrom | JSON | Optional | |
changedFrom (anyOf 1) | string | Alternative | The value of the field before the change. Read only: true |
changedFrom (anyOf 2) | null | Alternative | |
changedTo | JSON | Optional | |
changedTo (anyOf 1) | string | Alternative | The value of the field after the change. Read only: true |
changedTo (anyOf 2) | null | Alternative | |
fieldName | JSON | Optional | |
fieldName (anyOf 1) | string | Alternative | The name of the field changed. Read only: true |
fieldName (anyOf 2) | null | Alternative |
Policy, approvals and errors
Section titled “Policy, approvals and errors”SDK function policy ID: atlassian.getauditrecords. Catalog operation: getauditrecords. Rules can name either ID; function rules distinguish managed calls and conservatively cover raw calls sharing the route. Existing grant permissions and policy rules apply. wait() returns an immediate result or waits for a required approval; it never approves the request itself. Persist the approval ID to resume after a restart.
Provider errors retain their response; JSON decoding raises ProviderAPIError for provider failures. ManagedOperationError identifies contract/input/retention errors. See error handling and provider-specific behavior. Sensitive input may be refused before approval storage. A decoding error never resubmits a write.
Required provider scopes: ["manage:jira-configuration"]