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

Project

This endpoint is used to create, update, search or delete project information inside a Terrakube organization. Projects allow you to group workspaces and manage team access at the project level.

Entity fields:

Path
Type
Description

data.type

string

Should be "project"

data.attributes.name

string

Unique project name for a Terrakube organization

data.attributes.description

string

Project description (OPTIONAL)

Example:

{
    "data": {
        "type": "project",
        "attributes": {
            "name": "My Project",
            "description": "A sample project for grouping workspaces"
        }
    }
}

Supported Operations

get

Returns the relationship project

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

organization Identifier

Query parameters
filter[project]stringOptional

Filters the collection of project 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/organization/{organizationId}/project
GET /api/v1/organization/{organizationId}/project HTTP/1.1
Host: terrakube-api.example.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
200

Successful response

{
  "data": [
    {
      "type": "text",
      "id": "text",
      "attributes": {
        "createdBy": null,
        "createdDate": null,
        "description": null,
        "name": null,
        "updatedBy": null,
        "updatedDate": null
      },
      "relationships": {
        "organization": {
          "data": [
            null
          ]
        },
        "projectAccess": {
          "data": [
            null
          ]
        }
      }
    }
  ],
  "included": [
    {
      "type": "text",
      "id": "text",
      "attributes": {},
      "relationships": {}
    }
  ]
}
post

Creates an item of type project and adds it to project

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

{
  "data": {
    "type": "text",
    "id": "text",
    "attributes": {
      "createdBy": null,
      "createdDate": null,
      "description": null,
      "name": null,
      "updatedBy": null,
      "updatedDate": null
    },
    "relationships": {
      "organization": {
        "data": [
          null
        ]
      },
      "projectAccess": {
        "data": [
          null
        ]
      }
    }
  },
  "included": [
    {
      "type": "text",
      "id": "text",
      "attributes": {},
      "relationships": {}
    }
  ]
}
201

Successful response

{
  "data": {
    "type": "text",
    "id": "text",
    "attributes": {
      "createdBy": null,
      "createdDate": null,
      "description": null,
      "name": null,
      "updatedBy": null,
      "updatedDate": null
    },
    "relationships": {
      "organization": {
        "data": [
          null
        ]
      },
      "projectAccess": {
        "data": [
          null
        ]
      }
    }
  },
  "included": [
    {
      "type": "text",
      "id": "text",
      "attributes": {},
      "relationships": {}
    }
  ]
}
get

Returns an instance of type project

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

organization Identifier

projectIdstringRequired

project Identifier

Query parameters
Responses
200

Successful response

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

Successful response

{
  "data": {
    "type": "text",
    "id": "text",
    "attributes": {
      "createdBy": null,
      "createdDate": null,
      "description": null,
      "name": null,
      "updatedBy": null,
      "updatedDate": null
    },
    "relationships": {
      "organization": {
        "data": [
          null
        ]
      },
      "projectAccess": {
        "data": [
          null
        ]
      }
    }
  },
  "included": [
    {
      "type": "text",
      "id": "text",
      "attributes": {},
      "relationships": {}
    }
  ]
}
patch

Modifies an instance of type project

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

organization Identifier

projectIdstringRequired

project Identifier

Body
Responses
204

Successful response

No content

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

{
  "data": {
    "type": "text",
    "id": "text",
    "attributes": {
      "createdBy": null,
      "createdDate": null,
      "description": null,
      "name": null,
      "updatedBy": null,
      "updatedDate": null
    },
    "relationships": {
      "organization": {
        "data": [
          null
        ]
      },
      "projectAccess": {
        "data": [
          null
        ]
      }
    }
  },
  "included": [
    {
      "type": "text",
      "id": "text",
      "attributes": {},
      "relationships": {}
    }
  ]
}
204

Successful response

No content

delete

Deletes an instance of type project

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

organization Identifier

projectIdstringRequired

project Identifier

Responses
204

Successful response

No content

delete/organization/{organizationId}/project/{projectId}
DELETE /api/v1/organization/{organizationId}/project/{projectId} HTTP/1.1
Host: terrakube-api.example.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
204

Successful response

No content

Workspace Assignment

To assign a workspace to a project, use the workspace relationships endpoint. Set data to null to unassign.

Assign workspace to project:

Unassign workspace from project:

patch

Replaces the relationship project

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

workspace Identifier

Body
Responses
204

Successful response

No content

patch/workspace/{workspaceId}/relationships/project
PATCH /api/v1/workspace/{workspaceId}/relationships/project HTTP/1.1
Host: terrakube-api.example.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/vnd.api+json
Accept: */*
Content-Length: 39

{
  "data": {
    "type": "project",
    "id": "text"
  }
}
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?