Migrate multiple agents

View as Markdown
POST /api/fleet/agents/bulk_migrate

Spaces method and path for this operation:

post /s/{space_id}/api/fleet/agents/bulk_migrate

Refer to Spaces for more information.

Bulk migrate agents to another cluster.

[Required authorization] Route required privileges: fleet-agents-all.

Headers

  • kbn-xsrf string Required

    A required header to protect against CSRF attacks

application/json

Body

  • agents array[string] | string Required

  • batchSize number
  • enrollment_token string Required
  • settings object

    Additional properties are NOT allowed.

    Hide settings attributes Show settings attributes object
    • ca_sha256 string
    • certificate_authorities string
    • elastic_agent_cert string
    • elastic_agent_cert_key string
    • elastic_agent_cert_key_passphrase string
    • headers object
      Hide headers attribute Show headers attribute object
      • * string Additional properties
    • insecure boolean
    • proxy_disabled boolean
    • proxy_headers object
      Hide proxy_headers attribute Show proxy_headers attribute object
      • * string Additional properties
    • proxy_url string
    • staging string
    • tags array[string]
  • uri string(uri) Required

Responses

  • 200 application/json

    OK: A successful request.

    Hide response attribute Show response attribute object
    • actionId string Required
  • 400 application/json

    A bad request.

    Hide response attributes Show response attributes object
    • error string
    • errorType string
    • message string Required
    • statusCode number
POST /api/fleet/agents/bulk_migrate
curl \ --request POST 'https://localhost:5601/api/fleet/agents/bulk_migrate' \ --header "Authorization: $API_KEY" \ --header "Content-Type: application/json" \ --header "kbn-xsrf: true" \ --data '{"agents":["string"],"batchSize":42.0,"enrollment_token":"string","settings":{"ca_sha256":"string","certificate_authorities":"string","elastic_agent_cert":"string","elastic_agent_cert_key":"string","elastic_agent_cert_key_passphrase":"string","headers":{"additionalProperty1":"string","additionalProperty2":"string"},"insecure":true,"proxy_disabled":true,"proxy_headers":{"additionalProperty1":"string","additionalProperty2":"string"},"proxy_url":"string","staging":"string","tags":["string"]},"uri":"https://example.com"}'