Replace a document's tags
const url = 'http://localhost:11044/api/v1/documents/tags';const options = { method: 'PUT', headers: {'X-Embabel-Api-Key': '<X-Embabel-Api-Key>', 'Content-Type': 'application/json'}, body: '{"tags":["example"],"uri":"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:11044/api/v1/documents/tags \ --header 'Content-Type: application/json' \ --header 'X-Embabel-Api-Key: <X-Embabel-Api-Key>' \ --data '{ "tags": [ "example" ], "uri": "example" }'Set the tags on an ingested document and every chunk of it, without re-ingesting. The list replaces what was there; blanks are dropped and duplicates collapsed; an empty list removes all tags.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”The document, by the uri GET /api/v1/documents lists it under in the caller’s world, and the complete tag list it should carry. The list replaces the existing tags on the document and every chunk; entries are trimmed, blanks dropped and duplicates collapsed, and an empty list removes every tag. Nothing is re-ingested
Body of PUT /documents/tags: the document, and the tags it should carry afterwards.
object
The complete set of tags, replacing what the document carried. Each is trimmed, blanks dropped and duplicates collapsed; an empty list removes every tag
The document’s uri, as GET /documents lists it
Example generated
{ "tags": [ "example" ], "uri": "example"}Responses
Section titled “Responses”Tags replaced; the body carries the tags now set
What PUT /documents/tags answers: whether the document was found, and the tags it now carries.
object
tagged when the tags were replaced, not_found when the caller’s world holds no document at that uri
The tags the document now carries, cleaned as stored. Empty when not_found
The uri the request named, echoed back
No document at that URI in the caller’s world: the same shape, with status not_found and no tags
What PUT /documents/tags answers: whether the document was found, and the tags it now carries.
object
tagged when the tags were replaced, not_found when the caller’s world holds no document at that uri
The tags the document now carries, cleaned as stored. Empty when not_found
The uri the request named, echoed back

