Find entities by ID

Copy
POST /deviceinformationservice/api/v1/tenants/{tenantId}/entity-lookup

Maps from one entity identifier to all available IDs.

This API endpoint enables the lookup of entities based on provided identifiers within a specific tenant.

It allows mapping from one entity identifier to all available IDs associated with that entity.

The response message contains the list of all the originally requested identifiers in the IDs parameter. For each identifier, a key-value pair is included in the response array. If a matching entity is found in the database, the entity attribute gets populated with all the identifiers associated with the corresponding entity. In lack of a successful match the entity attribute is omitted.

To perform this operation, you must be authenticated by means of one of the following methods:

  • oauth2_implicit (scopes: PolicyAtLeastDisReader)

  • bearerAuth (scopes: PolicyAtLeastDisReader)

Body parameter

Copy
{
  "Ids": [
    "string"
  ],
  "EntityClass": "UnknownEntityClass",
  "IdType": "Id",
  "IncludeOnly": [
    "Id"
  ],
  "IncludeMisses": true
}

Parameters

Table 87 

Name

In

Type

Required

Description

tenantId

path

string(uuid)

true

A GUID that determines the customer tenant.

authorization

header

string

false

JWT access token obtained from the Identity Server. Such as "Bearer: xyz"

body

body

request

false

none

Responses

Table 88 

Status

Meaning

Description

Schema

200

OK

An array of key-value pairs. The key is the lookup id, the value is the list of entity ids if there was a match, otherwise it is omitted.

inline

401

Unauthorized

Unauthorized.

none

403

Forbidden

Forbidden. Required authority: PolicyAtLeastDisReader

none

Response schema

Status code 200

Table 89 

Name

Type

Required

Restrictions

Description

anonymous

[entry]

false

none

none

» Key

string ¦ null

false

none

none

» Entity

entity identifiers

false

none

none

»» Id

string ¦ null

false

none

none

»» IntegrationKey

string ¦ null

false

none

none

»» PrimaryCollectionSystem

string ¦ null

false

none

none

»» Name

string ¦ null

false

none

none

»» ElectronicSerialNumber

string ¦ null

false

none

none

»» MACAddress

string ¦ null

false

none

none

»» EquipmentSerialNumber

string ¦ null

false

none

none

»» UtilityId

string ¦ null

false

none

none

»» SerialNumber

string ¦ null

false

none

none

Example response

200 response

Copy
[
  {
    "Key": "ANonMatchingSerialNumber"
  },
  {
    "Key": "AMatchingSerialNumber",
    "Entity": {
      "Id": "EM-123",
      "IntegrationKey": "e001124",
      "PrimaryCollectionSystem": "OWOC",
      "ElectronicSerialNumber": "2.16.840.114416.34.00000001",
      "MACAddress": "00:07:8A:04:D6:02",
      "EquipmentSerialNumber": "114416",
      "UtilityId": "012255/12",
      "SerialNumber": "AMatchingSerialNumber"
    }
  }
]