Skip to content
For the complete documentation index, see llms.txt. This page is also available as Markdown.

Collection Item

This endpoint is used to manage collection items for a collection inside the organization.

Entity fields:

Path
Type
Description

data.type

string

Should be "item"

data.attributes.key

string

Variable key name

data.attributes.value

string

Variable value

data.attributes.description

string

Item description

data.attributes.category

string

Variable category: "ENV" or "TERRAFORM"

data.attributes.sensitive

boolean

To hide the value when the output is sensitive

data.attributes.hcl

boolean

Whether the value is HCL formatted

Example

POST /api/v1/organization/${ORGANIZATION_ID}/collection/${COLLECTION_ID}/item

{
    "data": {
        "type": "item",
        "attributes": {
            "key": "random_key",
            "value": "random_value",
            "description": "random_description",
            "category": "ENV",
            "sensitive": true,
            "hcl": false
        }
    }
}

Supported Operations

get

Returns the relationship item

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
organizationIdstringRequired

organization Identifier

collectionIdstringRequired

collection Identifier

Query parameters
filter[item]stringOptional

Filters the collection of item using a 'disjoint' RSQL expression

page[number]integer · int32Optional

Number of pages to return. Can be used with page[size]

page[size]integer · int32Optional

Number of elements per page. Can be used with page[number]

page[offset]integer · int32Optional

Offset from 0 to start paginating. Can be used with page[limit]

page[limit]integer · int32Optional

Maximum number of items to return. Can be used with page[offset]

page[totals]stringOptional

For requesting total pages/records be included in the response page meta data

Responses
200

Successful response

application/vnd.api+json
get/organization/{organizationId}/collection/{collectionId}/item
GET /api/v1/organization/{organizationId}/collection/{collectionId}/item HTTP/1.1
Host: terrakube-api.example.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
200

Successful response

{
  "data": [
    {
      "type": "text",
      "id": "text",
      "attributes": {
        "category": null,
        "description": null,
        "hcl": null,
        "key": null,
        "sensitive": null,
        "value": null
      },
      "relationships": {
        "collection": {
          "data": [
            null
          ]
        }
      }
    }
  ],
  "included": [
    {
      "type": "text",
      "id": "text",
      "attributes": {},
      "relationships": {}
    }
  ]
}
post

Creates an item of type item and adds it to item

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
organizationIdstringRequired

organization Identifier

collectionIdstringRequired

collection Identifier

Body
Responses
201

Successful response

application/vnd.api+json
post/organization/{organizationId}/collection/{collectionId}/item
POST /api/v1/organization/{organizationId}/collection/{collectionId}/item HTTP/1.1
Host: terrakube-api.example.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/vnd.api+json
Accept: */*
Content-Length: 261

{
  "data": {
    "type": "text",
    "id": "text",
    "attributes": {
      "category": null,
      "description": null,
      "hcl": null,
      "key": null,
      "sensitive": null,
      "value": null
    },
    "relationships": {
      "collection": {
        "data": [
          null
        ]
      }
    }
  },
  "included": [
    {
      "type": "text",
      "id": "text",
      "attributes": {},
      "relationships": {}
    }
  ]
}
201

Successful response

{
  "data": {
    "type": "text",
    "id": "text",
    "attributes": {
      "category": null,
      "description": null,
      "hcl": null,
      "key": null,
      "sensitive": null,
      "value": null
    },
    "relationships": {
      "collection": {
        "data": [
          null
        ]
      }
    }
  },
  "included": [
    {
      "type": "text",
      "id": "text",
      "attributes": {},
      "relationships": {}
    }
  ]
}
get

Returns an instance of type item

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
organizationIdstringRequired

organization Identifier

collectionIdstringRequired

collection Identifier

itemIdstringRequired

item Identifier

Query parameters
Responses
200

Successful response

application/vnd.api+json
get/organization/{organizationId}/collection/{collectionId}/item/{itemId}
GET /api/v1/organization/{organizationId}/collection/{collectionId}/item/{itemId} HTTP/1.1
Host: terrakube-api.example.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
200

Successful response

{
  "data": {
    "type": "text",
    "id": "text",
    "attributes": {
      "category": null,
      "description": null,
      "hcl": null,
      "key": null,
      "sensitive": null,
      "value": null
    },
    "relationships": {
      "collection": {
        "data": [
          null
        ]
      }
    }
  },
  "included": [
    {
      "type": "text",
      "id": "text",
      "attributes": {},
      "relationships": {}
    }
  ]
}
delete

Deletes an instance of type item

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
organizationIdstringRequired

organization Identifier

collectionIdstringRequired

collection Identifier

itemIdstringRequired

item Identifier

Responses
204

Successful response

No content

delete/organization/{organizationId}/collection/{collectionId}/item/{itemId}
DELETE /api/v1/organization/{organizationId}/collection/{collectionId}/item/{itemId} HTTP/1.1
Host: terrakube-api.example.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
204

Successful response

No content

patch

Modifies an instance of type item

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
organizationIdstringRequired

organization Identifier

collectionIdstringRequired

collection Identifier

itemIdstringRequired

item Identifier

Body
Responses
204

Successful response

No content

patch/organization/{organizationId}/collection/{collectionId}/item/{itemId}
PATCH /api/v1/organization/{organizationId}/collection/{collectionId}/item/{itemId} HTTP/1.1
Host: terrakube-api.example.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/vnd.api+json
Accept: */*
Content-Length: 261

{
  "data": {
    "type": "text",
    "id": "text",
    "attributes": {
      "category": null,
      "description": null,
      "hcl": null,
      "key": null,
      "sensitive": null,
      "value": null
    },
    "relationships": {
      "collection": {
        "data": [
          null
        ]
      }
    }
  },
  "included": [
    {
      "type": "text",
      "id": "text",
      "attributes": {},
      "relationships": {}
    }
  ]
}
204

Successful response

No content

Last updated

Was this helpful?