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

Path parameters
organizationIdanyRequired

organization Identifier

vcsIdanyRequired

vcs Identifier

Query parameters
Responses
200
Successful response
application/vnd.api+json
get
GET /api/v1/organization/{organizationId}/vcs/{vcsId} HTTP/1.1
Host: 
Accept: */*
200

Successful response

{
  "data": {
    "type": "text",
    "id": "text",
    "attributes": {
      "accessToken": "text",
      "clientId": "text",
      "clientSecret": "text",
      "description": "text",
      "name": "text",
      "vcsType": "GITHUB"
    },
    "relationships": {
      "organization": {
        "id": "text",
        "type": "organization"
      }
    }
  },
  "included": [
    {
      "attributes": {},
      "id": "text",
      "relationships": {},
      "type": "text"
    }
  ]
}
post

Creates an item of type vcs and adds it to vcs

Path parameters
organizationIdanyRequired

organization Identifier

Body
Responses
201
Successful response
application/vnd.api+json
post
POST /api/v1/organization/{organizationId}/vcs HTTP/1.1
Host: 
Content-Type: application/vnd.api+json
Accept: */*
Content-Length: 235

{
  "data": {
    "type": "text",
    "id": "text",
    "attributes": {
      "accessToken": "text",
      "clientId": "text",
      "clientSecret": "text",
      "description": "text",
      "name": "text",
      "vcsType": "GITHUB"
    },
    "relationships": {
      "organization": {
        "id": "text",
        "type": "organization"
      }
    }
  }
}
201

Successful response

{
  "data": {
    "type": "text",
    "id": "text",
    "attributes": {
      "accessToken": "text",
      "clientId": "text",
      "clientSecret": "text",
      "description": "text",
      "name": "text",
      "vcsType": "GITHUB"
    },
    "relationships": {
      "organization": {
        "id": "text",
        "type": "organization"
      }
    }
  }
}
delete

Deletes an instance of type vcs

Path parameters
organizationIdanyRequired

organization Identifier

vcsIdanyRequired

vcs Identifier

Responses
204
Successful response
delete
DELETE /api/v1/organization/{organizationId}/vcs/{vcsId} HTTP/1.1
Host: 
Accept: */*
204

Successful response

No content

patch

Modifies an instance of type vcs

Path parameters
organizationIdanyRequired

organization Identifier

vcsIdanyRequired

vcs Identifier

Body
Responses
204
Successful response
patch
PATCH /api/v1/organization/{organizationId}/vcs/{vcsId} HTTP/1.1
Host: 
Content-Type: application/vnd.api+json
Accept: */*
Content-Length: 235

{
  "data": {
    "type": "text",
    "id": "text",
    "attributes": {
      "accessToken": "text",
      "clientId": "text",
      "clientSecret": "text",
      "description": "text",
      "name": "text",
      "vcsType": "GITHUB"
    },
    "relationships": {
      "organization": {
        "id": "text",
        "type": "organization"
      }
    }
  }
}
204

Successful response

No content

For a complete list of organization operation please visit the OpenAPI specification

Last updated

Was this helpful?