Skip to main content
POST
/
component
/
{componentId}
/
draftt
/
query
Query draftt sections for a component
curl --request POST \
  --url https://api.draftt.io/v1/component/{componentId}/draftt/query \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "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"
    }
  ]
}

Authorizations

Authorization
string
header
required

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

Path Parameters

componentId
integer
required

Component ID

Body

application/json
sections
enum<string>[]

List of draftt sections to retrieve

Available options:
eksAddOns,
deployments,
controlPlane,
nodes,
k8sApi

Response

Success

items
object[]

Array of draftt items with requested sections