Skip to main content

audit_records

Creates, updates, deletes, gets or lists an audit_records resource.

Overview

Nameaudit_records
TypeResource
Idpagerduty.ip_allow_lists.audit_records

Fields

The following fields are returned by SELECT queries:

Records matching the query criteria.

NameDatatypeDescription
idstring
actionstring (example: create)
actorsarray
detailsobjectAdditional details to provide further information about the action or the resource that has been audited.
execution_contextobjectAction execution context
execution_timestring (date-time)The date/time the action executed, in ISO8601 format and millisecond precision.
methodobjectThe method information
root_resourceobject(opaque JSON object)
selfstringRecord URL.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
listselectidX-EARLY-ACCESS, limit, cursor, since, until<!-- theme: warning --><br /><br />> ### Early Access<br />> This API is in Early Access and may change at any time. You must pass the X-EARLY-ACCESS: ip-allow-lists header on every request, and your account must be enrolled in the IP Allow Lists Early Access program. Contact your PagerDuty account team to request access.<br /><br />The response will include audit records with changes that are made to the given IP allow list.<br /><br />The returned records are sorted by the execution_time from newest to oldest.<br /><br />See [Cursor-based pagination](https:​//developer.pagerduty.com/docs/rest-api-v2/pagination/) for instructions on how to paginate through the result set.<br /><br />For more information see the [Audit API Document](https:​//developer.pagerduty.com/docs/rest-api-v2/audit-records-api/).<br /><br />Scoped OAuth requires: audit_records.read<br />

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
idstringThe ID of the resource.
X-EARLY-ACCESSstringThis API is currently in Early Access. You MUST pass in this header with the value ip-allow-lists, and your account must be enrolled in the IP Allow Lists Early Access program. Contact your PagerDuty account team to request access.
cursorstringOptional parameter used to request the "next" set of results from an API. The value provided here is most commonly obtained from the next_cursor field of the previous request. When no value is provided, the request starts at the beginning of the result set.
limitintegerThe minimum of the limit parameter used in the request or the maximum request size of the API.
sincestring (date-time)The start of the date range over which you want to search. If not specified, defaults to now() - 24 hours (past 24 hours)
untilstring (date-time)The end of the date range over which you want to search. If not specified, defaults to now(). May not be more than 31 days after since.

SELECT examples

<!-- theme: warning --><br /><br />> ### Early Access<br />> This API is in Early Access and may change at any time. You must pass the X-EARLY-ACCESS: ip-allow-lists header on every request, and your account must be enrolled in the IP Allow Lists Early Access program. Contact your PagerDuty account team to request access.<br /><br />The response will include audit records with changes that are made to the given IP allow list.<br /><br />The returned records are sorted by the execution_time from newest to oldest.<br /><br />See [Cursor-based pagination](https:​//developer.pagerduty.com/docs/rest-api-v2/pagination/) for instructions on how to paginate through the result set.<br /><br />For more information see the [Audit API Document](https:​//developer.pagerduty.com/docs/rest-api-v2/audit-records-api/).<br /><br />Scoped OAuth requires: audit_records.read<br />

SELECT
id,
action,
actors,
details,
execution_context,
execution_time,
method,
root_resource,
self
FROM pagerduty.ip_allow_lists.audit_records
WHERE id = '{{ id }}' -- required
AND X-EARLY-ACCESS = '{{ X-EARLY-ACCESS }}'
AND limit = '{{ limit }}'
AND cursor = '{{ cursor }}'
AND since = '{{ since }}'
AND until = '{{ until }}'
;