Agents

Agents

Agents from a project.

GEThttps://cloud-api.calyptia.com/v1/projects/{projectID}/agents
Authorization
Path parameters
projectID*string (uuid)
Query parameters
Response

OK

Headers
Body
id*string (uuid)
fleetID*nullable string (uuid)
token*string
Example: "redacted"
name*string (hostname)
Example: "my-agent"
machineID*string
type*enum
fluentbitfluentd
version*string
Example: "v1.8.6"
edition*enum
communityenterprise
status*enum
healthyunhealthy
os*enum
unknownlinuxmacoswindowsfreebsdnetbsdopenbsd
arch*enum
unknownx86x86_64armarm64
flags*nullable array of string
tagsnullable array of string
rawConfig*string
metadata*nullable object
firstMetricsAddedAt*nullable string (date-time)
lastMetricsAddedAt*nullable string (date-time)
metricsCount*integer
createdAt*string (date-time)
updatedAt*string (date-time)
environmentName*string
Example: "default"
Request
const response = await fetch('https://cloud-api.calyptia.com/v1/projects/{projectID}/agents', {
    method: 'GET',
    headers: {
      "Authorization": "Bearer <token>"
    },
});
const data = await response.json();
Response
[
  {
    "id": "123e4567-e89b-12d3-a456-426614174000",
    "fleetID": "123e4567-e89b-12d3-a456-426614174000",
    "token": "redacted",
    "name": "my-agent",
    "machineID": "text",
    "type": "fluentbit",
    "version": "v1.8.6",
    "edition": "community",
    "status": "healthy",
    "os": "unknown",
    "arch": "unknown",
    "flags": [
      "text"
    ],
    "tags": [
      "text"
    ],
    "rawConfig": "text",
    "firstMetricsAddedAt": "2024-10-16T08:50:06.509Z",
    "lastMetricsAddedAt": "2024-10-16T08:50:06.509Z",
    "createdAt": "2024-10-16T08:50:06.509Z",
    "updatedAt": "2024-10-16T08:50:06.509Z",
    "environmentName": "default"
  }
]

Delete Agents

Delete agents from a project.

DELETEhttps://cloud-api.calyptia.com/v1/projects/{projectID}/agents
Authorization
Path parameters
projectID*string (uuid)
Query parameters
Response

Deleted

Request
const response = await fetch('https://cloud-api.calyptia.com/v1/projects/{projectID}/agents', {
    method: 'DELETE',
    headers: {
      "Authorization": "Bearer <token>"
    },
});
const data = await response.json();