Agents

List Agents

get
Query parameters
querystringOptional

the query to filter agents by, e.g. name:agent-1

selectorstringOptional

the selector to filter agents by, e.g. configuration=my-config

offsetstringOptional

the pagination offset

limitstringOptional

the maximum number of results to return

sortstringOptional

the field on which to sort results. A '-' prefix indicates descending sorting.

Responses
200

OK

application/json
get
GET /v1/agents HTTP/1.1
Host: 
Accept: */*
{
  "agents": [
    {
      "arch": "text",
      "available_components_hash": "text",
      "configuration": null,
      "configurationStatus": {
        "assigned": "text",
        "current": "text",
        "dirty": true,
        "future": "text",
        "pending": "text",
        "pendingSetAt": "text"
      },
      "connectedAt": "text",
      "disconnectedAt": "text",
      "errorMessage": "text",
      "features": 1,
      "fleet": "text",
      "fleetStatus": 0,
      "hostname": "text",
      "id": "text",
      "labels": {},
      "labels_bootstrapped": true,
      "macAddress": "text",
      "name": "text",
      "operatingSystem": "text",
      "outOfDate": true,
      "pendingLabels": {},
      "platform": "text",
      "protocol": "text",
      "remoteAddress": "text",
      "reported_at": "text",
      "state": null,
      "status": 0,
      "type": "text",
      "upgrade": {
        "allPackagesHash": [
          1
        ],
        "error": "text",
        "status": 0,
        "version": "text"
      },
      "version": "text"
    }
  ]
}

Delete agents by ids

delete
Body
idsstring[]Optional
Responses
200

OK

application/json
delete
DELETE /v1/agents HTTP/1.1
Host: 
Content-Type: application/json
Accept: */*
Content-Length: 16

{
  "ids": [
    "text"
  ]
}
{
  "agents": [
    "text"
  ]
}

Bulk apply labels to agents

patch
Body

Body of the request to update labels for multiple agents

idsstring[]Optional

IDs is the list of agent IDs to update

Example: ["agent1","agent2"]
overwritebooleanOptional

Overwrite is true if the labels should be overwritten. Must be true if modifying a pre-existing label value.

querystringOptional

Query is a query string to find agents to update, e.g. "env:production". A query can match fields or labels on the agent.

Example: env:production
selectorstringOptional

Selector is the selector to find agents to update, e.g. "env=production". A selector matches labels on the agent and supports "!", "=", "==", "in", "!=", "notin", and "exists" operators.

Example: env=production
Responses
200

OK

application/json
patch
PATCH /v1/agents/labels HTTP/1.1
Host: 
Content-Type: application/json
Accept: */*
Content-Length: 158

{
  "ids": [
    "agent1",
    "agent2"
  ],
  "labels": {
    "env": "production",
    "region": "us-west-1",
    "team": ""
  },
  "overwrite": true,
  "query": "env:production",
  "selector": "env=production"
}
{
  "count": 1,
  "errors": [
    "text"
  ]
}

Update multiple agents

patch
Body
idsstring[]Optional
versionstringOptional
Responses
204

Upgrade request processed, no content

No content

patch
PATCH /v1/agents/version HTTP/1.1
Host: 
Content-Type: application/json
Accept: */*
Content-Length: 33

{
  "ids": [
    "text"
  ],
  "version": "text"
}

No content

Get agent by id

get
Path parameters
idstringRequired

the id of the agent

Responses
200

OK

application/json
get
GET /v1/agents/{id} HTTP/1.1
Host: 
Accept: */*
{
  "agent": {
    "arch": "text",
    "available_components_hash": "text",
    "configuration": null,
    "configurationStatus": {
      "assigned": "text",
      "current": "text",
      "dirty": true,
      "future": "text",
      "pending": "text",
      "pendingSetAt": "text"
    },
    "connectedAt": "text",
    "disconnectedAt": "text",
    "errorMessage": "text",
    "features": 1,
    "fleet": "text",
    "fleetStatus": 0,
    "hostname": "text",
    "id": "text",
    "labels": {},
    "labels_bootstrapped": true,
    "macAddress": "text",
    "name": "text",
    "operatingSystem": "text",
    "outOfDate": true,
    "pendingLabels": {},
    "platform": "text",
    "protocol": "text",
    "remoteAddress": "text",
    "reported_at": "text",
    "state": null,
    "status": 0,
    "type": "text",
    "upgrade": {
      "allPackagesHash": [
        1
      ],
      "error": "text",
      "status": 0,
      "version": "text"
    },
    "version": "text"
  }
}

Get configuration for a given agent

get
Path parameters
idstringRequired

the id of the agent

Responses
200

OK

application/json
get
GET /v1/agents/{id}/configuration HTTP/1.1
Host: 
Accept: */*
{
  "configuration": {
    "apiVersion": "string",
    "kind": "string",
    "metadata": {
      "additionalInfo": {
        "documentation": [
          {
            "text": "text",
            "url": "text"
          }
        ],
        "message": "string"
      },
      "dateModified": "text",
      "deprecated": true,
      "description": "string",
      "displayName": "string",
      "hash": "text",
      "icon": "string",
      "id": "string",
      "labels": {},
      "name": "string",
      "resourceDocLink": "string",
      "stability": "string",
      "version": 1,
      "warning": "string"
    },
    "spec": {
      "connectors": [
        {
          "description": "text",
          "disabled": true,
          "displayName": "text",
          "id": "text",
          "licenseEnabled": true,
          "name": "text",
          "parameters": [
            {
              "credential": true,
              "name": "text",
              "sensitive": true,
              "value": null
            }
          ],
          "processors": "[Circular Reference]",
          "public": true,
          "recommendation": "text",
          "routes": {
            "logs": [
              {
                "components": [
                  "text"
                ],
                "id": "text"
              }
            ],
            "logs+metrics": [
              {
                "components": [
                  "text"
                ],
                "id": "text"
              }
            ],
            "logs+metrics+traces": [
              {
                "components": [
                  "text"
                ],
                "id": "text"
              }
            ],
            "logs+traces": [
              {
                "components": [
                  "text"
                ],
                "id": "text"
              }
            ],
            "metrics": [
              {
                "components": [
                  "text"
                ],
                "id": "text"
              }
            ],
            "metrics+traces": [
              {
                "components": [
                  "text"
                ],
                "id": "text"
              }
            ],
            "traces": [
              {
                "components": [
                  "text"
                ],
                "id": "text"
              }
            ]
          },
          "secOpsPipelineName": "text",
          "type": "text",
          "version": "text"
        }
      ],
      "contentType": "text",
      "destinations": [
        {
          "description": "text",
          "disabled": true,
          "displayName": "text",
          "id": "text",
          "licenseEnabled": true,
          "name": "text",
          "parameters": [
            {
              "credential": true,
              "name": "text",
              "sensitive": true,
              "value": null
            }
          ],
          "processors": "[Circular Reference]",
          "public": true,
          "recommendation": "text",
          "routes": {
            "logs": [
              {
                "components": [
                  "text"
                ],
                "id": "text"
              }
            ],
            "logs+metrics": [
              {
                "components": [
                  "text"
                ],
                "id": "text"
              }
            ],
            "logs+metrics+traces": [
              {
                "components": [
                  "text"
                ],
                "id": "text"
              }
            ],
            "logs+traces": [
              {
                "components": [
                  "text"
                ],
                "id": "text"
              }
            ],
            "metrics": [
              {
                "components": [
                  "text"
                ],
                "id": "text"
              }
            ],
            "metrics+traces": [
              {
                "components": [
                  "text"
                ],
                "id": "text"
              }
            ],
            "traces": [
              {
                "components": [
                  "text"
                ],
                "id": "text"
              }
            ]
          },
          "secOpsPipelineName": "text",
          "type": "text",
          "version": "text"
        }
      ],
      "disableLegacyEnvVarNormalization": true,
      "extensions": [
        {
          "description": "text",
          "disabled": true,
          "displayName": "text",
          "id": "text",
          "licenseEnabled": true,
          "name": "text",
          "parameters": [
            {
              "credential": true,
              "name": "text",
              "sensitive": true,
              "value": null
            }
          ],
          "processors": "[Circular Reference]",
          "public": true,
          "recommendation": "text",
          "routes": {
            "logs": [
              {
                "components": [
                  "text"
                ],
                "id": "text"
              }
            ],
            "logs+metrics": [
              {
                "components": [
                  "text"
                ],
                "id": "text"
              }
            ],
            "logs+metrics+traces": [
              {
                "components": [
                  "text"
                ],
                "id": "text"
              }
            ],
            "logs+traces": [
              {
                "components": [
                  "text"
                ],
                "id": "text"
              }
            ],
            "metrics": [
              {
                "components": [
                  "text"
                ],
                "id": "text"
              }
            ],
            "metrics+traces": [
              {
                "components": [
                  "text"
                ],
                "id": "text"
              }
            ],
            "traces": [
              {
                "components": [
                  "text"
                ],
                "id": "text"
              }
            ]
          },
          "secOpsPipelineName": "text",
          "type": "text",
          "version": "text"
        }
      ],
      "measurementInterval": "text",
      "parameters": [
        {
          "credential": true,
          "name": "text",
          "sensitive": true,
          "value": null
        }
      ],
      "processors": [
        {
          "description": "text",
          "disabled": true,
          "displayName": "text",
          "id": "text",
          "licenseEnabled": true,
          "name": "text",
          "parameters": [
            {
              "credential": true,
              "name": "text",
              "sensitive": true,
              "value": null
            }
          ],
          "processors": "[Circular Reference]",
          "public": true,
          "recommendation": "text",
          "routes": {
            "logs": [
              {
                "components": [
                  "text"
                ],
                "id": "text"
              }
            ],
            "logs+metrics": [
              {
                "components": [
                  "text"
                ],
                "id": "text"
              }
            ],
            "logs+metrics+traces": [
              {
                "components": [
                  "text"
                ],
                "id": "text"
              }
            ],
            "logs+traces": [
              {
                "components": [
                  "text"
                ],
                "id": "text"
              }
            ],
            "metrics": [
              {
                "components": [
                  "text"
                ],
                "id": "text"
              }
            ],
            "metrics+traces": [
              {
                "components": [
                  "text"
                ],
                "id": "text"
              }
            ],
            "traces": [
              {
                "components": [
                  "text"
                ],
                "id": "text"
              }
            ]
          },
          "secOpsPipelineName": "text",
          "type": "text",
          "version": "text"
        }
      ],
      "raw": "text",
      "rollout": {
        "description": "text",
        "disabled": true,
        "displayName": "text",
        "id": "text",
        "licenseEnabled": true,
        "name": "text",
        "parameters": [
          {
            "credential": true,
            "name": "text",
            "sensitive": true,
            "value": null
          }
        ],
        "processors": [
          "[Circular Reference]"
        ],
        "public": true,
        "recommendation": "text",
        "routes": {
          "logs": [
            {
              "components": [
                "text"
              ],
              "id": "text"
            }
          ],
          "logs+metrics": [
            {
              "components": [
                "text"
              ],
              "id": "text"
            }
          ],
          "logs+metrics+traces": [
            {
              "components": [
                "text"
              ],
              "id": "text"
            }
          ],
          "logs+traces": [
            {
              "components": [
                "text"
              ],
              "id": "text"
            }
          ],
          "metrics": [
            {
              "components": [
                "text"
              ],
              "id": "text"
            }
          ],
          "metrics+traces": [
            {
              "components": [
                "text"
              ],
              "id": "text"
            }
          ],
          "traces": [
            {
              "components": [
                "text"
              ],
              "id": "text"
            }
          ]
        },
        "secOpsPipelineName": "text",
        "type": "text",
        "version": "text"
      },
      "selector": {
        "matchLabels": {
          "ANY_ADDITIONAL_PROPERTY": "text"
        }
      },
      "sources": [
        {
          "description": "text",
          "disabled": true,
          "displayName": "text",
          "id": "text",
          "licenseEnabled": true,
          "name": "text",
          "parameters": [
            {
              "credential": true,
              "name": "text",
              "sensitive": true,
              "value": null
            }
          ],
          "processors": "[Circular Reference]",
          "public": true,
          "recommendation": "text",
          "routes": {
            "logs": [
              {
                "components": [
                  "text"
                ],
                "id": "text"
              }
            ],
            "logs+metrics": [
              {
                "components": [
                  "text"
                ],
                "id": "text"
              }
            ],
            "logs+metrics+traces": [
              {
                "components": [
                  "text"
                ],
                "id": "text"
              }
            ],
            "logs+traces": [
              {
                "components": [
                  "text"
                ],
                "id": "text"
              }
            ],
            "metrics": [
              {
                "components": [
                  "text"
                ],
                "id": "text"
              }
            ],
            "metrics+traces": [
              {
                "components": [
                  "text"
                ],
                "id": "text"
              }
            ],
            "traces": [
              {
                "components": [
                  "text"
                ],
                "id": "text"
              }
            ]
          },
          "secOpsPipelineName": "text",
          "type": "text",
          "version": "text"
        }
      ],
      "topologyInterval": "text"
    },
    "status": {
      "current": true,
      "currentVersion": -2,
      "latest": true,
      "pending": true,
      "pendingVersion": -2,
      "rollout": {
        "name": "text",
        "options": {
          "maxErrors": 1,
          "phaseAgentCount": {
            "initial": 1,
            "maximum": 1,
            "multiplier": 1
          }
        },
        "phase": 1,
        "progress": {
          "completed": 1,
          "errors": 1,
          "incompatible": 1,
          "pending": 1,
          "waiting": 1
        },
        "stage": 1,
        "stages": [
          {
            "labels": {},
            "name": "text",
            "progress": {
              "completed": 1,
              "errors": 1,
              "incompatible": 1,
              "pending": 1,
              "waiting": 1
            }
          }
        ],
        "startedAt": "text",
        "status": 0
      }
    }
  },
  "raw": "text"
}

Disconnect an agent by id

post
Path parameters
idstringRequired

the id of the agent

Responses
204

Disconnect request processed, no content

No content

post
POST /v1/agents/{id}/disconnect HTTP/1.1
Host: 
Accept: */*

No content

Get agent labels by agent id

get
Path parameters
idstringRequired

the id of the agent

Responses
200

OK

application/json
get
GET /v1/agents/{id}/labels HTTP/1.1
Host: 
Accept: */*
{
  "errors": [
    "text"
  ],
  "labels": {}
}

Patch agent labels by agent id

patch
Path parameters
idstringRequired

the id of the agent

Query parameters
overwritestringOptional

if true, overwrite any existing labels with the same names

Body
Responses
200

OK

application/json
patch
PATCH /v1/agents/{id}/labels HTTP/1.1
Host: 
Content-Type: application/json
Accept: */*
Content-Length: 62

{
  "labels": {
    "env": "production",
    "region": "us-west-1",
    "team": ""
  }
}
{
  "errors": [
    "text"
  ],
  "labels": {}
}

Upgrade agent

post
Path parameters
idstringRequired

the id of the agent

Body
versionstringOptional
Responses
204

Upgrade request processed, no content

No content

post
POST /v1/agents/{id}/version HTTP/1.1
Host: 
Content-Type: application/json
Accept: */*
Content-Length: 18

{
  "version": "text"
}

No content

Was this helpful?