Save the extraction template overlay
PUT
/v1/extraction-templates
const url = 'http://localhost:8080/v1/extraction-templates';const options = { method: 'PUT', headers: {'Content-Type': 'application/json'}, body: '{"overlay":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PUT \ --url http://localhost:8080/v1/extraction-templates \ --header 'Content-Type: application/json' \ --data '{ "overlay": "example" }'Validates the whole overlay; known rule types, labels where required, page/box/anchor on region rules, (?<v>…) capture and compilable regexes on sentence rules; and stores it in extraction.templates; the pipeline applies it from the next stage on. 400 with one field error per problem. Administrators only.
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
Body of PUT /v1/extraction-templates: the whole overlay, validated before it is stored.
object
overlay
Examplegenerated
{ "overlay": "example"}Responses
Section titled “Responses”OK
Media typeapplication/json
The template studio’s read view: the saved overlay (empty object when none) and what the engine already knows built-in.
object
overlay
required
builtInDocTypes
required
Array<string>
Examplegenerated
{ "overlay": "example", "builtInDocTypes": [ "example" ]}