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

Query parameters
sortanyoptional

Sorts the collection on the selected attributes. A prefix of '-' sorts descending

fields[organization]anyoptional

Selects the set of organization fields that should be returned in the result.

includeanyoptional

Selects the set of relationships that should be expanded as a compound document in the result.

filter[organization]anyoptional

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

filteranyoptional

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

page[number]anyoptional

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

page[size]anyoptional

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

page[offset]anyoptional

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

page[limit]anyoptional

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

page[totals]anyoptional

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

Responses
curl -L \
  --url '/organization'
{
  "data": [],
  "included": [
    {
      "attributes": {},
      "id": "text",
      "relationships": {},
      "type": "text"
    }
  ]
}
post

Creates an item of type organization

Body
dataobjectoptional

Responses
curl -L \
  --request POST \
  --url '/organization' \
  --header 'Content-Type: application/vnd.api+json' \
  --data '{
    "data": {
      "type": "text",
      "id": "text",
      "attributes": {
        "description": "text",
        "name": "text"
      },
      "relationships": {
        "job": {
          "id": "text",
          "type": "job"
        },
        "module": {
          "id": "text",
          "type": "module"
        },
        "provider": {
          "id": "text",
          "type": "provider"
        },
        "team": {
          "id": "text",
          "type": "team"
        },
        "template": {
          "id": "text",
          "type": "template"
        },
        "vcs": {
          "id": "text",
          "type": "vcs"
        },
        "workspace": {
          "id": "text",
          "type": "workspace"
        }
      }
    }
  }'
{
  "data": {
    "type": "text",
    "id": "text",
    "attributes": {
      "description": "text",
      "name": "text"
    },
    "relationships": {
      "job": {
        "id": "text",
        "type": "job"
      },
      "module": {
        "id": "text",
        "type": "module"
      },
      "provider": {
        "id": "text",
        "type": "provider"
      },
      "team": {
        "id": "text",
        "type": "team"
      },
      "template": {
        "id": "text",
        "type": "template"
      },
      "vcs": {
        "id": "text",
        "type": "vcs"
      },
      "workspace": {
        "id": "text",
        "type": "workspace"
      }
    }
  }
}
delete

Deletes an instance of type organization

Path parameters
organizationIdanyrequired

organization Identifier

Responses
curl -L \
  --request DELETE \
  --url '/organization/{organizationId}'

No body

patch

Modifies an instance of type organization

Path parameters
organizationIdanyrequired

organization Identifier

Body
dataobjectoptional

Responses
curl -L \
  --request PATCH \
  --url '/organization/{organizationId}' \
  --header 'Content-Type: application/vnd.api+json' \
  --data '{
    "data": {
      "type": "text",
      "id": "text",
      "attributes": {
        "description": "text",
        "name": "text"
      },
      "relationships": {
        "job": {
          "id": "text",
          "type": "job"
        },
        "module": {
          "id": "text",
          "type": "module"
        },
        "provider": {
          "id": "text",
          "type": "provider"
        },
        "team": {
          "id": "text",
          "type": "team"
        },
        "template": {
          "id": "text",
          "type": "template"
        },
        "vcs": {
          "id": "text",
          "type": "vcs"
        },
        "workspace": {
          "id": "text",
          "type": "workspace"
        }
      }
    }
  }'

No body

For a complete list of organization operation please visit the OpenAPI specification

Last updated

Was this helpful?