Save or update entity view (saveEntityView)
Entity Views limit the degree of exposure of the Device or Asset telemetry and attributes to the Customers. Every Entity View references exactly one entity (device or asset) and defines telemetry and attribute keys that will be visible to the assigned Customer. As a Tenant Administrator you are able to create multiple EVs per Device or Asset and assign them to different Customers. See the 'Model' tab for more details.Remove 'id', 'tenantId' and optionally 'customerId' from the request body example (below) to create new Entity View entity.
Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.
Query parameters
Optional value of name conflict policy. Possible values: FAIL or UNIQUIFY. If omitted, FAIL policy is applied. FAIL policy implies exception will be thrown if an entity with the same name already exists. UNIQUIFY policy appends a suffix to the entity name, if a name conflict occurs.
Optional value of name suffix separator used by UNIQUIFY policy. By default, underscore separator is used. For example, strategy is UNIQUIFY, separator is '-'; if a name conflict occurs for entity name 'test-name', created entity will have name like 'test-name-7fsh4f'.
Optional value of uniquify strategy used by UNIQUIFY policy. Possible values: RANDOM or INCREMENTAL. By default, RANDOM strategy is used, which means random alphanumeric string will be added as a suffix to entity name. INCREMENTAL implies the first possible number starting from 1 will be added as a name suffix. For example, strategy is UNIQUIFY, uniquify strategy is INCREMENTAL; if a name conflict occurs for entity name 'test-name', created entity will have name like 'test-name-1.
Request body
Example request
{
"entityId": {
"id": "784f394c-42b6-435a-983c-b7beff2784f9",
"entityType": "DEVICE"
},
"tenantId": {
"id": "784f394c-42b6-435a-983c-b7beff2784f9",
"entityType": "TENANT"
},
"customerId": {
"id": "784f394c-42b6-435a-983c-b7beff2784f9",
"entityType": "CUSTOMER"
},
"name": "A4B72CCDFF33",
"type": "Temperature Sensor",
"keys": {
"timeseries": [
"temperature",
"humidity"
],
"attributes": {
"cs": [
"currentConfiguration"
],
"ss": [
"model"
],
"sh": [
"targetConfiguration"
]
}
},
"id": {
"id": "784f394c-42b6-435a-983c-b7beff2784f9",
"entityType": "ENTITY_VIEW"
},
"createdTime": 1609459200000,
"additionalInfo": {}
}Response
OK
Example response
{
"entityId": {
"id": "784f394c-42b6-435a-983c-b7beff2784f9",
"entityType": "DEVICE"
},
"tenantId": {
"id": "784f394c-42b6-435a-983c-b7beff2784f9",
"entityType": "TENANT"
},
"customerId": {
"id": "784f394c-42b6-435a-983c-b7beff2784f9",
"entityType": "CUSTOMER"
},
"name": "A4B72CCDFF33",
"type": "Temperature Sensor",
"keys": {
"timeseries": [
"temperature",
"humidity"
],
"attributes": {
"cs": [
"currentConfiguration"
],
"ss": [
"model"
],
"sh": [
"targetConfiguration"
]
}
},
"id": {
"id": "784f394c-42b6-435a-983c-b7beff2784f9",
"entityType": "ENTITY_VIEW"
},
"createdTime": 1609459200000,
"additionalInfo": {}
}