Duplicate
Create a copy of a taxonomy owned by the caller.
The copy gets a fresh taxonomy_id, regenerated graph node/edge ids, the
caller as owner, and reset run history/stats. kind, description, tag
membership, sharing/permissions and project associations are inherited from
the source.
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 is not the owner of the source.
- 404: Source taxonomy not found or not accessible.
- 409:
new_taxonomy_namecollides with an existing taxonomy.
Authorizations
Basic authentication header of the form Basic <encoded-value>, where <encoded-value> is the base64-encoded string username:password.
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", name="Document Type", active_values=["Contract", "Invoice"]), TaxonomyNode(node_id="2", name="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"), ], )
