Get User Policy Acceptance List

List the latest policy version that was distributed to a user to see if they've accepted it

Securitybearer
Request
path Parameters
id
required
number
Responses
200
401

Invalid Authorization

403

You are not allowed to perform this action

500

Internal server error

default

Response Code: 412

You must accept the Drata terms and conditions to use the API

get/users/{id}/policies
Request samples
Response samples
application/json
{
  • "userPolicyVersions": [
    • {
      • "id": 1,
      • "acceptedAt": "2020-07-06 12:00:00.000000",
      • "policyVersion": {
        • "id": 1,
        • "version": 1,
        • "current": true,
        • "type": "UPLOADED",
        • "docViewer": "NATIVE",
        • "description": "This policy defines how you do XYZ",
        • "html": "<html><body>Text</body></html>",
        • "weekTimeFrameSLAs": "WeekTimeFrameSLAResponsePublicDto[]",
        • "p3MatrixSLAs": "P3MatrixSLAsResponsePublicDto[]",
        • "gracePeriodSLAs": "GracePeriodSLAResponsePublicDto[]",
        • "renewalDate": "2024-11-22",
        • "approvedAt": "2020-07-06 12:00:00.000000",
        • "createdAt": "2020-07-06 12:00:00.000000",
        • "updatedAt": "2020-07-06 12:00:00.000000",
        • "owner": [
          • {
            • "id": 1,
            • "email": "[email protected]",
            • "firstName": "Sally",
            • "lastName": "Smith",
            • "jobTitle": "CEO",
            • "drataTermsAgreedAt": "2020-07-06 12:00:00.000000",
            • "createdAt": "2020-07-06 12:00:00.000000",
            • "updatedAt": "2020-07-06 12:00:00.000000",
            • "roles": [
              • "ROLE",
              • "ANOTHER_ROLE"
              ],
            • "backgroundChecks": [
              • {
                • "id": null,
                • "userId": null,
                • "status": null,
                • "caseId": null,
                • "caseInvitationId": null,
                • "url": null,
                • "manualCheckDate": null,
                • "manuallyCheckUrl": null,
                • "type": null,
                • "source": null,
                • "reportData": null,
                • "user": null,
                • "outOfScopeReason": null,
                • "outOfScopeAt": null,
                • "invitationEmail": null,
                • "linkedAt": null,
                • "createdAt": null,
                • "updatedAt": null
                }
              ],
            • "identities": [
              • {
                • "id": null,
                • "identityId": null,
                • "username": null,
                • "connectedAt": null,
                • "disconnectedAt": null,
                • "hasMfa": null,
                • "user": null,
                • "connection": null,
                • "hasIdp": null
                }
              ]
            }
          ],
        • "changesExplanation": "- This is what changes in the new version. - And this is another change."
        },
      • "policy": {
        • "id": 1,
        • "templateId": 1,
        • "name": "Acceptable Use Policy",
        • "currentDescription": "This policy defines how you do XYZ",
        • "htmlLastUpdated": "2020-07-06 12:00:00.000000",
        • "createdAt": "2020-07-06 12:00:00.000000",
        • "updatedAt": "2020-07-06 12:00:00.000000",
        • "currentOwner": {
          • "id": 1,
          • "email": "[email protected]",
          • "firstName": "Sally",
          • "lastName": "Smith",
          • "jobTitle": "CEO",
          • "drataTermsAgreedAt": "2020-07-06 12:00:00.000000",
          • "createdAt": "2020-07-06 12:00:00.000000",
          • "updatedAt": "2020-07-06 12:00:00.000000",
          • "roles": [
            • "ROLE",
            • "ANOTHER_ROLE"
            ],
          • "backgroundChecks": [
            • {
              • "id": 1,
              • "userId": 1,
              • "status": "OK",
              • "caseId": "abc123",
              • "caseInvitationId": "abc123",
              • "manualCheckDate": "2020-07-06",
              • "manuallyCheckUrl": "url.com",
              • "type": "CERTN",
              • "source": "DRATA",
              • "reportData": "string",
              • "user": { },
              • "outOfScopeReason": "abc123",
              • "outOfScopeAt": "2020-07-06 12:00:00.000000",
              • "invitationEmail": "[email protected]",
              • "linkedAt": "2020-07-06 12:00:00.000000",
              • "createdAt": "2020-07-06 12:00:00.000000",
              • "updatedAt": "2020-07-06 12:00:00.000000"
              }
            ],
          • "identities": [
            • {
              • "id": 1,
              • "identityId": "1a2b3c",
              • "username": "Username",
              • "connectedAt": "2020-07-06 12:00:00.000000",
              • "disconnectedAt": "2020-07-06 12:00:00.000000",
              • "hasMfa": true,
              • "user": { },
              • "connection": {
                • "id": null,
                • "clientType": null,
                • "state": null,
                • "connected": null,
                • "connectedAt": null,
                • "failedAt": null,
                • "companyId": null,
                • "assignmentId": null,
                • "user": null,
                • "accountId": null,
                • "clientId": null,
                • "clientAlias": null,
                • "manuallyUpdatedAt": null,
                • "aliasUpdatedAt": null,
                • "deletedAt": null,
                • "requestorId": null,
                • "product": { },
                • "writeAccessEnabled": null,
                • "sourcePreference": null,
                • "securityLabel": null,
                • "jqlQuery": null,
                • "authorized": null,
                • "workspaces": [ ],
                • "providerTypes": [ ],
                • "code": null,
                • "groupLabel": null
                },
              • "hasIdp": true
              }
            ]
          },
        • "versions": "PolicyVersionResponsePublicDto[]",
        • "policyWeekTimeFrameSLAs": "PolicyWeekTimeFrameSLAResponsePublicDto[]",
        • "policyGracePeriodSLAs": "PolicyGracePeriodSLAResponsePublicDto[]",
        • "policyP3MatrixSLAs": "PolicyP3MatrixSLAResponsePublicDto[]",
        • "groups": [
          • {
            • "id": 1,
            • "name": "Operations",
            • "description": "This is an example",
            • "email": "[email protected]",
            • "externalId": "23kemoi23em",
            • "source": "GOOGLE",
            • "domain": "email.com",
            • "type": "GROUP",
            • "orgUnitPath": "asdas/qweqwe/asdasd",
            • "membersCount": 10
            }
          ],
        • "assignedTo": "ALL",
        • "notifyGroups": false,
        • "reminders": "ReminderResponsePublicDto[]",
        • "policyStatus": "ACTIVE"
        }
      }
    ]
}