Edit a value into a new handle
POST /Platform/dtypes/edit
Edit a value into a new handle. The original is untouched.
By dtype:
- pdf/image:
edits, to fill fields fromextract_form_fieldsand/or draw new annotations. - text (markdown/string):
old/new(+anchor/replace_all), as when editing an entity's YAML. - structured (table/event/endpoint/openapi/address):
ops, JSON Pointerreplace/add/remove.
edited_ref is the new, stored value's handle; pass it on with its
<attachment id="..."/> marker.
Body parameters
ref: str. Handle to edit (or, in a chat, the tool_call_id of a result).edits: optional List[Union[FillEdit, DrawEdit]]. Fill/draw edits (pdf/image only). A field itsopdoes not take is refused.old: optional str. Substring to replace (text dtypes).new: optional str. Replacement text.anchor: optional str. Field scope for a non-uniqueold.replace_all: optional bool. Replace every occurrence ofold.ops: optional List[Any]. JSON Pointer ops (structured dtypes).flatten: optional bool. pdf only: bake widgets/annotations into the page content.
Returns
EditResponse
handle: str. The original handle, unchanged.edited_ref: optional str or null. Handle of the new, edited value.applied: optional List[dict]. Edits that were applied.skipped: optional List[dict]. Edits that were skipped, with reasons.engines: optional List[str]. Engines used to apply the edits.
Example request
curl -X POST "https://api.hilus.ai/Platform/dtypes/edit" \
-H "Authorization: Bearer $HILUS_API_KEY" \
-H "Content-Type: application/json" \
-d '{}'