Spaces method and path for this operation:
post /s/{space_id}/api/fleet/package_policies/_bulk_get
Refer to Spaces for more information.
Get multiple package policies by ID.
POST
/api/fleet/package_policies/_bulk_get
curl \
--request POST 'https://localhost:5601/api/fleet/package_policies/_bulk_get' \
--header "Authorization: $API_KEY" \
--header "Content-Type: application/json" \
--header "kbn-xsrf: true" \
--data '{"ids":["package-policy-id-1","package-policy-id-2"]}'
Request example
Retrieve multiple package policies by ID
{
"ids": [
"package-policy-id-1",
"package-policy-id-2"
]
}
Response examples (200)
The requested package policies
{
"items": [
{
"created_at": "2024-01-15T10:00:00.000Z",
"enabled": true,
"id": "package-policy-id-1",
"inputs": [],
"name": "nginx-1",
"namespace": "default",
"package": {
"name": "nginx",
"title": "Nginx",
"version": "1.20.0"
},
"policy_ids": [
"agent-policy-id-1"
],
"updated_at": "2024-01-15T10:00:00.000Z"
}
]
}
Response examples (400)
Example of a generic error response
{
"error": "Bad Request",
"message": "An error message describing what went wrong",
"statusCode": 400
}
Response examples (404)
One or more package policies were not found
{
"error": "Not Found",
"message": "Package policy package-policy-id-2 not found",
"statusCode": 404
}