Cluster objects

Cluster objects

GEThttps://cloud-api.calyptia.com/v1/core_instances/{coreInstanceID}/cluster_objects
Authorization
Path parameters
coreInstanceID*string (uuid)
Query parameters
Response

OK

Headers
Body
id*string (uuid)
name*string (kubernetes label)
kind*ClusterObjectKind (enum)

Kind of the kubernetes object

namespace
createdAt*string (date-time)
updatedAt*string (date-time)
Request
const response = await fetch('https://cloud-api.calyptia.com/v1/core_instances/{coreInstanceID}/cluster_objects', {
    method: 'GET',
    headers: {
      "Authorization": "Bearer <token>"
    },
});
const data = await response.json();
Response
[
  {
    "id": "123e4567-e89b-12d3-a456-426614174000",
    "name": "text",
    "kind": "namespace",
    "createdAt": "2025-01-15T04:25:45.942Z",
    "updatedAt": "2025-01-15T04:25:45.942Z"
  }
]

Create cluster object

POSThttps://cloud-api.calyptia.com/v1/core_instances/{coreInstanceID}/cluster_objects
Authorization
Path parameters
coreInstanceID*string (uuid)
Body
name*string (kubernetes valid hostname or namespace name. https://kubernetes.io/docs/reference/labels-annotations-taints/ )
kind*ClusterObjectKind (enum)

Kind of the kubernetes object

namespace
Response

Created

Body
id*string (uuid)
createdAt*string (date-time)
Request
const response = await fetch('https://cloud-api.calyptia.com/v1/core_instances/{coreInstanceID}/cluster_objects', {
    method: 'POST',
    headers: {
      "Authorization": "Bearer <token>",
      "Content-Type": "application/json"
    },
    body: JSON.stringify({
      "name": "text",
      "kind": "namespace"
    }),
});
const data = await response.json();
Response
{
  "id": "123e4567-e89b-12d3-a456-426614174000",
  "createdAt": "2025-01-15T04:25:45.942Z"
}