POST /api/fleet/package_policies/delete

Spaces method and path for this operation:

post /s/{space_id}/api/fleet/package_policies/delete

Refer to Spaces for more information.

Delete multiple package policies by ID.

[Required authorization] Route required privileges: fleet-agent-policies-all AND integrations-all.

Headers

  • kbn-xsrf string Required

    A required header to protect against CSRF attacks

application/json

Body

  • force boolean
  • packagePolicyIds array[string] Required

    Not more than 1000 elements.

Responses

  • 200 application/json

    Successful response

    Hide response attributes Show response attributes object
    • body object

      Additional properties are NOT allowed.

      Hide body attribute Show body attribute object
      • message string Required
    • id string Required
    • name string
    • output_id string | null
    • package object Required

      Additional properties are NOT allowed.

      Hide package attributes Show package attributes object
      • experimental_data_stream_features array[object]

        Not more than 100 elements.

        Hide experimental_data_stream_features attributes Show experimental_data_stream_features attributes object
        • data_stream string Required
        • features object Required

          Additional properties are NOT allowed.

          Hide features attributes Show features attributes object
          • doc_value_only_numeric boolean
          • doc_value_only_other boolean
          • synthetic_source boolean
          • tsdb boolean
      • fips_compatible boolean
      • name string Required

        Package name

      • requires_root boolean
      • title string
      • version string Required

        Package version

    • policy_id string | null Deprecated

      Use policy_ids instead

    • policy_ids array[string] Required

      Not more than 10000 elements.

    • statusCode number
    • success boolean Required
  • 400 application/json

    Bad Request

    Hide response attributes Show response attributes object
    • attributes Required
    • error string
    • errorType string
    • message string Required
    • statusCode number
POST /api/fleet/package_policies/delete
curl \
 --request POST 'https://<KIBANA_URL>/api/fleet/package_policies/delete' \
 --header "Authorization: $API_KEY" \
 --header "Content-Type: application/json" \
 --header "kbn-xsrf: true" \
 --data '{"packagePolicyIds":["package-policy-id-1","package-policy-id-2"]}'
Request example
Delete multiple package policies by ID
{
  "packagePolicyIds": [
    "package-policy-id-1",
    "package-policy-id-2"
  ]
}
Response examples (200)
Results of the bulk delete operation
[
  {
    "id": "package-policy-id-1",
    "success": true
  },
  {
    "id": "package-policy-id-2",
    "success": true
  }
]
Response examples (400)
Example of a generic error response
{
  "error": "Bad Request",
  "message": "An error message describing what went wrong",
  "statusCode": 400
}