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

Teams

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

You need to be part of the administrator Active Directory Group to work with this endpoint

Entity fields:

Path
Type
Description

data.type

string

Should be "team"

data.attributes.name

string

Active Directory Group name

data.attributes.manageWorkspace

boolean

Enable Create/Update/Delete Workspaces for a Team

data.attributes.manageModule

boolean

Enable Create/Update/Delete Workspaces for a Team

data.attributes.manageProvider

boolean

Enable Create/Update/Delete Terraform Provider for a Team

data.attributes.manageVcs

boolean

Enable Create/Update/Delete VCS connection for private GIT Repositories for a Team

data.attributes.manageTemplates

boolean

Enable Create/Update/Delete Templates for a Team

In 2.34.0, data.attributes.destroyJob controls destroy permission for Custom access and defaults to true. Admin/Write allow destroy; Plan/Read do not. See Run Restrictions.

Example:

{
  "data": {
    "type": "team",
    "attributes": {
      "name": "TERRAKUBE_TEAM",
      "manageWorkspace": true,
      "manageModule": true,
      "manageProvider": true,
      "manageVcs": true,
      "manageTemplate": true
    }
  }
}

Supported Operations

get

Returns an instance of type team

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

organization Identifier

teamIdstringRequired

team Identifier

Query parameters
Responses
200

Successful response

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

Successful response

{
  "data": {
    "type": "text",
    "id": "text",
    "attributes": {
      "approveJob": null,
      "manageCollection": null,
      "manageJob": null,
      "manageModule": null,
      "managePolicies": null,
      "manageProvider": null,
      "manageState": null,
      "manageTemplate": null,
      "manageVcs": null,
      "manageWorkspace": null,
      "name": null,
      "planJob": null,
      "role": null,
      "destroyJob": null
    },
    "relationships": {
      "organization": {
        "data": [
          null
        ]
      }
    }
  },
  "included": [
    {
      "type": "text",
      "id": "text",
      "attributes": {},
      "relationships": {}
    }
  ]
}
post

Creates an item of type team and adds it to team

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

{
  "data": {
    "type": "text",
    "id": "text",
    "attributes": {
      "approveJob": null,
      "manageCollection": null,
      "manageJob": null,
      "manageModule": null,
      "managePolicies": null,
      "manageProvider": null,
      "manageState": null,
      "manageTemplate": null,
      "manageVcs": null,
      "manageWorkspace": null,
      "name": null,
      "planJob": null,
      "role": null,
      "destroyJob": null
    },
    "relationships": {
      "organization": {
        "data": [
          null
        ]
      }
    }
  },
  "included": [
    {
      "type": "text",
      "id": "text",
      "attributes": {},
      "relationships": {}
    }
  ]
}
201

Successful response

{
  "data": {
    "type": "text",
    "id": "text",
    "attributes": {
      "approveJob": null,
      "manageCollection": null,
      "manageJob": null,
      "manageModule": null,
      "managePolicies": null,
      "manageProvider": null,
      "manageState": null,
      "manageTemplate": null,
      "manageVcs": null,
      "manageWorkspace": null,
      "name": null,
      "planJob": null,
      "role": null,
      "destroyJob": null
    },
    "relationships": {
      "organization": {
        "data": [
          null
        ]
      }
    }
  },
  "included": [
    {
      "type": "text",
      "id": "text",
      "attributes": {},
      "relationships": {}
    }
  ]
}
delete

Deletes an instance of type team

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

organization Identifier

teamIdstringRequired

team Identifier

Responses
204

Successful response

No content

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

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

organization Identifier

teamIdstringRequired

team Identifier

Body
Responses
204

Successful response

No content

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

{
  "data": {
    "type": "text",
    "id": "text",
    "attributes": {
      "approveJob": null,
      "manageCollection": null,
      "manageJob": null,
      "manageModule": null,
      "managePolicies": null,
      "manageProvider": null,
      "manageState": null,
      "manageTemplate": null,
      "manageVcs": null,
      "manageWorkspace": null,
      "name": null,
      "planJob": null,
      "role": null,
      "destroyJob": null
    },
    "relationships": {
      "organization": {
        "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?