calculated-field-controller
Create Or Update Calculated Field (saveCalculatedField)
Creates or Updates the Calculated Field. When creating calculated field, platform generates Calculated Field Id as time-based UUID. The newly created Calculated Field Id will be present in the response. Specify existing Calculated Field Id to update the calculated field. Referencing non-existing Calculated Field Id will cause 'Not Found' error. Remove 'id', 'tenantId' from the request body example (below) to create new Calculated Field entity.
Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.
post/api/calculatedField
Request body
Example request
{
"id": {
"id": "784f394c-42b6-435a-983c-b7beff2784f9",
"entityType": "CALCULATED_FIELD"
},
"createdTime": 1609459200000,
"tenantId": {
"id": "784f394c-42b6-435a-983c-b7beff2784f9",
"entityType": "TENANT"
},
"entityId": {
"id": "784f394c-42b6-435a-983c-b7beff2784f9",
"entityType": "DEVICE"
}
}Response
OK
Example response
{
"id": {
"id": "784f394c-42b6-435a-983c-b7beff2784f9",
"entityType": "CALCULATED_FIELD"
},
"createdTime": 1609459200000,
"tenantId": {
"id": "784f394c-42b6-435a-983c-b7beff2784f9",
"entityType": "TENANT"
},
"entityId": {
"id": "784f394c-42b6-435a-983c-b7beff2784f9",
"entityType": "DEVICE"
}
}