In the Meeco Vault, Items, Item Templates and Slots can be tagged with Classification Nodes. If an Item has been tagged with a Classification Node, you can find it again by searching for that Classification Node.
Classification Nodes are a lot like tags, but are grouped into Schemes. Schemes might represent similar topics, or classifications from an existing app.
A Classification Node is structured like
Browsing Classification Nodes
The $VAULT_ACCESS_TOKEN can be grabbed from the user file you created in the Quickstart guide.
All classification nodes can be queried by GET /vault/classification_nodes:
{"classification_node": {"id":"b4ff857f-6f50-4608-bd93-b61a7dd012d5","background_color":null,"description":"Hi There this is my Tag!","image":null,"label":"My Tag","name":"my-new-tag","ordinal":0,"scheme":"tag" }}
Properties classification_scheme_name and either name or label are mandatory. As mentioned above, classification_scheme_name should usually be 'tag'. As for other Vault objects, if only label is given, then the name is created by translating the label text.
Since name is used to link a Classification Node to a Vault object, it must be unique.
Note that currently, as for Item Templates, the API does not allow:
updating Classification Nodes,
deleting Classification Nodes,
sharing new Classification Nodes
Applying Classifications
Classification Nodes can be applied to Item Templates, Items and Slots. Most provide a way of creating new Classification Nodes in the same request.
Templates
Single Classification Nodes may be applied to Item Templates:
This has two effects. First, the Item Template can be found via its Classification Node or Scheme name, e.g. queries GET /vault/item_templates?by_classification=tag, or GET /vault/item_templates?by_classification=new_tag should include the template. Second, new Items created with the Item Template will be classified with the Classification Node.
Classification nodes are added to Items by passing classification_nodes_attributes, just like adding Slots. If the name and scheme match an existing Classification Node, it is used, otherwise a new one is created.
Classification Node can be applied to both the Item and the Slots it contains. Unlike Item Templates, Items may have multiple classifications.
{"item": {"id":"ff04474c-f661-4f71-b5a3-c40452c30e3b","name":"item_class","label":"item class","description":null,"created_at":"2020-10-07T04:55:54.953Z","item_template_id":"01bbb6a4-7466-423f-afdb-2d2f314011c4","ordinal":1,"visible":true,"updated_at":"2020-10-07T04:55:54.987Z","item_template_label":"Some Template","owner_id":"e414dc7a-b6f1-4fb6-9481-41d7be5c8785","share_id":null,"classification_node_ids": ["a9b7b318-2e22-4969-a521-e6d43d882bf6" ],"association_ids": [],"associations_to_ids": [],"slot_ids": [],"own":true,"...":"..." },"associations": [],"associations_to": [],"classification_nodes": [ {"id":"a9b7b318-2e22-4969-a521-e6d43d882bf6","background_color":null,"description":"Hi There this is my Tag!","image":null,"label":"My New Tag","name":"my_new_tag","ordinal":0,"scheme":"tag" } ],"slots": [],"attachments": [],"thumbnails": []}
Note that even if the Classification Node name property matches an existing Node, but other fields don't, then a new Classification Node will be created. The scheme property must match an existing Scheme.
In this case the new_slot receives both an existing Classification Node and a new one.
{"item": {"id":"bfa4c439-fc34-41e6-aba2-12191061ccb2","name":"another_item","label":"Another Item","description":null,"created_at":"2020-10-07T05:15:42.039Z","item_template_id":"01bbb6a4-7466-423f-afdb-2d2f314011c4","ordinal":1,"updated_at":"2020-10-07T05:15:42.131Z","item_template_label":"Some Template","owner_id":"e414dc7a-b6f1-4fb6-9481-41d7be5c8785","classification_node_ids": [],"association_ids": [],"associations_to_ids": [],"slot_ids": ["636faed0-11f2-4cc4-876e-9ce1118381c8" ],"own":true,"...":"..." },"associations": [],"associations_to": [],"classification_nodes": [ {"id":"ec6a92a2-5578-49cf-b7de-23f7a7cf8081","background_color":null,"description":"Tag For The Slot","image":null,"label":"A New Tag","name":"a_new_tag","ordinal":0,"scheme":"tag" }, {"id":"8ca80da9-53fa-4762-9b3b-857153f2dea0","background_color":null,"description":null,"image":null,"label":"My new tag","name":"my_new_tag","ordinal":0,"scheme":"tag" } ],"slots": [ {"id":"636faed0-11f2-4cc4-876e-9ce1118381c8","name":"new_slot","description":"Some Slot","classification_node_ids": ["ec6a92a2-5578-49cf-b7de-23f7a7cf8081","8ca80da9-53fa-4762-9b3b-857153f2dea0" ],"item_id":"bfa4c439-fc34-41e6-aba2-12191061ccb2","slot_type_name":"key_value","label":"New Slot","...":"..." } ],"attachments": [],"thumbnails": []}
Slots
Slots are usually given Classification Nodes via POST /vault/items, but you can add a classification to an existing Slot using PUT /vault/slots/{id}.
Slots cannot be searched by Classification Node or Scheme.
Some Slots have the type classification_node. The intent is that the owning Item will be classified with that node. Usually this is done within an app.