For the complete documentation index, see llms.txt. Markdown versions of documentation pages are available by appending .md to page URLs.
Skip to content

Project Access

This endpoint is used to manage team access within a Terrakube project. Project-level permissions are inherited by all workspaces within the project.

Roles

Role
Description

admin

Full control: manage workspaces, plan/approve jobs, manage project team access

write

Manage workspaces, plan and apply jobs

plan

Queue runs; does not grant approve permission. Use requireApproveToApply to restrict ungated applies.

read

Read-only access (no changes allowed)

Entity fields:

Path
Type
Description

data.type

string

Should be "project_access"

data.attributes.name

string

Team name to grant access

data.attributes.role

string

Role: "admin", "write", "plan", or "read"

data.attributes.manageWorkspace

boolean

Permission to create, update, and delete workspaces within the project

data.attributes.manageJob

boolean

Permission to manage jobs within the project

data.attributes.planJob

boolean

Permission to plan jobs within the project

data.attributes.approveJob

boolean

Permission to approve and apply jobs within the project

data.attributes.manageState

boolean

Permission to manage Terraform state within the project

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:

Supported Operations

get

Returns the relationship projectAccess

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

project Identifier

Query parameters
filter[project_access]stringOptional

Filters the collection of project_access using a 'disjoint' RSQL expression

page[number]integer · int32Optional

Number of pages to return. Can be used with page[size]

page[size]integer · int32Optional

Number of elements per page. Can be used with page[number]

page[offset]integer · int32Optional

Offset from 0 to start paginating. Can be used with page[limit]

page[limit]integer · int32Optional

Maximum number of items to return. Can be used with page[offset]

page[totals]stringOptional

For requesting total pages/records be included in the response page meta data

Responses
200

Successful response

application/vnd.api+json
get/project/{projectId}/projectAccess
GET /api/v1/project/{projectId}/projectAccess 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,
        "manageJob": null,
        "manageState": null,
        "manageWorkspace": null,
        "name": null,
        "planJob": null,
        "role": null,
        "destroyJob": null
      },
      "relationships": {
        "project": {
          "data": [
            null
          ]
        }
      }
    }
  ],
  "included": [
    {
      "type": "text",
      "id": "text",
      "attributes": {},
      "relationships": {}
    }
  ]
}
post

Creates an item of type project_access and adds it to projectAccess

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

project Identifier

Body
Responses
201

Successful response

application/vnd.api+json
post/project/{projectId}/projectAccess
POST /api/v1/project/{projectId}/projectAccess HTTP/1.1
Host: terrakube-api.example.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/vnd.api+json
Accept: */*
Content-Length: 305

{
  "data": {
    "type": "text",
    "id": "text",
    "attributes": {
      "approveJob": null,
      "manageJob": null,
      "manageState": null,
      "manageWorkspace": null,
      "name": null,
      "planJob": null,
      "role": null,
      "destroyJob": null
    },
    "relationships": {
      "project": {
        "data": [
          null
        ]
      }
    }
  },
  "included": [
    {
      "type": "text",
      "id": "text",
      "attributes": {},
      "relationships": {}
    }
  ]
}
201

Successful response

{
  "data": {
    "type": "text",
    "id": "text",
    "attributes": {
      "approveJob": null,
      "manageJob": null,
      "manageState": null,
      "manageWorkspace": null,
      "name": null,
      "planJob": null,
      "role": null,
      "destroyJob": null
    },
    "relationships": {
      "project": {
        "data": [
          null
        ]
      }
    }
  },
  "included": [
    {
      "type": "text",
      "id": "text",
      "attributes": {},
      "relationships": {}
    }
  ]
}
get

Returns an instance of type project_access

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

project Identifier

project_accessIdstringRequired

project_access Identifier

Query parameters
Responses
200

Successful response

application/vnd.api+json
get/project/{projectId}/projectAccess/{project_accessId}
GET /api/v1/project/{projectId}/projectAccess/{project_accessId} 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,
      "manageJob": null,
      "manageState": null,
      "manageWorkspace": null,
      "name": null,
      "planJob": null,
      "role": null,
      "destroyJob": null
    },
    "relationships": {
      "project": {
        "data": [
          null
        ]
      }
    }
  },
  "included": [
    {
      "type": "text",
      "id": "text",
      "attributes": {},
      "relationships": {}
    }
  ]
}
patch

Modifies an instance of type project_access

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

project Identifier

project_accessIdstringRequired

project_access Identifier

Body
Responses
204

Successful response

No content

patch/project/{projectId}/projectAccess/{project_accessId}
PATCH /api/v1/project/{projectId}/projectAccess/{project_accessId} HTTP/1.1
Host: terrakube-api.example.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/vnd.api+json
Accept: */*
Content-Length: 305

{
  "data": {
    "type": "text",
    "id": "text",
    "attributes": {
      "approveJob": null,
      "manageJob": null,
      "manageState": null,
      "manageWorkspace": null,
      "name": null,
      "planJob": null,
      "role": null,
      "destroyJob": null
    },
    "relationships": {
      "project": {
        "data": [
          null
        ]
      }
    }
  },
  "included": [
    {
      "type": "text",
      "id": "text",
      "attributes": {},
      "relationships": {}
    }
  ]
}
204

Successful response

No content

delete

Deletes an instance of type project_access

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

project Identifier

project_accessIdstringRequired

project_access Identifier

Responses
204

Successful response

No content

delete/project/{projectId}/projectAccess/{project_accessId}
DELETE /api/v1/project/{projectId}/projectAccess/{project_accessId} HTTP/1.1
Host: terrakube-api.example.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
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?