Read Audit Activities
GET {{apiPath}}/environments/{{envID}}/activities
You can get all audit activity events for a selected environment. The GET /environments/{{envID}}/activities
request accepts SCIM filtering expressions to fine-tune the response.
The following sample shows the GET /environments/{{envID}}/activities?filter=recordedat gt "2018-08-20T00:00:00Z" AND recordedat lt "2018-08-22T23:59:00Z"
operation to return all audit activity events for the specified environment. The filtering expression designates a time period between 2018-08-20
and 2018-08-22
.
If the activity event is initiated by an administrator on other administrators, this will be indicated in the response by a tags.adminIdentityEvent
attribute.
Filtering data
The GET /environments/{{envID}}/activities
and POST /environments/{{envID}}/activities
requests accept SCIM filtering expressions to fine-tune the response data. For large collections, additional filtering expressions can be added to the request URL to focus on particular event types.
The minimum filter must include:
- A date range for the recorded event time.
Filter | Description |
---|---|
recordedat lt yyyy-MM-dd'T'HH:mm:ss.SSSZ | Audit events recorded before the specified time. |
recordedat gt yyyy-MM-dd'T'HH:mm:ss.SSSZ | Audit events recorded after the specified time. |
For example, this SCIM filter returns audit events from the start date of 2018-01-01
and an end date of 2018-03-31
:
https://api.pingone.com/v1/environments/{{envID}}/activities?filter=recordedat gt "2018-01-01T00:00:00Z" AND recordedat lt "2018-03-31T23:59:00Z"
The filter can also include any one of the following:
- Population ID
- Actor ID and optional population ID.
- Action Type and optional population ID
- Resource ID
- Resource Type and optional population ID
Filter | Description |
---|---|
resources.population.id eq :id | Audit events associated with the specified population. |
actor.user.id eq :id | Audit events performed by the specified user ID or client ID. Optionally, you can include the associated population. |
action.type | Audit events recorded for the specified type of action (such as, authentication, password reset). Optionally, you can include the associated population. |
resources.id eq :id | Audit events recorded for the specified resource. |
resources.type | Audit events recorded for the specified type of resource. This can be any one of the following: ALL, USER, ENVIRONMENT, ORGANIZATION. Optionally, you can include the associated population. |
tags | Audit events for the adminIdentityEvent tag. Currently, the adminIdentityEvent tag is the only one supported. |
These SCIM operators can be applied to the following attributes:
eq
(equals)
Supported attributes: correlationid
, actors.user.id
, actors.user.name
, actors.client.id
, action.type
, resources.id
, resources.type
, resources.population.id
, org.id
, environment.id
gt
(greater than)
Supported attributes: recordedat
lt
(less than)
Supported attributes: recordedat
ge
(greater than or equal to)
Supported attributes: recordedat
le
(less than or equal to)
Supported attributes: recordedat
and
(logical AND)
Logical AND for building compound expressions in which both expressions are true.
or
(logical OR)
Logical OR for building compound expressions if either expression is true.
Note: These SCIM operators are not supported: ne
(not equal), co
(contains), ew
(ends with), in
(includes), pr
(present, is a non-empty or non-null value), sw
(starts with), not
(logical NOT).
For more information about SCIM syntax and operators, see Conventions.
RESPONSES
status: OK
{"_links":{"self":{"href":"https://api.pingone.com/v1/environments/58f92121-b753-4e7e-8d82-23b5bf80efe5/activities?filter=recordedat%20gt%20%222018-08-20T00:00:00Z%22%20AND%20recordedat%20lt%20%222018-08-22T23:59:00Z"}},"_embedded":{"activities":[{"_links":{"self":{"href":"https://api.pingone.com/v1/environments/abfba8f6-49eb-49f5-a5d9-80ad5c98f9f6/activities/a4a0a8c0-2d47-4efe-a8a5-463684f79f1c"}},"id":"a4a0a8c0-2d47-4efe-a8a5-463684f79f1c","recordedAt":"2018-08-22T21:47:12.859Z","correlationId":"B2C30206-9EE5-42DE-8B98-D8D3E4913F80","actors":{"client":{"id":"common-services-test","name":"common-services-test","type":"CLIENT"}},"action":{"type":"APPLICATION.DELETED","description":"Application Deleted"},"resources":[{"type":"APPLICATION","id":"60420de9-9d38-44c5-a2a7-4839ded541f0","name":"UPDATED_1534974432","environment":{"id":"abfba8f6-49eb-49f5-a5d9-80ad5c98f9f6"},"href":"https://api.pingone.com/v1/environments/abfba8f6-49eb-49f5-a5d9-80ad5c98f9f6/applications/60420de9-9d38-44c5-a2a7-4839ded541f0"}],"result":{"status":"SUCCESS","description":"Deleted Application UPDATED_1534974432 of type 'SERVICE' with disabled state"}},{"_links":{"self":{"href":"https://api.pingone.com/v1/environments/abfba8f6-49eb-49f5-a5d9-80ad5c98f9f6/activities/deee0af7-655f-48cf-ae2e-7571fdfe5ac6"}},"id":"deee0af7-655f-48cf-ae2e-7571fdfe5ac6","recordedAt":"2018-08-22T21:47:12.005Z","correlationId":"68E80AD8-C9D4-4DB8-93A9-6FF4C88D1E2B","actors":{"client":{"id":"common-services-test","name":"common-services-test","type":"CLIENT"}},"action":{"type":"APPLICATION.UPDATED","description":"Application Updated"},"resources":[{"type":"APPLICATION","id":"60420de9-9d38-44c5-a2a7-4839ded541f0","name":"UPDATED_1534974432","environment":{"id":"abfba8f6-49eb-49f5-a5d9-80ad5c98f9f6"},"href":"https://api.pingone.com/v1/environments/abfba8f6-49eb-49f5-a5d9-80ad5c98f9f6/applications/60420de9-9d38-44c5-a2a7-4839ded541f0"}],"result":{"status":"SUCCESS","description":"Updated Application UPDATED_1534974432 of type 'SERVICE' with disabled state"}},{"_links":{"self":{"href":"https://api.pingone.com/v1/environments/abfba8f6-49eb-49f5-a5d9-80ad5c98f9f6/activities/ddc7214e-23a1-401d-be06-ea70a3479be8"}},"id":"ddc7214e-23a1-401d-be06-ea70a3479be8","recordedAt":"2018-08-22T21:47:11.404Z","correlationId":"3678B778-2DE3-4AB4-BA25-38529D3CE1AF","actors":{"client":{"id":"common-services-test","name":"common-services-test","type":"CLIENT"}},"action":{"type":"APPLICATION.CREATED","description":"Application Created"},"resources":[{"type":"APPLICATION","id":"60420de9-9d38-44c5-a2a7-4839ded541f0","name":"app_1534974431","environment":{"id":"abfba8f6-49eb-49f5-a5d9-80ad5c98f9f6"},"href":"https://api.pingone.com/v1/environments/abfba8f6-49eb-49f5-a5d9-80ad5c98f9f6/applications/60420de9-9d38-44c5-a2a7-4839ded541f0"}],"result":{"status":"SUCCESS","description":"Created Application app_1534974431 of type 'SERVICE' with enabled state"}}]}}