Policy

Search and filter policies

post
Authorizations
Body
nextTokenstringOptionalExample: eyJza2lwIjoxMH0
pageSizeinteger · min: 1 · max: 100OptionalDefault: 10
Responses
200
Success
application/json
post
POST /v1/policy/search HTTP/1.1
Host: api.draftt.io
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 104

{
  "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": "text",
  "totalCount": 12
}

Retrieve a specific policy by ID

get
Authorizations
Path parameters
idintegerRequired
Responses
200
Success
application/json
get
GET /v1/policy/{id} HTTP/1.1
Host: api.draftt.io
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "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": null
}