Security Osquery API
Update a saved query
Spaces method and path for this operation:
<div><span class="operation-verb put">put</span> <span class="operation-path">/s/{space_id}/api/osquery/saved_queries/{id}</span></div>Refer to Spaces for more information.
Update a saved query using the query ID.
info You cannot update a prebuilt saved query.
put/api/osquery/saved_queries/{id}
Path parameters
idstring required
The ID of a saved query.
Example:3c42c847-eb30-4452-80e0-728584042334
The saved query ID.
Request body
Example request
{
"id": "updated_my_saved_query_name"
}Response
Indicates a successful call.
Example response
{
"data": {
"created_at": "2025-02-26T13:37:30.452Z",
"created_by": "elastic",
"description": "Saved query description",
"id": "updated_my_saved_query_name",
"interval": "60",
"query": "select * from uptime;",
"saved_object_id": "42ba1280-2172-11ee-8523-5765fca79a3c",
"updated_at": "2025-02-26T13:40:16.297Z",
"updated_by": "elastic",
"version": "WzQzMTcsMV0="
}
}