All pages
Powered by GitBook
1 of 1

Loading...

Template

This endpoint is used to create, update, search or delete teamplates inside an organization.

Entity fields:

Path
Type
Description

data.type

string

Should be "template"

data.attributes.tcl

string

Terraform Configuration Language job template

data.attribute.name

string

Template name

data.attribute.description

string

Template description

data.attribute.version

string

Template version

{
  "data": {
    "type": "template",
    "attributes": {
      "name": "Some name",
      "description": "Some description",
      "version": "1.0.0",
      "tcl": "{{templateSample}}"
    }
  }
}

To better understand Terrakube Configuration Language job templates please refer to the following

Example:

Supported Operations

For a complete list of organization operation please visit the

GitHub repository.
OpenAPI specification
post

Creates an item of type template and adds it to template

Path parameters
organizationIdstringRequired

organization Identifier

Body
typestringOptional

Create Permissions : (team manage template) Delete Permissions : (team manage template)

idstringOptional
createdBystringOptional

Read Permissions : (team view template) Update Permissions : (team manage template)

createdDatestringOptional

Read Permissions : (team view template) Update Permissions : (team manage template)

descriptionstringOptional

Read Permissions : (team view template) Update Permissions : (team manage template)

namestringOptional

Read Permissions : (team view template) Update Permissions : (team manage template)

tclstringOptional

Read Permissions : (team view template) Update Permissions : (team manage template)

updatedBystringOptional

Read Permissions : (team view template) Update Permissions : (team manage template)

updatedDatestringOptional

Read Permissions : (team view template) Update Permissions : (team manage template)

versionstringOptional

Read Permissions : (team view template) Update Permissions : (team manage template)

typestring 路 enumOptionalPossible values:
idstringOptional
typestringOptional
idstringOptional
attributesobjectOptional
relationshipsobjectOptional
Responses
201

Successful response

application/vnd.api+json
typestringOptional

Create Permissions : (team manage template) Delete Permissions : (team manage template)

idstringOptional
createdBystringOptional

Read Permissions : (team view template) Update Permissions : (team manage template)

createdDatestringOptional

Read Permissions : (team view template) Update Permissions : (team manage template)

descriptionstringOptional

Read Permissions : (team view template) Update Permissions : (team manage template)

namestringOptional

Read Permissions : (team view template) Update Permissions : (team manage template)

tclstringOptional

Read Permissions : (team view template) Update Permissions : (team manage template)

updatedBystringOptional

Read Permissions : (team view template) Update Permissions : (team manage template)

updatedDatestringOptional

Read Permissions : (team view template) Update Permissions : (team manage template)

versionstringOptional

Read Permissions : (team view template) Update Permissions : (team manage template)

typestring 路 enumOptionalPossible values:
idstringOptional
typestringOptional
idstringOptional
attributesobjectOptional
relationshipsobjectOptional
post/organization/{organizationId}/template
201

Successful response

get

Returns an instance of type template

Path parameters
organizationIdstringRequired

organization Identifier

templateIdstringRequired

template Identifier

Query parameters
itemsstring 路 enumOptionalPossible values:
itemsstring 路 enumOptionalPossible values:
Responses
200

Successful response

application/vnd.api+json
get/organization/{organizationId}/template/{templateId}
200

Successful response

delete

Deletes an instance of type template

Path parameters
organizationIdstringRequired

organization Identifier

templateIdstringRequired

template Identifier

Responses
204

Successful response

delete/organization/{organizationId}/template/{templateId}
204

Successful response

No content

patch

Modifies an instance of type template

Path parameters
organizationIdstringRequired

organization Identifier

templateIdstringRequired

template Identifier

Body
typestringOptional

Create Permissions : (team manage template) Delete Permissions : (team manage template)

idstringOptional
createdBystringOptional

Read Permissions : (team view template) Update Permissions : (team manage template)

createdDatestringOptional

Read Permissions : (team view template) Update Permissions : (team manage template)

descriptionstringOptional

Read Permissions : (team view template) Update Permissions : (team manage template)

namestringOptional

Read Permissions : (team view template) Update Permissions : (team manage template)

tclstringOptional

Read Permissions : (team view template) Update Permissions : (team manage template)

updatedBystringOptional

Read Permissions : (team view template) Update Permissions : (team manage template)

updatedDatestringOptional

Read Permissions : (team view template) Update Permissions : (team manage template)

versionstringOptional

Read Permissions : (team view template) Update Permissions : (team manage template)

typestring 路 enumOptionalPossible values:
idstringOptional
typestringOptional
idstringOptional
attributesobjectOptional
relationshipsobjectOptional
Responses
204

Successful response

patch/organization/{organizationId}/template/{templateId}
204

Successful response

No content

get

Returns the relationship template

Path parameters
organizationIdstringRequired

organization Identifier

Query parameters
itemsstring 路 enumOptionalPossible values:
itemsstring 路 enumOptionalPossible values:
itemsstring 路 enumOptionalPossible values:
filter[template]stringOptional

Filters the collection of template 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}/template
200

Successful response

{
  "data": [
    {
      "type": "text",
      "id": "text",
      "attributes": {
        "createdBy": null,
        "createdDate": null,
        "description": null,
        "name": null,
        "tcl": null,
        "updatedBy": null,
        "updatedDate": null,
        "version": null
      },
      "relationships": {
        "organization": {
          "data": [
            null
          ]
        }
      }
    }
  ],
  "included": [
    {
      "type": "text",
      "id": "text",
      "attributes": {},
      "relationships": {}
    }
  ]
}
POST /api/v1/organization/{organizationId}/template HTTP/1.1
Content-Type: application/vnd.api+json
Accept: */*
Content-Length: 305

{
  "data": {
    "type": "text",
    "id": "text",
    "attributes": {
      "createdBy": null,
      "createdDate": null,
      "description": null,
      "name": null,
      "tcl": null,
      "updatedBy": null,
      "updatedDate": null,
      "version": null
    },
    "relationships": {
      "organization": {
        "data": [
          null
        ]
      }
    }
  },
  "included": [
    {
      "type": "text",
      "id": "text",
      "attributes": {},
      "relationships": {}
    }
  ]
}
{
  "data": {
    "type": "text",
    "id": "text",
    "attributes": {
      "createdBy": null,
      "createdDate": null,
      "description": null,
      "name": null,
      "tcl": null,
      "updatedBy": null,
      "updatedDate": null,
      "version": null
    },
    "relationships": {
      "organization": {
        "data": [
          null
        ]
      }
    }
  },
  "included": [
    {
      "type": "text",
      "id": "text",
      "attributes": {},
      "relationships": {}
    }
  ]
}
GET /api/v1/organization/{organizationId}/template/{templateId} HTTP/1.1
Accept: */*
{
  "data": {
    "type": "text",
    "id": "text",
    "attributes": {
      "createdBy": null,
      "createdDate": null,
      "description": null,
      "name": null,
      "tcl": null,
      "updatedBy": null,
      "updatedDate": null,
      "version": null
    },
    "relationships": {
      "organization": {
        "data": [
          null
        ]
      }
    }
  },
  "included": [
    {
      "type": "text",
      "id": "text",
      "attributes": {},
      "relationships": {}
    }
  ]
}
DELETE /api/v1/organization/{organizationId}/template/{templateId} HTTP/1.1
Accept: */*
PATCH /api/v1/organization/{organizationId}/template/{templateId} HTTP/1.1
Content-Type: application/vnd.api+json
Accept: */*
Content-Length: 305

{
  "data": {
    "type": "text",
    "id": "text",
    "attributes": {
      "createdBy": null,
      "createdDate": null,
      "description": null,
      "name": null,
      "tcl": null,
      "updatedBy": null,
      "updatedDate": null,
      "version": null
    },
    "relationships": {
      "organization": {
        "data": [
          null
        ]
      }
    }
  },
  "included": [
    {
      "type": "text",
      "id": "text",
      "attributes": {},
      "relationships": {}
    }
  ]
}
GET /api/v1/organization/{organizationId}/template HTTP/1.1
Accept: */*