records
Creates, updates, deletes, gets or lists a records
resource.
Overview
Name | records |
Type | Resource |
Id | pagerduty.audit.records |
Fields
The following fields are returned by SELECT
queries:
- list_audit_records
Records matching the query criteria.
Name | Datatype | Description |
---|---|---|
id | string | |
action | string | (example: create) |
actors | array | |
details | object | Additional details to provide further information about the action or the resource that has been audited. |
execution_context | object | Action execution context |
execution_time | string (date-time) | The date/time the action executed, in ISO8601 format and millisecond precision. |
method | object | The method information |
root_resource | object | |
self | string | Record URL. |
Methods
The following methods are available for this resource:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
list_audit_records | select | Accept , Content-Type , limit , cursor , since , until , root_resource_types[] , actor_type , actor_id , method_type , method_truncated_token , actions[] | List audit trail records matching provided query params or default criteria. The returned records are sorted by the execution_time from newest to oldest.See Cursor-based pagination for instructions on how to paginate through the result set.Only admins, account owners, or global API tokens on PagerDuty account pricing plans with the "Audit Trail" feature can access this endpoint. For other role based access to audit records by resource ID, see the resource's API documentation. For more information see the Audit API Document. Scoped OAuth requires: audit_records.read | |
_list_audit_records | exec | Accept , Content-Type , limit , cursor , since , until , root_resource_types[] , actor_type , actor_id , method_type , method_truncated_token , actions[] | List audit trail records matching provided query params or default criteria. The returned records are sorted by the execution_time from newest to oldest.See Cursor-based pagination for instructions on how to paginate through the result set.Only admins, account owners, or global API tokens on PagerDuty account pricing plans with the "Audit Trail" feature can access this endpoint. For other role based access to audit records by resource ID, see the resource's API documentation. For more information see the Audit API Document. Scoped OAuth requires: audit_records.read |
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.
Name | Datatype | Description |
---|---|---|
Accept | string | The Accept header is used as a versioning header. |
Content-Type | string | |
actions[] | string | Action filter |
actor_id | string | Actor Id filter. Must be qualified by providing the actor_type param. |
actor_type | string | Actor type filter. |
cursor | string | Optional 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. |
limit | integer | The minimum of the limit parameter used in the request or the maximum request size of the API. |
method_truncated_token | string | Method truncated_token filter. Must be qualified by providing the method_type param. |
method_type | string | Method type filter. |
root_resource_types[] | string | Resource type filter for the root_resource. |
since | string (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) |
until | string (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
- list_audit_records
List audit trail records matching provided query params or default criteria.
The returned records are sorted by the execution_time
from newest to oldest.
See Cursor-based pagination
for instructions on how to paginate through the result set.
Only admins, account owners, or global API tokens on PagerDuty account pricing plans with the "Audit Trail" feature can access this endpoint.
For other role based access to audit records by resource ID, see the resource's API documentation.
For more information see the Audit API Document.
Scoped OAuth requires: audit_records.read
SELECT
id,
action,
actors,
details,
execution_context,
execution_time,
method,
root_resource,
self
FROM pagerduty.audit.records
WHERE Accept = '{{ Accept }}'
AND Content-Type = '{{ Content-Type }}'
AND limit = '{{ limit }}'
AND cursor = '{{ cursor }}'
AND since = '{{ since }}'
AND until = '{{ until }}'
AND root_resource_types[] = '{{ root_resource_types[] }}'
AND actor_type = '{{ actor_type }}'
AND actor_id = '{{ actor_id }}'
AND method_type = '{{ method_type }}'
AND method_truncated_token = '{{ method_truncated_token }}'
AND actions[] = '{{ actions[] }}'
;
Lifecycle Methods
- _list_audit_records
List audit trail records matching provided query params or default criteria.
The returned records are sorted by the execution_time
from newest to oldest.
See Cursor-based pagination
for instructions on how to paginate through the result set.
Only admins, account owners, or global API tokens on PagerDuty account pricing plans with the "Audit Trail" feature can access this endpoint.
For other role based access to audit records by resource ID, see the resource's API documentation.
For more information see the Audit API Document.
Scoped OAuth requires: audit_records.read
EXEC pagerduty.audit.records._list_audit_records
@Accept='{{ Accept }}',
@Content-Type='{{ Content-Type }}',
@limit='{{ limit }}',
@cursor='{{ cursor }}',
@since='{{ since }}',
@until='{{ until }}',
@root_resource_types[]='{{ root_resource_types[] }}',
@actor_type='{{ actor_type }}',
@actor_id='{{ actor_id }}',
@method_type='{{ method_type }}',
@method_truncated_token='{{ method_truncated_token }}',
@actions[]='{{ actions[] }}'
;