Update a value list
Update a value list using the list id
. The original list is replaced, and all unspecified fields are deleted.
You cannot modify the id
value.
Body Required
Value list's properties
-
_version string
The version id, normally returned by the API when the document is retrieved. Use it ensure updates are done against the latest version.
-
Describes the value list.
Minimum length is
1
. -
Value list's identifier.
Minimum length is
1
. -
meta object
Placeholder for metadata about the value list.
Additional properties are allowed.
-
Value list's name.
Minimum length is
1
. -
version integer
The document version number.
Minimum value is
1
.
PUT
/api/lists
curl \
--request PUT https://localhost:5601/api/lists \
--header "Content-Type: application/json" \
--data '{"id":"ip_list","name":"Bad ips - updated","description":"Latest list of bad ips"}'
Request example
{
"id": "ip_list",
"name": "Bad ips - updated",
"description": "Latest list of bad ips"
}
Response examples (200)
{
"id": "ip_list",
"name": "Bad ips - updated",
"type": "ip",
"version": 3,
"_version": "WzIsMV0=",
"immutable": false,
"@timestamp": "2025-01-08T04:47:34.273Z",
"created_at": "2025-01-08T04:47:34.273Z",
"created_by": "elastic",
"updated_at": "2025-01-08T05:39:39.292Z",
"updated_by": "elastic",
"description": "Latest list of bad ips",
"tie_breaker_id": "f5508188-b1e9-4e6e-9662-d039a7d89899"
}
Response examples (400)
{
"error": "Bad Request",
"message": "[request body]: id: Expected string, received number",
"statusCode": 400
}
Response examples (401)
{
"error": "Unauthorized",
"message": "[security_exception\\n\\tRoot causes:\\n\\t\\tsecurity_exception: unable to authenticate user [elastic] for REST request [/_security/_authenticate]]: unable to authenticate user [elastic] for REST request [/_security/_authenticate]",
"statusCode": 401
}
Response examples (403)
{
"error": "Forbidden",
"message": "API [PUT /api/lists] is unauthorized for user, this action is granted by the Kibana privileges [lists-all]",
"statusCode": 403
}
Response examples (404)
{
"message": "list id: \\\"foo\\\" not found",
"status_code": 404
}
Response examples (500)
{
"message": "Internal Server Error",
"status_code": 500
}