Assigning Classifications and Parameters
Setting up Classifications and Parameters (user-defined properties) is usually a job for the Tandem user. An administrator will define the Facility Template and all the Classification and Parameter mappings, and then you can use POST scan to read those properties and POST mutate to write them. However, you may find the need to programmatically assign the Classification to particular elements.
A given user-defined property does not exist on an element until it is classified. As you can see in the following screenshot, the selected element has not yet been classified:

If we select that item and choose a Classification:

Once applied, our element now has the Parameters that were mapped to that Classification in our Facility Template:

The properties that showed up are a result of assigning a Classfication. From the “Manage” tab of Tandem, we can see the mapping of those paramters.

To assign a Classfication programmatically, we need to know the string value of the Classification. In this case, it is Ss_65_80. We then use the POST mutate with a payload similar to:
{
"keys": [
"ricOExIyRIyTke1_49OlKgAD-WQ"
],
"muts": [
[
"i",
"n",
"!v",
"Ss_65_80"
]
]
}
This should result in the same state we were in by applying a Classificaiton with the Tandem UI. At this point, those properties are still not assigned any value, but the system knows they should be present on that element because of the Classification mapping. To set a value, we would now call /mutate
with the value for the qualified property name.
See Qualiied Properties for information about how to look up the internal property identifier. See Write Properties for information about how to write individual properties for an element.
Once those properties are there, you continue to use /mutate
with the i
option to “Insert/Update” new values.
If you change to a new Classification, it will not remove these original properties that came from the previous classification assignment. The Tandem UI will hide those “stale” properties, as shown in the screenshot below:

However, if we were to immediately call /scan
, we would still see the “stale” property:
{
"families": [
"z"
],
"includeHistory": false,
"keys": [
"ricOExIyRIyTke1_49OlKgAD-WQ"
]
}
[
"v1",
{
"k": "ricOExIyRIyTke1_49OlKgAD-WQ",
"z:xAc": [
"1234"
],
"z:xwc": [
"7777"
]
}
]
The process currently requires the Tandem User to run a “cleanup” operation on the database at some point to get rid of the stale mappings.
