Duplicate
Deprecated: use POST /v2/taxonomies/{taxonomy_id}/duplicate.
Create a copy of a taxonomy the caller can view; the caller owns the copy.
The copy gets a fresh taxonomy_id, regenerated graph node/edge ids, the
caller as owner, and reset run history/stats. kind, description and tag
membership are inherited from the source; the copy is not added to any
project. The source’s sharing is inherited only when the caller owns the
source; anyone else gets a private copy.
Request Body
| Field | Type | Description |
|---|---|---|
source_taxonomy_id | str | Taxonomy being copied (keyed by id). |
new_taxonomy_name | str | Name for the copy. |
Response
- 200: Returns the new
DeasyTaxonomy. - 400: Empty
new_taxonomy_name. - 403: Caller cannot view the source (or it does not exist).
- 404: Source taxonomy row disappeared after the access check.
- 409:
new_taxonomy_namecollides with an existing taxonomy.
Authorizations
Response
Successful Response
A node/edge style graph representation of a taxonomy.
Example (simple case - single condition per edge): graph = TaxonomyGraph( nodes=[ TaxonomyNode(node_id="1", tag_id="tag-doc-type", active_values=["Contract", "Invoice"]), TaxonomyNode(node_id="2", tag_id="tag-contract-type", active_values=["NDA", "Employment"]), ], edges=[ TaxonomyEdge( target_node_ids=["1"], conditions=[EdgeCondition(node_id="root", tag_value_name="Contract")], ), TaxonomyEdge( target_node_ids=["2"], conditions=[EdgeCondition(node_id="1", tag_value_name="NDA")], ), ] )
Example (AND case - multiple conditions): # Edge only followed when Document Type = Contract AND Region = US TaxonomyEdge( target_node_ids=["us_contract_node"], conditions=[ EdgeCondition(node_id="doc_type_node", tag_value_name="Contract"), EdgeCondition(node_id="region_node", tag_value_name="US"), ], )
