Collection Item
This endpoint is used to manage collection items for a collection inside the organization.
Entity fields:
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
Returns the relationship item
organization Identifier
collection Identifier
Filters the collection of item using a 'disjoint' RSQL expression
Number of pages to return. Can be used with page[size]
Number of elements per page. Can be used with page[number]
Offset from 0 to start paginating. Can be used with page[limit]
Maximum number of items to return. Can be used with page[offset]
For requesting total pages/records be included in the response page meta data
Successful response
GET /api/v1/organization/{organizationId}/collection/{collectionId}/item HTTP/1.1
Host: terrakube-api.example.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
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": {}
}
]
}Creates an item of type item and adds it to item
organization Identifier
collection Identifier
Successful response
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": {}
}
]
}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": {}
}
]
}Returns an instance of type item
organization Identifier
collection Identifier
item Identifier
Successful response
GET /api/v1/organization/{organizationId}/collection/{collectionId}/item/{itemId} HTTP/1.1
Host: terrakube-api.example.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
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": {}
}
]
}Deletes an instance of type item
organization Identifier
collection Identifier
item Identifier
Successful response
No content
DELETE /api/v1/organization/{organizationId}/collection/{collectionId}/item/{itemId} HTTP/1.1
Host: terrakube-api.example.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
Successful response
No content
Modifies an instance of type item
organization Identifier
collection Identifier
item Identifier
Successful response
No content
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": {}
}
]
}Successful response
No content
Last updated
Was this helpful?