SSH Key

This endpoint is used to create, update, search or delete ssh keys.

Entity fields:

Path
Type
Description

data.type

string

Should be "ssh"

data.attributes.name

string

Unique ssh key name for an Terrakube organization

data.attributes.description

string

Free text for description

data.attributes.privateKey

string

SSH Key content

data.attributes.sshType

string

rsa or ed25519

Example:

{
  "data": {
    "type": "ssh",
    "attributes": {
      "name": "Sample SSH Key",
      "description": "SSH Key Description",
      "privateKey": "{{sshPrivateKey}}",
      "sshType": "{{sshKeyType}}"
    }
  }
}

Supported Operations

get

Returns the relationship ssh

Path parameters
organizationIdanyRequired

organization Identifier

Query parameters
filter[ssh]stringOptional

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

page[number]integerOptional

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

page[size]integerOptional

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

page[offset]integerOptional

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

page[limit]integerOptional

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
GET /api/v1/organization/{organizationId}/ssh HTTP/1.1
Host: 
Accept: */*
200

Successful response

{
  "data": [],
  "included": [
    {
      "attributes": {},
      "id": "text",
      "relationships": {},
      "type": "text"
    }
  ]
}
post

Creates an item of type ssh and adds it to ssh

Path parameters
organizationIdanyRequired

organization Identifier

Body
Responses
201
Successful response
application/vnd.api+json
post
POST /api/v1/organization/{organizationId}/ssh HTTP/1.1
Host: 
Content-Type: application/vnd.api+json
Accept: */*
Content-Length: 311

{
  "data": {
    "type": "text",
    "id": "text",
    "attributes": {
      "createdBy": "text",
      "createdDate": "2025-06-27T08:59:04.189Z",
      "description": "text",
      "name": "text",
      "privateKey": "text",
      "sshType": "rsa",
      "updatedBy": "text",
      "updatedDate": "2025-06-27T08:59:04.189Z"
    },
    "relationships": {
      "organization": {
        "id": "text",
        "type": "organization"
      }
    }
  }
}
201

Successful response

{
  "data": {
    "type": "text",
    "id": "text",
    "attributes": {
      "createdBy": "text",
      "createdDate": "2025-06-27T08:59:04.189Z",
      "description": "text",
      "name": "text",
      "privateKey": "text",
      "sshType": "rsa",
      "updatedBy": "text",
      "updatedDate": "2025-06-27T08:59:04.189Z"
    },
    "relationships": {
      "organization": {
        "id": "text",
        "type": "organization"
      }
    }
  }
}
delete

Deletes an instance of type ssh

Path parameters
organizationIdanyRequired

organization Identifier

sshIdanyRequired

ssh Identifier

Responses
204
Successful response
delete
DELETE /api/v1/organization/{organizationId}/ssh/{sshId} HTTP/1.1
Host: 
Accept: */*
204

Successful response

No content

patch

Modifies an instance of type ssh

Path parameters
organizationIdanyRequired

organization Identifier

sshIdanyRequired

ssh Identifier

Body
Responses
204
Successful response
patch
PATCH /api/v1/organization/{organizationId}/ssh/{sshId} HTTP/1.1
Host: 
Content-Type: application/vnd.api+json
Accept: */*
Content-Length: 311

{
  "data": {
    "type": "text",
    "id": "text",
    "attributes": {
      "createdBy": "text",
      "createdDate": "2025-06-27T08:59:04.189Z",
      "description": "text",
      "name": "text",
      "privateKey": "text",
      "sshType": "rsa",
      "updatedBy": "text",
      "updatedDate": "2025-06-27T08:59:04.189Z"
    },
    "relationships": {
      "organization": {
        "id": "text",
        "type": "organization"
      }
    }
  }
}
204

Successful response

No content

Last updated

Was this helpful?