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

Module

This endpoint is used to create, update, search or delete module information inside a Terrakube organization.

Entity fields:

Path
Type
Description

data.type

string

Should be "workspace"

data.attributes.name

string

Unique workspace for an Terrakube organization

data.attributes.branch

boolean

Git branch to be used

data.attributes.source

boolean

Git repository to be used

data.attributes.terraformVersion

boolean

Terraform version to run the workspace

data.relationships.vcs.data.type

string

Should be "vcs" (OPTIONAL)

data.relationships.vcs.data.type

string

Should be the VCS Connection Id (OPTIONAL)

Example:

{
  "data": {
    "type": "module",
    "attributes": {
      "name": "Terrakube module",
      "description": "Module Description",
      "provider": "Terraform Provider",
      "source": "https://github.com/terrakube-io/terraform-sample-repository.git"
    },
        "relationships": {
            "vcs": {
                "data": {
                    "type": "vcs",
                    "id": "{{vcsId}}"
                }
            }
        }
  }
}

Supported Operations

get

Returns an instance of type module

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

organization Identifier

moduleIdstringRequired

module Identifier

Query parameters
Responses
200

Successful response

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

Successful response

{
  "data": {
    "type": "text",
    "id": "text",
    "attributes": {
      "createdBy": null,
      "createdDate": null,
      "description": null,
      "downloadQuantity": null,
      "folder": null,
      "latestVersion": null,
      "name": null,
      "provider": null,
      "registryPath": null,
      "source": null,
      "tagPrefix": null,
      "updatedBy": null,
      "updatedDate": null
    },
    "relationships": {
      "organization": {
        "data": [
          null
        ]
      },
      "ssh": {
        "data": [
          null
        ]
      },
      "vcs": {
        "data": [
          null
        ]
      },
      "version": {
        "data": [
          null
        ]
      }
    }
  },
  "included": [
    {
      "type": "text",
      "id": "text",
      "attributes": {},
      "relationships": {}
    }
  ]
}
post

Creates an item of type module and adds it to module

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

organization Identifier

Body
Responses
201

Successful response

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

{
  "data": {
    "type": "text",
    "id": "text",
    "attributes": {
      "createdBy": null,
      "createdDate": null,
      "description": null,
      "downloadQuantity": null,
      "folder": null,
      "latestVersion": null,
      "name": null,
      "provider": null,
      "registryPath": null,
      "source": null,
      "tagPrefix": null,
      "updatedBy": null,
      "updatedDate": null
    },
    "relationships": {
      "organization": {
        "data": [
          null
        ]
      },
      "ssh": {
        "data": [
          null
        ]
      },
      "vcs": {
        "data": [
          null
        ]
      },
      "version": {
        "data": [
          null
        ]
      }
    }
  },
  "included": [
    {
      "type": "text",
      "id": "text",
      "attributes": {},
      "relationships": {}
    }
  ]
}
201

Successful response

{
  "data": {
    "type": "text",
    "id": "text",
    "attributes": {
      "createdBy": null,
      "createdDate": null,
      "description": null,
      "downloadQuantity": null,
      "folder": null,
      "latestVersion": null,
      "name": null,
      "provider": null,
      "registryPath": null,
      "source": null,
      "tagPrefix": null,
      "updatedBy": null,
      "updatedDate": null
    },
    "relationships": {
      "organization": {
        "data": [
          null
        ]
      },
      "ssh": {
        "data": [
          null
        ]
      },
      "vcs": {
        "data": [
          null
        ]
      },
      "version": {
        "data": [
          null
        ]
      }
    }
  },
  "included": [
    {
      "type": "text",
      "id": "text",
      "attributes": {},
      "relationships": {}
    }
  ]
}
delete

Deletes an instance of type module

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

organization Identifier

moduleIdstringRequired

module Identifier

Responses
204

Successful response

No content

delete/organization/{organizationId}/module/{moduleId}
DELETE /api/v1/organization/{organizationId}/module/{moduleId} 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 module

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

organization Identifier

moduleIdstringRequired

module Identifier

Body
Responses
204

Successful response

No content

patch/organization/{organizationId}/module/{moduleId}
PATCH /api/v1/organization/{organizationId}/module/{moduleId} HTTP/1.1
Host: terrakube-api.example.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/vnd.api+json
Accept: */*
Content-Length: 475

{
  "data": {
    "type": "text",
    "id": "text",
    "attributes": {
      "createdBy": null,
      "createdDate": null,
      "description": null,
      "downloadQuantity": null,
      "folder": null,
      "latestVersion": null,
      "name": null,
      "provider": null,
      "registryPath": null,
      "source": null,
      "tagPrefix": null,
      "updatedBy": null,
      "updatedDate": null
    },
    "relationships": {
      "organization": {
        "data": [
          null
        ]
      },
      "ssh": {
        "data": [
          null
        ]
      },
      "vcs": {
        "data": [
          null
        ]
      },
      "version": {
        "data": [
          null
        ]
      }
    }
  },
  "included": [
    {
      "type": "text",
      "id": "text",
      "attributes": {},
      "relationships": {}
    }
  ]
}
204

Successful response

No content

The complete OpenAPI specification is available as terrakube-api.json, and in the UI under Help & Support → API Docs.

Last updated

Was this helpful?