Create taxonomy entries
POST/taxonomies/:taxonomy_id/entries
Adds entries to a taxonomy. The request body is a JSON array of entries, each linking a parent field and value to a child field and value. An entry that the taxonomy already holds is skipped, and an entry that another taxonomy holds is added to this taxonomy as well. Foundation4 refuses an entry whose child is its own parent, and an entry that would make a value its own ancestor through other entries of the taxonomy. The response body is the array of entries that were created. Changes take effect in the next search, without reprocessing any document.
Permissions. Write on the taxonomy.
See Metadata, filters and taxonomies.
Request
Responses
- 201
- 400
- 401
- 403
- 404
- 422
The entries were created. The body is the array of created entries, without the entries that the taxonomy already held.
An entry links a field value to itself (Invalid parameter, with A taxonomy entry cannot be its own parent: <field> = <value> in details.error), or an entry would create a cycle (Invalid parameter, with Taxonomy entry <parent> = <value> -> <child> = <value> would create a cycle: ... in details.error). No entry of the request is added. The same status reports a body that is not valid JSON.
The authentication headers are missing or invalid, or the API key is inactive or expired. Errors lists the messages.
The license does not allow the change (Invalid license: <reason>).
No taxonomy with this identifier exists, or the key lacks write permission on the taxonomy (Taxonomy not found, with the identifier in details.id).
The body is not an array of entries, an entry lacks one of the four fields, or an entry has an unknown field.