Create Or Update Widget Type (saveWidgetType)
Create or update the Widget Type. Widget Type represents the template for widget creation. Widget Type and Widget are similar to class and object in OOP theory. When creating the Widget Type, platform generates Widget Type Id as time-based UUID. The newly created Widget Type Id will be present in the response. Specify existing Widget Type id to update the Widget Type. Referencing non-existing Widget Type Id will cause 'Not Found' error.
Widget Type fqn is unique in the scope of System or Tenant. Special Tenant Id '13814000-1dd2-11b2-8080-808080808080' is automatically used if the create request is sent by user with 'SYS_ADMIN' authority.Remove 'id', 'tenantId' rom the request body example (below) to create new Widget Type entity.
Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.
Query parameters
Optional boolean parameter indicating whether to update existing widget type by FQN if present instead of creating new one
Request body
Example request
{
"deprecated": true,
"descriptor": {},
"id": {
"id": "784f394c-42b6-435a-983c-b7beff2784f9",
"entityType": "WIDGET_TYPE"
},
"createdTime": 1609459200000,
"tenantId": {
"id": "784f394c-42b6-435a-983c-b7beff2784f9",
"entityType": "TENANT"
},
"scada": true
}Response
OK
Example response
{
"deprecated": true,
"descriptor": {},
"id": {
"id": "784f394c-42b6-435a-983c-b7beff2784f9",
"entityType": "WIDGET_TYPE"
},
"createdTime": 1609459200000,
"tenantId": {
"id": "784f394c-42b6-435a-983c-b7beff2784f9",
"entityType": "TENANT"
},
"scada": true
}