GET /api/fleet/uninstall_tokens

Spaces method and path for this operation:

get /s/{space_id}/api/fleet/uninstall_tokens

Refer to Spaces for more information.

List the metadata for the latest uninstall tokens per agent policy.

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

Query parameters

  • policyId string

    Partial match filtering for policy IDs

    Maximum length is 50.

  • perPage number

    The number of items to return

    Minimum value is 5.

  • page number

    Minimum value is 1.

Responses

  • 200 application/json

    Successful response

    Hide response attributes Show response attributes object
    • items array[object] Required

      Not more than 10000 elements.

      Hide items attributes Show items attributes object
      • created_at string Required
      • id string Required
      • namespaces array[string]

        Not more than 100 elements.

      • policy_id string Required
      • policy_name string | null
    • page number Required
    • perPage number Required
    • total number Required
  • 400 application/json

    Bad Request

    Hide response attributes Show response attributes object
    • attributes Required
    • error string
    • errorType string
    • message string Required
    • statusCode number
GET /api/fleet/uninstall_tokens
curl \
 --request GET 'https://localhost:5601/api/fleet/uninstall_tokens' \
 --header "Authorization: $API_KEY"
Response examples (200)
List of uninstall token metadata for agent policies
{
  "items": [
    {
      "created_at": "2024-01-01T00:00:00.000Z",
      "id": "token-id-1",
      "namespaces": [
        "default"
      ],
      "policy_id": "policy-id-1",
      "policy_name": "Default policy"
    },
    {
      "created_at": "2024-01-02T00:00:00.000Z",
      "id": "token-id-2",
      "namespaces": [
        "production"
      ],
      "policy_id": "policy-id-2",
      "policy_name": "Production policy"
    }
  ],
  "page": 1,
  "perPage": 20,
  "total": 2
}
Response examples (400)
Both policyId and search query parameters were provided
{
  "error": "Bad Request",
  "message": "Query parameters `policyId` and `search` cannot be used at the same time.",
  "statusCode": 400
}