Audit for Agreement Consents
Number of APIs: 2
This activity shows you how to use the activities endpoint to find agreements associated with users, and users associated with agreements.
The following operations are supported by the PingOne APIs:
- Use the audit activities endpoint to run a metrics query to return consent agreement history for a specified agreement.
- Use the audit activities endpoint to run a metrics query to return consent agreement history for a specified user.
Prerequisites
Get an access token from the worker application that you created in Getting Started with the PingOne APIs. To get a token from a different worker application in an alternate sandbox environment, run the token request endpoint using the client ID and client secret of your chosen worker app to authenticate the request. For more information, see GET a Worker Application Access Token.
Important: To complete this activity, you must have a user that has consented to at least one agreement in your PingOne environment. To do this, follow steps 1-19 in the Use Login and Agreement Actions to Authenticate Users use case before proceeding. You will need the agreement ID and user ID for this activity. The agreement ID can be found in the response data returned in step 4 and the user ID can be found in the response data returned in step 13.
Workflow order of operations
To complete a metrics query to return consent agreement history for a specified agreement and user, the following tasks must be completed successfully:
- Make a
GET
request to/environments/{{envID}}/activities
to return consent agreement history for a specified agreement. - Make a
GET
request to/environments/{{envID}}/activities
to return consent agreement history for a specified user.
-
Step 1. View Consent History for an Agreement GET {{apiPath}}/environments/{{envID}}/activities?filter=resources.id eq "{{agreeID}}" and (action.type eq "AGREEMENT_CONSENT.ACCEPTED")
-
Step 2. View Consent History for a User GET {{apiPath}}/environments/{{envID}}/activities?filter=resources.id eq "{{agreementUserID}}" and (action.type eq "AGREEMENT_CONSENT.ACCEPTED")