SSH Key
This endpoint is used to create, update, search or delete ssh keys.
To use this endpoint you should have "manageVcs" access at team level and a Terrakube Organization
Entity fields:
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
Returns the relationship ssh
organization Identifier
Filters the collection of ssh using a 'disjoint' RSQL expression
Number of pages to return. Can be used with page[size]
Number of elements per page. Can be used with page[number]
Offset from 0 to start paginating. Can be used with page[limit]
Maximum number of items to return. Can be used with page[offset]
For requesting total pages/records be included in the response page meta data
GET /api/v1/organization/{organizationId}/ssh HTTP/1.1
Host:
Accept: */*
Successful response
{
"data": [],
"included": [
{
"attributes": {},
"id": "text",
"relationships": {},
"type": "text"
}
]
}
Creates an item of type ssh and adds it to ssh
organization Identifier
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"
}
}
}
}
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"
}
}
}
}
Deletes an instance of type ssh
organization Identifier
ssh Identifier
DELETE /api/v1/organization/{organizationId}/ssh/{sshId} HTTP/1.1
Host:
Accept: */*
Successful response
No content
Modifies an instance of type ssh
organization Identifier
ssh Identifier
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"
}
}
}
}
Successful response
No content
Last updated
Was this helpful?