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

Vcs

This endpoint is used to create, update, search or delete vcs (version control system) information inside a Terrakube organization so you can connect to private git repositories to run modules and workspaces

Entity fields:

Path
Type
Description

data.type

string

Should be "vcs"

data.attributes.name

string

Unique vcs name for an Terrakube organization

data.attributes.description

string

Free text for description

data.attributes.vcsType

string

Supported values: GITHUB, GITLAB, BITBUCKET, AZURE_DEVOPS

data.attributes.clientID

string

Client Application Id

data.attributes.clientSecret

string

Client Application secret

Example:

{
  "data": {
    "type": "vcs",
    "attributes": {
      "name": "GitHubConnection",
      "description": "Private repositories inside GitHub",
      "vcsType": "GITHUB",
      "clientId": "{{githubClientId}}",
      "clientSecret": "{{githubClientSecret}}"
    }
  }
}

Supported Operations

get

Returns an instance of type vcs

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

organization Identifier

vcsIdstringRequired

vcs Identifier

Query parameters
Responses
200

Successful response

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

Successful response

{
  "data": {
    "type": "text",
    "id": "text",
    "attributes": {
      "accessToken": null,
      "apiUrl": null,
      "callback": null,
      "clientId": null,
      "clientSecret": null,
      "connectionType": null,
      "createdBy": null,
      "createdDate": null,
      "description": null,
      "endpoint": null,
      "name": null,
      "privateKey": null,
      "redirectUrl": null,
      "status": null,
      "updatedBy": null,
      "updatedDate": null,
      "vcsType": null
    },
    "relationships": {
      "organization": {
        "data": [
          null
        ]
      },
      "workspace": {
        "data": [
          null
        ]
      }
    }
  },
  "included": [
    {
      "type": "text",
      "id": "text",
      "attributes": {},
      "relationships": {}
    }
  ]
}
post

Creates an item of type vcs and adds it to vcs

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}/vcs
POST /api/v1/organization/{organizationId}/vcs HTTP/1.1
Host: terrakube-api.example.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/vnd.api+json
Accept: */*
Content-Length: 496

{
  "data": {
    "type": "text",
    "id": "text",
    "attributes": {
      "accessToken": null,
      "apiUrl": null,
      "callback": null,
      "clientId": null,
      "clientSecret": null,
      "connectionType": null,
      "createdBy": null,
      "createdDate": null,
      "description": null,
      "endpoint": null,
      "name": null,
      "privateKey": null,
      "redirectUrl": null,
      "status": null,
      "updatedBy": null,
      "updatedDate": null,
      "vcsType": null
    },
    "relationships": {
      "organization": {
        "data": [
          null
        ]
      },
      "workspace": {
        "data": [
          null
        ]
      }
    }
  },
  "included": [
    {
      "type": "text",
      "id": "text",
      "attributes": {},
      "relationships": {}
    }
  ]
}
201

Successful response

{
  "data": {
    "type": "text",
    "id": "text",
    "attributes": {
      "accessToken": null,
      "apiUrl": null,
      "callback": null,
      "clientId": null,
      "clientSecret": null,
      "connectionType": null,
      "createdBy": null,
      "createdDate": null,
      "description": null,
      "endpoint": null,
      "name": null,
      "privateKey": null,
      "redirectUrl": null,
      "status": null,
      "updatedBy": null,
      "updatedDate": null,
      "vcsType": null
    },
    "relationships": {
      "organization": {
        "data": [
          null
        ]
      },
      "workspace": {
        "data": [
          null
        ]
      }
    }
  },
  "included": [
    {
      "type": "text",
      "id": "text",
      "attributes": {},
      "relationships": {}
    }
  ]
}
delete

Deletes an instance of type vcs

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

organization Identifier

vcsIdstringRequired

vcs Identifier

Responses
204

Successful response

No content

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

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

organization Identifier

vcsIdstringRequired

vcs Identifier

Body
Responses
204

Successful response

No content

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

{
  "data": {
    "type": "text",
    "id": "text",
    "attributes": {
      "accessToken": null,
      "apiUrl": null,
      "callback": null,
      "clientId": null,
      "clientSecret": null,
      "connectionType": null,
      "createdBy": null,
      "createdDate": null,
      "description": null,
      "endpoint": null,
      "name": null,
      "privateKey": null,
      "redirectUrl": null,
      "status": null,
      "updatedBy": null,
      "updatedDate": null,
      "vcsType": null
    },
    "relationships": {
      "organization": {
        "data": [
          null
        ]
      },
      "workspace": {
        "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?