Skip to main content
POST
/
policy
/
search
Search and filter policies
curl --request POST \
  --url https://api.draftt.io/v1/policy/search \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "filter": {
    "name": "End Of Life"
  },
  "sort": {
    "createdAt": "asc"
  },
  "nextToken": "eyJza2lwIjoxMH0",
  "pageSize": 10
}
'
{
  "items": [
    {
      "id": 1,
      "name": "End Of Life",
      "description": "All components should be in the supported version",
      "createdAt": "2024-05-06T11:25:51.513Z",
      "updatedAt": "2024-09-09T19:35:31.898Z"
    }
  ],
  "nextToken": "<string>",
  "totalCount": 12
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
filter
object
Example:
{ "name": "End Of Life" }
sort
object
Example:
{ "createdAt": "asc" }
nextToken
string
Example:

"eyJza2lwIjoxMH0"

pageSize
integer
default:10
Required range: 1 <= x <= 100

Response

Success

items
object[]
required
nextToken
string
totalCount
integer
Example:

12