getAuditRecords method

Future<AuditRecords> getAuditRecords({
  1. int? offset,
  2. int? limit,
  3. String? filter,
  4. DateTime? from,
  5. DateTime? to,
})

Returns a list of audit records. The list can be filtered to include items:

  • where each item in filter has at least one match in any of these fields:

    • summary
    • category
    • eventSource
    • objectItem.name If the object is a user, account ID is available to filter.
    • objectItem.parentName
    • objectItem.typeName
    • changedValues.changedFrom
    • changedValues.changedTo
    • remoteAddress

    For example, if filter contains man ed, an audit record containing summary": "User added to group" and "category": "group management" is returned.

  • created on or after a date and time.

  • created or or before a date and time.

Permissions required: Administer Jira global permission.

Implementation

Future<AuditRecords> getAuditRecords(
    {int? offset,
    int? limit,
    String? filter,
    DateTime? from,
    DateTime? to}) async {
  return AuditRecords.fromJson(await _client.send(
    'get',
    'rest/api/3/auditing/record',
    queryParameters: {
      if (offset != null) 'offset': '$offset',
      if (limit != null) 'limit': '$limit',
      if (filter != null) 'filter': filter,
      if (from != null) 'from': '$from',
      if (to != null) 'to': '$to',
    },
  ));
}