> For the complete documentation index, see [llms.txt](https://docs.terrakube.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.terrakube.io/api/methods/vcs.md).

# 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

{% hint style="warning" %}
To use this endpoint you should have "manageVcs" access at team level and a Terrakube Organization
{% endhint %}

### 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

{% openapi src="/files/w7UwhVqVh1io56WMn611" path="/organization/{organizationId}/vcs/{vcsId}" method="get" %}
[v2\_6.yaml](https://4014930676-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MfAN3V983Y82_trlbcu%2Fuploads%2Fgit-blob-cbcb0b1bcdefad8f4d123fc3cda02bf617d62c95%2Fv2_6.yaml?alt=media)
{% endopenapi %}

{% openapi src="/files/pkZcpXvhoZQtJEOUVY0d" path="/organization/{organizationId}/vcs" method="post" %}
[v1\_4.yml](https://4014930676-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MfAN3V983Y82_trlbcu%2Fuploads%2Fgit-blob-2824914a25a0c9dcaeb76f04beced4d42e3917dc%2Fv1_4.yml?alt=media\&token=d400fdb2-a7d2-4d5a-b731-28b1f7540c09)
{% endopenapi %}

{% openapi src="/files/pkZcpXvhoZQtJEOUVY0d" path="/organization/{organizationId}/vcs/{vcsId}" method="delete" %}
[v1\_4.yml](https://4014930676-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MfAN3V983Y82_trlbcu%2Fuploads%2Fgit-blob-2824914a25a0c9dcaeb76f04beced4d42e3917dc%2Fv1_4.yml?alt=media\&token=d400fdb2-a7d2-4d5a-b731-28b1f7540c09)
{% endopenapi %}

{% openapi src="/files/pkZcpXvhoZQtJEOUVY0d" path="/organization/{organizationId}/vcs/{vcsId}" method="patch" %}
[v1\_4.yml](https://4014930676-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MfAN3V983Y82_trlbcu%2Fuploads%2Fgit-blob-2824914a25a0c9dcaeb76f04beced4d42e3917dc%2Fv1_4.yml?alt=media\&token=d400fdb2-a7d2-4d5a-b731-28b1f7540c09)
{% endopenapi %}

{% hint style="info" %}
For a complete list of organization operation please visit the [OpenAPI specification](https://github.com/AzBuilder/terrakube-server/tree/main/openapi-spec)
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.terrakube.io/api/methods/vcs.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
