Local Identifiers

Each Twin is identified by one or more local identifiers. Each local identifier consists of a set of key-value-pairs. This set taken together define the uniqueness of one local identifier. For example, in one context, a Twin might be uniquely identified by the combination of a plant ID and a machine ID, while in another context it might be identified by the ID in some master data system. Both of these sets of key-value-pairs can then be added as local identifiers to the Twin, using the Local Identifier endpoint, enabling solutions from both contexts to find it in the registry. The used keys and values can be freely chosen by whomsoever registers the Twin (or subsequently adds a local identifier to an already registered Twin).

Local Identifier Object

A local identifier is defined by a set of up to five key value pairs. Serialized as JSON it might look like this:

{
    "localIdentifierKeyPairs": [
        {
            "key": "number",
            "value": "123456789"
        },
        {
            "key": "alphabet",
            "value": "abcdefghij"
        },
        {
            "key": "fib",
            "value": "11235813"
        }
    ],
    "id": "d7a498db-bbe0-4b87-b4ee-8b1e798ff729",
    "owningTenantId": "a6ffe03f-9d18-4678-8c21-9fffed5c9235",
    "hash": "1670050995"
}

Local Identifier Queries

Twins can also be queried by their local identifiers using RQL.

Search via value for a key

localIdentifiers.localIdentifierKeyPairs.<key>, "<value>"

Search via partial value without a key

likelocalIdentifiers.valueSet, "partial-value"
The partial value search requires the "like" operator.

Full Examples

  • Wildcard search of all values without a specific key

    filter=and(like(localIdentifiers.valueSet,"*11235813*"))
  • Search for multiple key value pairs

    filter=and(eq(eq(localIdentifiers.localIdentifierKeyPairs.alphabet,"abcdefghij"),eq(localIdentifiers.localIdentifierKeyPairs.number,"123456789"))
  • Search for multiple key value pairs with partial and equal values

    filter=and(eq(eq(localIdentifiers.localIdentifierKeyPairs.alphabet,"abcdefghij"),like(localIdentifiers.localIdentifierKeyPairs.number,"1234*"),like(localIdentifiers.localIdentifierKeyPairs.fib,"*2358*"))
  • Search complete identifier set

    filter=and(eq(localIdentifiers.localIdentifierKeyPairs.alphabet,"abcdefghij"),eq(localIdentifiers.localIdentifierKeyPairs.number,"123456789"),eq(localIdentifiers.localIdentifierKeyPairs.fib,"11235813"))
  • Search for partial identifier values without keys

    filter=like(localIdentifiers.valueSet,"*11235813*")