Get policies

Returns the list of policies and their metadata

Securitybearer
Request
query Parameters
page
number >= 1
Default: 1

Which page of data are you requesting

limit
number [ 1 .. 50 ]
Default: 20

How many items are you requesting

q
string

Filter data to search term

Example: q=Acceptable Use Policy
userId
number

User ID of the policy owner

Example: userId=1
hasApprovedVersion
boolean

Filter data to policies with at least one approved version

Responses
200
400

Malformed data and/or validation errors

401

Invalid Authorization

403

You are not allowed to perform this action

404

Record Not Found

500

Internal server error

default

Response Code: 412

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

get/policies
Request samples
Response samples
application/json
{
  • "data": [
    • {
      • "name": "Acceptable Use Policy",
      • "version": 1,
      • "createdAt": "2020-07-06 12:00:00.000000",
      • "approvedAt": "2020-07-06 12:00:00.000000",
      • "renewalDate": "2024-11-22",
      • "hasSla": "Yes",
      • "currentOwner": { },
      • "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
          }
        ],
      • "htmlLastUpdated": "2020-07-06 12:00:00.000000"
      }
    ],
  • "page": 1,
  • "limit": 10,
  • "total": 100
}