Patch a value list item
Update specific fields of an existing value list item using the item id
.
Body Required
Value list item'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.
-
Value list item's identifier.
Minimum length is
1
. -
meta object
Placeholder for metadata about the value list item.
Additional properties are allowed.
-
refresh string
Determines when changes made by the request are made visible to search.
Values are
true
,false
, orwait_for
. -
value string(nonempty)
The value used to evaluate exceptions.
Minimum length is
1
.
Responses
-
200 application/json
Successful response
-
400 application/json
Invalid input data response
-
401 application/json
Unsuccessful authentication response
-
403 application/json
Not enough privileges response
-
404 application/json
List item not found response
-
500 application/json
Internal server error response
PATCH
/api/lists/items
curl \
--request PATCH https://localhost:5601/api/lists/items \
--header "Content-Type: application/json" \
--data '{"id":"pd1WRJQBs4HAK3VQeHFI","value":"255.255.255.255"}'
Request example
{
"id": "pd1WRJQBs4HAK3VQeHFI",
"value": "255.255.255.255"
}
Response examples (200)
{
"id": "pd1WRJQBs4HAK3VQeHFI",
"type": "ip",
"value": "255.255.255.255",
"list_id": "ip_list",
"_version": "WzE5LDFd",
"@timestamp": "2025-01-08T05:15:05.159Z",
"created_at": "2025-01-08T05:15:05.159Z",
"created_by": "elastic",
"updated_at": "2025-01-08T05:23:37.602Z",
"updated_by": "elastic",
"tie_breaker_id": "eee41dc7-1666-4876-982f-8b0f7b59eca3"
}
Response examples (400)
{
"message": "{\"took\":15,\"timed_out\":false,\"total\":1,\"updated\":0,\"deleted\":0,\"batches\":1,\"version_conflicts\":0,\"noops\":0,\"retries\":{\"bulk\":0,\"search\":0},\"throttled_millis\":0,\"requests_per_second\":-1,\"throttled_until_millis\":0,\"failures\":[{\"index\":\".ds-.items-default-2025.01.09-000001\",\"id\":\"ip_item\",\"cause\":{\"type\":\"document_parsing_exception\",\"reason\":\"[1:107] failed to parse field [ip] of type [ip] in document with id ip_item. Preview of fields value: 2\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"2 is not an IP string literal.\"}},\"status\":400}]}",
"status_code": 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 [PATCH /api/lists/items] is unauthorized for user, this action is granted by the Kibana privileges [lists-all]",
"statusCode": 403
}
Response examples (404)
{
"message": "list item id: \\\"foo\\\" not found",
"status_code": 404
}
Response examples (500)
{
"message": "Internal Server Error",
"status_code": 500
}