Checks

Pipeline checks

Checks associated to a pipeline.

GEThttps://cloud-api.calyptia.com/v1/pipelines/{pipelineID}/checks
Authorization
Path parameters
pipelineID*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

port*number

valid 0-65535 port number

host*string

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

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

Create pipeline check

Create check within a pipeline.

POSThttps://cloud-api.calyptia.com/v1/pipelines/{pipelineID}/checks
Authorization
Path parameters
pipelineID*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/pipelines/{pipelineID}/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-10-16T08:56:27.165Z"
}