Policy Component
Authorizations
Path parameters
policyIdintegerRequired
Body
nextTokenstringOptionalExample:
eyJza2lwIjoxMH0
pageSizeinteger · min: 1 · max: 100OptionalDefault:
10
Responses
200
Success
application/json
400
Bad Request
application/json
401
Unauthorized
application/json
403
Forbidden
application/json
404
Not Found
application/json
429
Too Many Requests
application/json
500
Internal Server Error
application/json
post
POST /v1/policy/{policyId}/component/search HTTP/1.1
Host: api.draftt.io
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 236
{
"filter": {
"technology": "mongodb",
"tags": [
{
"key": "environment",
"value": "development"
}
],
"dueDate": {
"gte": "2024-12-22T13:47:25.036Z",
"lt": "2025-12-31T00:00:00.000Z"
}
},
"sort": {
"createdAt": "asc"
},
"nextToken": "eyJza2lwIjoxMH0",
"pageSize": 10
}
{
"items": [
{
"id": 22,
"componentId": 3,
"integrationId": 6,
"technology": "rds",
"type": "rds-postgres",
"typeDisplayName": "Amazon RDS PostgreSQL",
"name": "dev-1-rds",
"urgency": 17.39,
"priority": 17.39,
"isCompliant": true,
"currentVersion": "14.10",
"requiredVersion": "14.11",
"recommendedVersion": "14.11",
"dueDate": {
"gte": "2024-12-22T13:47:25.036Z",
"lt": "2025-12-31T00:00:00.000Z"
},
"tags": [
{
"key": "Terraform",
"value": "true"
},
{
"key": "Environment",
"value": "dev-us-east-1"
},
{
"key": "Name",
"value": "dev-1-rds"
}
],
"createdAt": {
"gte": "2024-05-06T11:25:51.513Z",
"lt": "2024-12-31T23:59:59Z"
},
"updatedAt": {
"gte": "2024-09-09T19:35:31.898Z",
"lt": "2024-12-31T23:59:59Z"
}
}
],
"nextToken": "text",
"totalCount": 12
}
Authorizations
Path parameters
policyIdintegerRequired
componentIdintegerRequired
Responses
200
Success
application/json
400
Bad Request
application/json
401
Unauthorized
application/json
403
Forbidden
application/json
404
Not Found
application/json
429
Too Many Requests
application/json
500
Internal Server Error
application/json
get
GET /v1/policy/{policyId}/component/{componentId} HTTP/1.1
Host: api.draftt.io
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"items": [
{
"id": 22,
"componentId": 3,
"integrationId": 6,
"technology": "rds",
"type": "rds-postgres",
"typeDisplayName": "Amazon RDS PostgreSQL",
"name": "dev-1-rds",
"urgency": 17.39,
"priority": 17.39,
"isCompliant": true,
"currentVersion": "14.10",
"requiredVersion": "14.11",
"recommendedVersion": "14.11",
"dueDate": {
"gte": "2024-12-22T13:47:25.036Z",
"lt": "2025-12-31T00:00:00.000Z"
},
"tags": [
{
"key": "Terraform",
"value": "true"
},
{
"key": "Environment",
"value": "dev-us-east-1"
},
{
"key": "Name",
"value": "dev-1-rds"
}
],
"createdAt": {
"gte": "2024-05-06T11:25:51.513Z",
"lt": "2024-12-31T23:59:59Z"
},
"updatedAt": {
"gte": "2024-09-09T19:35:31.898Z",
"lt": "2024-12-31T23:59:59Z"
}
}
],
"nextToken": null
}
Authorizations
Path parameters
policyIdintegerRequired
Body
selectTagsbooleanOptional
If true - will return the component tags, by default they are not returned
calculateDisplayNamesbooleanOptional
If true - will return a 'displayType' field containing a prettified technology field
pageTokenstringOptional
Base64 token for pagination
pageSizeinteger · min: 1 · max: 1000OptionalDefault:
Number of items to return per page
100
Responses
200
Success
application/json
400
Bad Request
application/json
401
Unauthorized
application/json
403
Forbidden
application/json
404
Not Found
application/json
429
Too Many Requests
application/json
500
Internal Server Error
application/json
post
POST /v1/policy/{policyId}/component/query HTTP/1.1
Host: api.draftt.io
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 513
{
"pageSize": 20,
"filter": {
"activeExtendedSupport": true,
"extendedSupportAnnualCost": {
"$gte": 1000
}
},
"tagFilters": {
"$and": [
{
"tags$.environment": {
"$ne": "development"
}
},
{
"tags$.environment ": {
"$exists": true
}
}
]
},
"selectTags": true,
"sort": {
"urgency": "desc"
},
"pageToken": "eyJ1bmlxdWVGaWVsZE5hbWUiOiJpZCIsInNvcnQiOnsidXJnZW5jeSI6eyJvcmRlciI6MCwiZGlyZWN0aW9uIjoiZGVzYyJ9LCJpZCI6eyJvcmRlciI6MSwiZGlyZWN0aW9uIjoiYXNjIn19LCJzb3J0VmFsdWVzIjp7InVyZ2VuY3kiOjUuNDM0NzgyNjA4Njk1NjUyLCJpZCI6IjUwMDg1In19",
"calculateDisplayNames": true
}
{
"nextPageToken": "eyJ1bmlxdWVGaWVsZE5hbWUiOiJpZCIsInNvcnQiOnsidXJnZW5jeSI6eyJvcmRlciI6MCwiZGlyZWN0aW9uIjoiZGVzYyJ9LCJpZCI6eyJvcmRlciI6MSwiZGlyZWN0aW9uIjoiYXNjIn19LCJzb3J0VmFsdWVzIjp7InVyZ2VuY3kiOjUuNDM0NzgyNjA4Njk1NjUyLCJpZCI6IjUwMDg1In19",
"items": [
{
"id": "456654",
"technology": "eks",
"name": "staging-cluster-us-east-1",
"urgency": 62,
"effort": 0,
"priority": 0,
"status": "Outdated",
"policyId": "1",
"componentId": "12321",
"orgComplexity": 0,
"isCompliant": false,
"currentVersion": "1.29",
"desiredVersion": "1.30",
"dueDate": "2025-03-23T00:00:00.000Z",
"createdAt": "2025-03-26T17:02:41.237Z",
"updatedAt": "2025-04-07T02:47:31.606Z",
"deletedAt": null,
"recommendedVersion": "1.32",
"extendedSupportAnnualCost": 4380,
"impendingDate": "2025-03-23T00:00:00.000Z",
"outdatedDate": "2026-03-23T00:00:00.000Z",
"activeExtendedSupport": true,
"tags": {
"environment": "staging",
"Terraform": "true"
},
"displayName": "Amazon EKS"
},
"..."
]
}