Create enrollment API key Deprecated

View as Markdown
POST /api/fleet/enrollment-api-keys

Spaces method and path for this operation:

post /s/{space_id}/api/fleet/enrollment-api-keys

Refer to Spaces for more information.

Headers

  • kbn-xsrf string Required

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

Responses

  • 200 application/json

    OK

    Hide response attributes Show response attributes object
    • action string

      Value is created.

    • item object
      Hide item attributes Show item attributes object
      • active boolean Required

        When false, the enrollment API key is revoked and cannot be used for enrolling Elastic Agents.

      • api_key string Required

        The enrollment API key (token) used for enrolling Elastic Agents.

      • api_key_id string Required

        The ID of the API key in the Security API.

      • created_at string Required
      • id string Required
      • name string

        The name of the enrollment API key.

      • policy_id string

        The ID of the agent policy the Elastic Agent will be enrolled in.

  • 400 application/json

    Generic Error

    Hide response attributes Show response attributes object
    • error string
    • message string
    • statusCode number
POST /api/fleet/enrollment-api-keys
curl \
 --request POST 'https://localhost:5601/api/fleet/enrollment-api-keys' \
 --header "Authorization: $API_KEY" \
 --header "kbn-xsrf: string"