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
hasPublishedVersion
boolean

Filter policies data by current published or latest version

hasApprovedVersion
boolean

Temporary property to filter policies data by current published or latest version. This property will coexist with the new property hasPublishedVersion until fully migrated to the client.

Responses
200
400

Malformed data and/or validation errors

401

Invalid Authorization

402

Response Code 402

You must pay to activate this feature

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": [
    • {
      • "id": 1,
      • "currentVersionId": 1,
      • "name": "Acceptable Use Policy",
      • "version": "1",
      • "minorVersion": "1",
      • "createdAt": "2020-07-06 12:00:00.000000",
      • "approvedAt": "2020-07-06 12:00:00.000000",
      • "renewalDate": "2025-01-30",
      • "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",
      • "status": "APPROVED",
      • "publishedAt": "2020-07-06 12:00:00.000000"
      }
    ],
  • "page": 1,
  • "limit": 10,
  • "total": 100
}