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

Organization

This endpoint is used to create, update, search or delete organizations information inside Terrakube.

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 "organization"

data.attributes.name

string

Unique name in Terrakube

data.attributes.description

string

Free description

Example:

{
  "data": {
    "type": "organization",
    "attributes": {
      "name": "terrakube",
      "description": "Terrakube Organization"
    }
  }
}

Supported Operations

get

Returns the collection of type organization

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Query parameters
filter[organization]stringOptional

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

filterstringOptional

Filters the collection of organization using a 'joined' 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
GET /api/v1/organization HTTP/1.1
Host: terrakube-api.example.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
200

Successful response

{
  "data": [
    {
      "type": "text",
      "id": "text",
      "attributes": {
        "description": null,
        "disabled": null,
        "executionMode": null,
        "icon": null,
        "name": null
      },
      "relationships": {
        "agent": {
          "data": [
            null
          ]
        },
        "collection": {
          "data": [
            null
          ]
        },
        "globalvar": {
          "data": [
            null
          ]
        },
        "job": {
          "data": [
            null
          ]
        },
        "module": {
          "data": [
            null
          ]
        },
        "notificationConfiguration": {
          "data": [
            null
          ]
        },
        "policyExemption": {
          "data": [
            null
          ]
        },
        "policySet": {
          "data": [
            null
          ]
        },
        "project": {
          "data": [
            null
          ]
        },
        "provider": {
          "data": [
            null
          ]
        },
        "ssh": {
          "data": [
            null
          ]
        },
        "tag": {
          "data": [
            null
          ]
        },
        "team": {
          "data": [
            null
          ]
        },
        "template": {
          "data": [
            null
          ]
        },
        "vcs": {
          "data": [
            null
          ]
        },
        "workspace": {
          "data": [
            null
          ]
        }
      }
    }
  ],
  "included": [
    {
      "type": "text",
      "id": "text",
      "attributes": {},
      "relationships": {}
    }
  ]
}
post

Creates an item of type organization

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Body
Responses
201

Successful response

application/vnd.api+json
post/organization
POST /api/v1/organization HTTP/1.1
Host: terrakube-api.example.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/vnd.api+json
Accept: */*
Content-Length: 656

{
  "data": {
    "type": "text",
    "id": "text",
    "attributes": {
      "description": null,
      "disabled": null,
      "executionMode": null,
      "icon": null,
      "name": null
    },
    "relationships": {
      "agent": {
        "data": [
          null
        ]
      },
      "collection": {
        "data": [
          null
        ]
      },
      "globalvar": {
        "data": [
          null
        ]
      },
      "job": {
        "data": [
          null
        ]
      },
      "module": {
        "data": [
          null
        ]
      },
      "notificationConfiguration": {
        "data": [
          null
        ]
      },
      "policyExemption": {
        "data": [
          null
        ]
      },
      "policySet": {
        "data": [
          null
        ]
      },
      "project": {
        "data": [
          null
        ]
      },
      "provider": {
        "data": [
          null
        ]
      },
      "ssh": {
        "data": [
          null
        ]
      },
      "tag": {
        "data": [
          null
        ]
      },
      "team": {
        "data": [
          null
        ]
      },
      "template": {
        "data": [
          null
        ]
      },
      "vcs": {
        "data": [
          null
        ]
      },
      "workspace": {
        "data": [
          null
        ]
      }
    }
  },
  "included": [
    {
      "type": "text",
      "id": "text",
      "attributes": {},
      "relationships": {}
    }
  ]
}
201

Successful response

{
  "data": {
    "type": "text",
    "id": "text",
    "attributes": {
      "description": null,
      "disabled": null,
      "executionMode": null,
      "icon": null,
      "name": null
    },
    "relationships": {
      "agent": {
        "data": [
          null
        ]
      },
      "collection": {
        "data": [
          null
        ]
      },
      "globalvar": {
        "data": [
          null
        ]
      },
      "job": {
        "data": [
          null
        ]
      },
      "module": {
        "data": [
          null
        ]
      },
      "notificationConfiguration": {
        "data": [
          null
        ]
      },
      "policyExemption": {
        "data": [
          null
        ]
      },
      "policySet": {
        "data": [
          null
        ]
      },
      "project": {
        "data": [
          null
        ]
      },
      "provider": {
        "data": [
          null
        ]
      },
      "ssh": {
        "data": [
          null
        ]
      },
      "tag": {
        "data": [
          null
        ]
      },
      "team": {
        "data": [
          null
        ]
      },
      "template": {
        "data": [
          null
        ]
      },
      "vcs": {
        "data": [
          null
        ]
      },
      "workspace": {
        "data": [
          null
        ]
      }
    }
  },
  "included": [
    {
      "type": "text",
      "id": "text",
      "attributes": {},
      "relationships": {}
    }
  ]
}
delete

Deletes an instance of type organization

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

organization Identifier

Responses
204

Successful response

No content

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

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

organization Identifier

Body
Responses
204

Successful response

No content

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

{
  "data": {
    "type": "text",
    "id": "text",
    "attributes": {
      "description": null,
      "disabled": null,
      "executionMode": null,
      "icon": null,
      "name": null
    },
    "relationships": {
      "agent": {
        "data": [
          null
        ]
      },
      "collection": {
        "data": [
          null
        ]
      },
      "globalvar": {
        "data": [
          null
        ]
      },
      "job": {
        "data": [
          null
        ]
      },
      "module": {
        "data": [
          null
        ]
      },
      "notificationConfiguration": {
        "data": [
          null
        ]
      },
      "policyExemption": {
        "data": [
          null
        ]
      },
      "policySet": {
        "data": [
          null
        ]
      },
      "project": {
        "data": [
          null
        ]
      },
      "provider": {
        "data": [
          null
        ]
      },
      "ssh": {
        "data": [
          null
        ]
      },
      "tag": {
        "data": [
          null
        ]
      },
      "team": {
        "data": [
          null
        ]
      },
      "template": {
        "data": [
          null
        ]
      },
      "vcs": {
        "data": [
          null
        ]
      },
      "workspace": {
        "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?