Skip to main content

Metadata Resource Object

Resource object and functionalities are subject to change

Attributes#

key string#

Custom key that will identify the metadata object in the unit card. Has to be unique for each asset and organization.

value multi type#

Content of the metadata. Format is flexible, can be any type of data structure. Per example, String, Int, Float, Array, Tuple, HashTable, etc.

createdBy string#

Reference to the organization that initialized the metadata resource.

Only the organization that created the metadata resource has the right to modify such resource.

metaType string#

Metadata flag for certain metadata types. It's a developer resource to help tag, identify easier certain types of metadata resources within the same unit card.

This attribute is meant to reduce searchability time on metadata resources and easy allocation for data that can be relevant and meaningful.

If no flag is passed on Add Metadata or Update Metadata, metaType.NO_TYPE is automatically assigned.

See more, metaType Table

visibility string#

Metadata flag for all metadata fields. It's a developer resource to help keep some metadata resources within the unit card private and only accessible by the owner ond the organization that created the resource.

If no flag is passed on Add Metadata or Update Metadata, visibility.PUBLIC is automatically assigned.

See more, Visibility Table

Metadata Object#

Example 1#

{
"key": "Loyalty Price",
"value": [200, "usd"],
"createdBy": "ORG1",
"metaType": "PRICE",
"visibility": "PRIVATE"
}

Example 2#

{
"key": "properties",
"value": {
"color": "Red",
"size": 42,
"model": "349a01h3",
"manufacturing_plant": "Berlin"
},
"createdBy": "ORG2",
"metaType": "NO_TYPE",
"visibility": "PUBLIC"
}