Component

Search and filter components

post
Authorizations
Body
nextTokenstringOptionalExample: eyJza2lwIjoxMH0
pageSizeinteger · min: 1 · max: 100OptionalDefault: 10
Responses
200
Success
application/json
post
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
}

Retrieve a specific component by ID

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

Query draftt sections for a component

post
Authorizations
Path parameters
componentIdintegerRequired

Component ID

Body
Responses
200
Success
application/json
post
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"
    }
  ]
}