Update agent by ID

PUT /api/fleet/agents/{agentId}

Headers

  • kbn-xsrf string Required

    Kibana's anti Cross-Site Request Forgery token. Can be any string value.

application/json; Elastic-Api-Version=2023-10-31

Body Required

Responses

PUT /api/fleet/agents/{agentId}
curl \
 -X PUT http://localhost:5601/api/fleet/agents/{agentId} \
 -H "Content-Type: application/json; Elastic-Api-Version=2023-10-31" \
 -H "kbn-xsrf: string"
Request examples
# Headers
kbn-xsrf: string

# Payload
{
  "tags": [
    "string"
  ],
  "user_provided_metadata": {}
}
Response examples (200)
{
  "item": {
    "access_api_key": "string",
    "access_api_key_id": "string",
    "active": true,
    "components": [
      {
        "id": "string",
        "message": "string",
        "status": "starting",
        "type": "string",
        "units": [
          {
            "id": "string",
            "message": "string",
            "payload": {},
            "status": "starting",
            "type": "input"
          }
        ]
      }
    ],
    "default_api_key": "string",
    "default_api_key_id": "string",
    "enrolled_at": "string",
    "id": "string",
    "last_checkin": "string",
    "local_metadata": {},
    "metrics": {
      "cpu_avg": 42.0,
      "memory_size_byte_avg": 42.0
    },
    "policy_id": "string",
    "policy_revision": 42.0,
    "status": "offline",
    "type": "PERMANENT",
    "unenrolled_at": "string",
    "unenrollment_started_at": "string",
    "user_provided_metadata": {}
  }
}
Response examples (400)
{
  "error": "string",
  "message": "string",
  "statusCode": 42.0
}