Checks

Core Instance checks

Checks associated to a core instance.

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

OK

Headers
Body
id*string (uuid)
protocol*PipelinePortProtocol (enum)

Valid protocol types defined for a pipelines.

tcpudp
status*CheckStatus (enum)

The status of a check.

newfailedrunningok
retries*number

number of retries for the check before marking it as failed

host*string

DNS label format as of defined on RFC1123 or an IPv4 address.

Example: "localhost"
port*number
createdAt*string (date-time)
updatedAt*string (date-time)
Request
const response = await fetch('https://cloud-api.calyptia.com/v1/core_instances/{coreInstanceID}/checks', {
    method: 'GET',
    headers: {
      "Authorization": "Bearer <token>"
    },
});
const data = await response.json();
Response
[
  {
    "id": "123e4567-e89b-12d3-a456-426614174000",
    "protocol": "tcp",
    "status": "new",
    "retries": 0,
    "host": "localhost",
    "port": 0,
    "createdAt": "2024-11-21T09:47:39.395Z",
    "updatedAt": "2024-11-21T09:47:39.395Z"
  }
]

Create core instance check

Create check within a core instance.

POSThttps://cloud-api.calyptia.com/v1/core_instances/{coreInstanceID}/checks
Authorization
Path parameters
coreInstanceID*string (uuid)
Body
protocol*PipelinePortProtocol (enum)

Valid protocol types defined for a pipelines.

tcpudp
statusCheckStatus (enum)

The status of a check.

newfailedrunningok
retriesnumber

number of retries for the check before marking it as failed

host*string

DNS label format as of defined on RFC1123 or an IPv4 address.

Example: "localhost"
port*number

valid 0-65535 port number

Response

Created

Body
id*string (uuid)
createdAt*string (date-time)
Request
const response = await fetch('https://cloud-api.calyptia.com/v1/core_instances/{coreInstanceID}/checks', {
    method: 'POST',
    headers: {
      "Authorization": "Bearer <token>",
      "Content-Type": "application/json"
    },
    body: JSON.stringify({
      "protocol": "tcp",
      "host": "localhost",
      "port": 0
    }),
});
const data = await response.json();
Response
{
  "id": "123e4567-e89b-12d3-a456-426614174000",
  "createdAt": "2024-11-21T09:47:39.395Z"
}