Skip to content

Replace a document's tags

PUT
/api/v1/documents/tags
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.

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

Media typeapplication/json

Body of PUT /documents/tags: the document, and the tags it should carry afterwards.

object
tags
required

The complete set of tags, replacing what the document carried. Each is trimmed, blanks dropped and duplicates collapsed; an empty list removes every tag

Array<string>
uri
required

The document’s uri, as GET /documents lists it

string

Example generated

{
"tags": [
"example"
],
"uri": "example"
}

Tags replaced; the body carries the tags now set

Media type*/*

What PUT /documents/tags answers: whether the document was found, and the tags it now carries.

object
status
required

tagged when the tags were replaced, not_found when the caller’s world holds no document at that uri

string
tags
required

The tags the document now carries, cleaned as stored. Empty when not_found

Array<string>
uri
required

The uri the request named, echoed back

string

No document at that URI in the caller’s world: the same shape, with status not_found and no tags

Media type*/*

What PUT /documents/tags answers: whether the document was found, and the tags it now carries.

object
status
required

tagged when the tags were replaced, not_found when the caller’s world holds no document at that uri

string
tags
required

The tags the document now carries, cleaned as stored. Empty when not_found

Array<string>
uri
required

The uri the request named, echoed back

string