Skip to main content
Version: 2025-02-27

Node Additions

Filtering on Node Additions

When creating a VKG, it's possible to add a filter to the metadata schema under each metadata JSON. This forces all nodes that will be added to adhere to this filter and nodes that don't pass the filter will get rejected and placed in a failedNodes list in the response of the request.

Typical un-filtered 'Create VKG' request:

{
"vkgId": "inventory",
"metadata": {
"type": {
"type": "string"
},
"quantity": {
"type": "number"
}
}
}

'Create VKG' request with filter:

{
"vkgId": "dairy_aisle_inventory_surplus",
"metadata": {
"type": {
"type": "string"
"oneOf": ["milk", "eggs", "cheese"]
},
"quantity": {
"type": "number",
"moreThanEq": 2000
}
}
}

Filters significantly enhance your data and can act as a helpful method of preprocessing your data on the VKG.