Component
eyJza2lwIjoxMH010Success
Bad Request
Unauthorized
Forbidden
Not Found
Too Many Requests
Internal Server Error
POST /v1/component/search HTTP/1.1
Host: api.draftt.io
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 157
{
"filter": {
"tags": [
{
"key": "Environment",
"value": "dev-us-east-1"
}
],
"technology": "k8s"
},
"sort": {
"createdAt": "asc"
},
"nextToken": "eyJza2lwIjoxMH0",
"pageSize": 10
}{
"items": [
{
"id": 20,
"integrationId": 6,
"uniqueIdentifier": "arn:aws:rds:us-east-1:1234567:db:rds-dev-1",
"region": "us-east-1",
"technology": "rds",
"type": "rds-postgres",
"typeDisplayName": "Amazon RDS PostgreSQL",
"version": "14.10",
"tags": [
{
"key": "Terraform",
"value": "true"
},
{
"key": "Environment",
"value": "dev-us-east-1"
},
{
"key": "Name",
"value": "rds-dev-1"
}
],
"createdAt": "2024-05-06T11:25:50.750Z",
"updatedAt": "2024-09-09T14:36:11.531Z"
}
],
"nextToken": "text",
"totalCount": 12
}No Content - Update successful
No content
Bad Request
Unauthorized
Forbidden
Not Found
Too Many Requests
Internal Server Error
PATCH /v1/component/{componentId} HTTP/1.1
Host: api.draftt.io
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 78
{
"customTags": {
"Environment": "production",
"Team": "backend",
"CostCenter": null
}
}No content
Component ID
Success
Bad Request
Unauthorized
Forbidden
Not Found
Too Many Requests
Internal Server Error
POST /v1/component/{componentId}/draftt/query HTTP/1.1
Host: api.draftt.io
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 43
{
"sections": [
"deployments",
"controlPlane"
]
}{
"items": [
{
"componentId": "123",
"name": " Cluster",
"type": "",
"currentVersion": "1.23.0",
"desiredVersion": "1.24.0",
"status": "active",
"upgradePlan": {
"AddOns": {
"changes": [
{
"name": "aws-ebs-csi-driver",
"currentVersion": "1.5.0",
"desiredVersion": "1.6.0",
"status": "active",
"deprecatedResources": [
{
"name": "csi-node",
"version": "v1beta1",
"namespace": "kube-system",
"requiredChanges": [
{
"isBreaking": true,
"path": "spec.template",
"type": "PROPERTY_REMOVED",
"newValue": {
"type": "object",
"properties": {}
},
"oldValue": {
"type": "string"
}
}
]
}
]
}
]
}
},
"createdAt": "2024-05-06T11:25:51.513Z",
"updatedAt": "2024-05-06T11:25:51.513Z"
}
]
}No Content - Update successful
No content
Bad Request
Unauthorized
Forbidden
Not Found
Too Many Requests
Internal Server Error
POST /v1/component/update HTTP/1.1
Host: api.draftt.io
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 138
{
"query": {
"filter": {
"technology": {
"$eq": "k8s"
}
}
},
"payload": {
"customTags": {
"Environment": "production",
"Team": "backend",
"CostCenter": null
}
}
}No content
Query components with filtering, sorting and pagination
Base64 token for pagination
Number of items to return per page
100Success
Bad Request
Unauthorized
Forbidden
Not Found
Too Many Requests
Internal Server Error
POST /v1/component/query HTTP/1.1
Host: api.draftt.io
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 345
{
"pageSize": 20,
"filter": {
"technology": {
"$eq": "k8s"
},
"region": {
"$eq": "us-east-1"
}
},
"sort": {
"createdAt": "desc"
},
"pageToken": "eyJ1bmlxdWVGaWVsZE5hbWUiOiJpZCIsInNvcnQiOnsidXJnZW5jeSI6eyJvcmRlciI6MCwiZGlyZWN0aW9uIjoiZGVzYyJ9LCJpZCI6eyJvcmRlciI6MSwiZGlyZWN0aW9uIjoiYXNjIn19LCJzb3J0VmFsdWVzIjp7InVyZ2VuY3kiOjUuNDM0NzgyNjA4Njk1NjUyLCJpZCI6IjUwMDg1In19"
}{
"nextPageToken": "eyJ1bmlxdWVGaWVsZE5hbWUiOiJpZCIsInNvcnQiOnsidXJnZW5jeSI6eyJvcmRlciI6MCwiZGlyZWN0aW9uIjoiZGVzYyJ9LCJpZCI6eyJvcmRlciI6MSwiZGlyZWN0aW9uIjoiYXNjIn19LCJzb3J0VmFsdWVzIjp7InVyZ2VuY3kiOjUuNDM0NzgyNjA4Njk1NjUyLCJpZCI6IjUwMDg1In19",
"items": [
{
"id": "456654",
"integrationId": "6",
"uniqueIdentifier": "arn:aws:rds:us-east-1:1234567:db:rds-dev-1",
"region": "us-east-1",
"vendor": "aws",
"technology": "rds",
"type": "rds-postgres",
"version": "14.10",
"hasAvailableDraftts": true,
"createdAt": "2024-05-06T11:25:50.750Z",
"updatedAt": "2024-09-09T14:36:11.531Z",
"tags": {
"Environment": "dev-us-east-1",
"Terraform": "true"
},
"customTags": {
"CostCenter": "engineering",
"Owner": "platform-team"
}
},
"..."
]
}Base64 token for pagination
Number of items to return per page
100Success
Bad Request
Unauthorized
Forbidden
Not Found
Too Many Requests
Internal Server Error
POST /v1/component/type/query HTTP/1.1
Host: api.draftt.io
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 53
{
"pageSize": 20,
"filter": {
"name": {
"$like": "*mysql*"
}
}
}{
"items": [
{
"name": "azure-db-mysql-flexible",
"provider": "azure",
"displayName": "Azure Database for MySQL - Flexible Server"
},
{
"name": "cloudsql-mysql",
"provider": "gcp",
"displayName": "Google CloudSQL MySQL"
},
{
"name": "rds-aurora-mysql",
"provider": "aws",
"displayName": "Amazon Aurora MySQL"
},
{
"name": "rds-mysql",
"provider": "aws",
"displayName": "Amazon RDS MySQL"
}
]
}Last updated

