Update list item
editUpdate list item
editUpdates an existing list item.
You can use PUT
or PATCH
methods to update list items, where:
-
PUT
replaces the original items and deletes fields that are not specified. -
PATCH
updates the specified fields.
Request body
editA JSON object with:
-
The
id
of the list item you want to update. - The fields you want to modify.
If you call PUT
to update a rule, all unspecified fields are
deleted. You cannot modify the list_id
and id
fields.
For PATCH
calls, any of the fields can be modified, whereas for PUT
calls,
some fields are required.
Name | Type | Description | Required (PUT calls) |
---|---|---|---|
|
Object |
Placeholder for metadata about the list item. |
No |
|
String |
The value used to evaluate exceptions. For information on how list item exceptions are evaluated, see Create exception item. |
Yes |
|
String |
Base-64 encoded value of |
No |
Example request
editUpdates the value
field:
PATCH api/lists/items { "id": "internal-ip-1", "value": "10.0.0.17", "_version": "WzEsMV0=" }
Response code
edit-
200
- Indicates a successful call.
Response payload
editThe updated object, including the time it was updated.
Example response:
{ "_version": "WzIsMV0=", "created_at": "2020-08-11T10:54:46.080Z", "created_by": "elastic", "id": "internal-ip-1", "list_id": "internal-ip-excludes", "tie_breaker_id": "ed3f9d84-cd85-4122-b93d-07d1de4fd8bb", "type": "ip", "updated_at": "2020-08-11T11:00:12.202Z", "updated_by": "elastic", "value": "10.0.0.17" }