Data Modeling
Download OpenAPI specification:Download
Query Real-time Alarms
When pagination parameters are provided, the response format of the API will change. The schema name will be PaginatedAlerts. See Object Modeling Guide for details.
Authorizations:
query Parameters
keyWord | string Example: keyWord=o1 Object name/alias or object property name/alias (fuzzy match), e.g., o1 |
priority | string Example: priority=4 Priority, e.g., 4 |
limitValue | string Example: limitValue=11 Limit value (target value of the alarm condition operator; for numerical attributes, provide a number; for boolean attributes, provide true/false) |
pageIndex | integer <int32> Default: 1 Example: pageIndex=1 Page index (default is 1), e.g., 1. Must be used together with pageSize; otherwise, no pagination effect will occur, and all data will be returned. |
pageSize | integer <int32> <= 200 Example: pageSize=200 Number of items per page, maximum value is 200. Must be used together with pageIndex; otherwise, no pagination effect will occur, and all data will be returned. |
Responses
Response samples
- 200
- 500
{- "code": 200,
- "data": [
- {
- "ackDatatimestamp": 1614670680298,
- "ackStatus": 0,
- "ackUserName": "Zhang San",
- "alertName": "uuidde2d4cfaf5af4abe830387fbfe3e0bbf",
- "alertType": "EQ",
- "description": "This is a test alarm",
- "disappearedDatatimestamp": 1614583659860,
- "fullName": "10801uuidde2d4cfaf5af4abe830387fbfe3e0bbf",
- "id": 11111,
- "newValue": "11",
- "oldValue": "9",
- "priority": 5,
- "showName": "a1",
- "source": "instance1",
- "sourcePropShowName": "attribute1",
- "sourcePropertyName": "attribute1",
- "sourceShowName": "instance1",
- "startDatatimestamp": 1614583559860,
- "status": 1,
- "valType": 0
}
], - "detail": "string",
- "message": "ok"
}
Set Real-time Values
Set real-time values for multiple physical template instances, with a maximum of 1000 items per batch.
Authorizations:
Request Body schema: application/json
Set real-time values
attributeFullPath required | string Full path of the attribute, which can be Instance alias.Attribute namespace.Attribute alias or Template namespace.Template alias.Instance alias.Attribute namespace.Attribute alias. |
value required | string Value to be set for the attribute (varies depending on the attribute type, using integer type as an example) |
dateTime | string <date-time> Time of setting the attribute, following the RFC 3339 standard, in the format of yyyy-MM-dd'T'HH:mm:ss.SSSZ, such as 2021-04-06T16:00:00.000+08:00 (+08:00 represents the time zone offset). If not provided, the current server time will be used. |
Responses
Request samples
- Payload
[- {
- "attributeFullPath": "system.t1.i1.system.p1",
- "value": "666",
- "dateTime": "2021-04-06T16:00:00+08:00"
}
]
Response samples
- 400
{- "code": 10001009,
- "message": "ATTRIBUTE:system.xx not found.",
- "detail": "string",
- "data": { }
}
Query Real-time Data of Object attributes
Authorizations:
Request Body schema: application/json
The function supports a maximum of 1000 attribute. Collection of TemplateNamespace.TemplateAlias.InstanceAlias.AttributeNamespace.AttributeAlias
inputs | Array of strings |
Responses
Request samples
- Payload
{- "inputs": [
- "system.t1.instance.system.p1"
]
}
Response samples
- 200
- 500
{- "code": 200,
- "data": {
- "property1": {
- "name": "system.testExcel.Instance_53.system.p1",
- "status": "0",
- "timeStamp": 1614736757547,
- "value": { }
}, - "property2": {
- "name": "system.testExcel.Instance_53.system.p1",
- "status": "0",
- "timeStamp": 1614736757547,
- "value": { }
}
}, - "detail": "string",
- "message": "ok"
}
Query Historical Data of Object Attributes
Authorizations:
Request Body schema: application/json
dto
object (HistoryFill) Historical data filtering conditions | |
object (HistoryGroup) Historical data grouping conditions | |
limit | integer <int32> Number of elements to return (default is 1000) |
offset | integer <int32> Offset, start querying from the specified number. For example, if offset is 5, start querying from the 6th item |
order | string Enum: "ASC" "DESC" Sorting rule (by time)
|
select | Array of strings |
object (HistoryWhere) Historical data query conditio |
Responses
Request samples
- Payload
{- "fill": {
- "strategy": "previous"
}, - "groupBy": {
- "time": "5s,1s"
}, - "limit": 1,
- "offset": 23,
- "order": "DESC",
- "select": [
- "system.testExcel.Instance_53.system.p1"
], - "where": {
- "and": {
- "timestamp": {
- "ge": "2021-03-04T05:04:11Z",
- "gt": "2021-03-04T05:04:11Z",
- "le": "2021-03-04T05:14:11Z",
- "lt": "2021-03-04T05:14:11Z"
}
}
}
}
Response samples
- 200
- 500
{- "code": 200,
- "data": {
- "results": [
- {
- "datas": [
- [
- { }
]
], - "fields": [
- "time"
], - "function": "first",
- "hasNext": false,
- "name": "system.testExcel.Instance_53.system.p1"
}
], - "unauthorized": [
- "system.testExcel.Instance_53.system.p11"
], - "notExsistAtrributes": [
- "system.testExcel.Instance_53.system.p1x"
]
}, - "detail": "string",
- "message": "ok"
}
Execute Instance Service
Authorizations:
path Parameters
templateNamespace required | string Example: system Namespace of the template, for example, system |
templateName required | string Example: t1 Alias of the template, for Example, t1 |
instanceName required | string Example: instacne1 Alias of the instance, for Example, instance1 |
serviceNamespace required | string Example: system Namespace of the service, for example, system |
serviceName required | string Example: getPropertyValue Alias of the service, for example, getPropertyValue |
Request Body schema: application/json
Service input parameters
Responses
Request samples
- Payload
{- "propName": "p1"
}
Response samples
- 200
- 500
{- "code": 200,
- "data": {
- "result": 44
}, - "detail": "string",
- "message": "ok"
}
Execute form Template Service
Authorizations:
path Parameters
templateNamespace required | string Example: system Template namespace, e.g., system |
templateName required | string Example: t1 emplate alias, e.g., serviceNamespace |
serviceNamespace required | string Example: system Service namespace, e.g., serviceName |
serviceName required | string Example: getPropertyValue Service alias, e.g., getPropertyValue |
Request Body schema: application/json
Service input parameters
Responses
Request samples
- Payload
{- "propName": "p1"
}
Response samples
- 200
- 500
{- "code": 200,
- "data": {
- "result": 44
}, - "detail": "string",
- "message": "ok"
}
Get a List of Attribute Units
Authorizations:
query Parameters
type required | string Example: type=visible Type, all is all, visible is visible, e.g., visible |
keyword | string Example: keyword=g Keyword, fuzzy match by name, e.g., g |
Responses
Response samples
- 200
- 500
{- "code": 200,
- "data": [
- {
- "id": 16667,
- "name": "km"
}
], - "detail": "string",
- "message": "ok"
}
Query All Attributes Based on the Search Criteria
Interface usage scenario description- Comprehensive attribute search interface for complex filtering queries on attributes.
For example, query attributes bound to system.label2 under instance i1, not belonging to app test, and also return attribute values.
The required parameters are instanceNames=i1&labelFullNames=system.label2&excludeAppIds=true&appIds=test&needValue=true
Authorizations:
query Parameters
hasBindRelation | boolean Whether there is a binding relationship |
withBindRelation | boolean Default: false Control whether the queried attribute information includes binding relationships (attributeBindRelation field). Effective from supOS V4.01.00.00 version. |
historical | boolean Whether to have historical storage |
displayable | boolean Whether it is the main display field |
needValue | boolean Default: false Whether to need attribute value (controls the 'value' field in the response. When set to true, 'value' returns the value of the attribute; when set to false, 'value' is always null. Default is false). This parameter needs to be used in conjunction with the 'instanceNames' parameter. If the queried attribute is a template attribute and is shared by multiple instances in the 'instanceNames' parameter, the 'value' field will take the last instance in the 'instanceNames' list that has this template attribute. This field is invalid when 'instanceNames' is empty. |
needInstanceInfo | boolean Default: false Whether to need instance name aliases (controls the 'instanceEnName' and 'instanceDisplayName' fields in the response. When set to true, these fields are included and can be used for instance name information; when set to false, 'instanceEnName' and 'instanceDisplayName' are not returned. Default is false). This parameter needs to be used in conjunction with the 'instanceNames' parameter. If the queried attribute is a template attribute and is shared by multiple instances in the 'instanceNames' parameter, the 'instanceEnName' and 'instanceDisplayName' fields will take the last instance in the 'instanceNames' list that has this template attribute. This field is invalid when 'instanceNames' is empty. |
excludeLabelFullNames | boolean Default: false Query data that do not have the specified labels. This parameter needs to be used in conjunction with 'labelFullNames'. This field is invalid when 'labelFullNames' is empty. |
excludeAppNames | boolean Deprecated Default: false This field is named incorrectly and has been deprecated. Please use the 'excludeAppIds' field instead. This field is still valid in the current version, and its functionality and usage are the same as 'excludeAppIds'. |
excludeAppIds | boolean Default: false Query data that does not belong to the specified app. This parameter needs to be used in conjunction with 'appIds'. This field is invalid when 'appIds' is empty. |
containsInheritedMetadata | boolean Default: true Example: containsInheritedMetadata=true Whether to include inherited metadata. This parameter needs to be used with the specified template or instance. This field is invalid when both 'instanceNames' and 'templateFullNames' are empty. |
containsSelfMetadata | boolean Default: true Example: containsSelfMetadata=true Whether to include self metadata. This parameter needs to be used with the specified template or instance. This field is invalid when both 'instanceNames' and 'templateFullNames' are empty. |
needKnowAlarm | boolean Default: false Whether to retrieve information about the presence of alarms. If set to true, the 'existAlarm' field will be valid in the response. |
dataTypes | Array of strings Items Enum: "BOOLEAN" "STRING" "INTEGER" "LONG" "FLOAT" "DOUBLE" "DECIMAL" "FILE" "DATE" "DATETIME" "OBJECT" "SYSTEMCODE" Example: dataTypes=INTEGER 属性类型,如:INTEGER
|
filterNames | Array of strings Example: filterNames=enName Filter attribute aliases, such as enName |
filterNamespace | string Example: filterNamespace=system Filter namespace (used in combination with filter attribute aliases), such as system |
keyword | string Example: keyword=Zhang Keyword for fuzzy matching of name aliases, such as, Zhang |
pageIndex | integer <int32> Default: 1 Example: pageIndex=1 Page number (default is 1), such as 1 |
pageSize | integer <int32> Default: 20 Example: pageSize=20 Number of data entries per page, maximum limit is 500 (default is 20), such as 20 |
namespaces | Array of strings Example: namespaces=system Namespaces, such as system |
labelFullNames | Array of strings Example: labelFullNames=system.label1 Label namespace and alias list, such as system.label1 |
appNames | Array of strings[ items <= 128 characters ] Deprecated Example: appNames=App_bac090d688004de9bf927b9ff66bfca7 This field is named incorrectly and has been deprecated. Please use the 'appIds' field instead. This field is still valid in the current version, and its functionality and usage are the same as 'appIds'. |
appIds | Array of strings[ items <= 128 characters ] Example: appIds=App_bac090d688004de9bf927b9ff66bfca7 Specify the appId to query the attributes |
instanceNames | Array of strings Example: instanceNames=instance1 List of instance aliases to which the metadata belongs (priority item, when this field is provided, 'templateNames' is ignored), such as instance1 |
sourceFunctionSetFullNames | Array of strings Example: sourceFunctionSetFullNames=system.f1 List of source function set namespaces and aliases, such as system.f1 |
templateFullNames | Array of strings Example: templateFullNames=system.t1 List of template namespaces and aliases to which the metadata belongs, such as system.t1 |
functionSetFullNames | Array of strings Example: functionSetFullNames=system.f2 List of function set namespaces and aliases to which the metadata belongs, such as system.f2 |
Responses
Response samples
- 200
- 400
{- "list": [
- {
- "comment": "This is a test template",
- "dataType": "LONG",
- "subDataType": "LONG",
- "dataTypePrecision": 0,
- "dataTypeScale": 0,
- "defaultValue": "666",
- "displayName": "p1",
- "enName": "p1",
- "hasKeyRelation": false,
- "historical": false,
- "persistent": false,
- "readWriteMode": "READ_ONLY",
- "stringMaxLength": 0,
- "valueScale": 2,
- "id": 12345,
- "templateId": 12222,
- "sourceFunctionSetId": 12221,
- "instanceId": "12223",
- "labelIds": [
- 11111
], - "deletable": true,
- "editable": true,
- "max": 100,
- "min": 0,
- "maxValue": 100.88,
- "minValue": 0.88,
- "namespace": "system",
- "unit": "kg",
- "templateName": "Template_12",
- "templateNamespace": "system",
- "unique": false,
- "display": false,
- "existAlarm": false,
- "value": "string",
- "instanceEnName": "string",
- "instanceDisplayName": "string",
- "attributeBindRelation": {
- "bindType": "EXPRESSION",
- "expressionBindRelation": {
- "expression": "PROP(\"system.t2.instance2.system.p1\") + 1.1"
}, - "statisticBindRelation": {
- "startTime": "2020-12-15T02:56:51Z",
- "endTime": "2020-12-15T02:56:50Z",
- "enableMarkPeriod": false,
- "markPeriodType": "ADVANCE",
- "markPeriodValue": 30,
- "statisticPeriod": 30,
- "statisticPeriodUnit": "HOUR",
- "statisticFunction": "MAX",
- "insValueType": "START_TIME",
- "enableTriggerTime": false,
- "zeroRule": false
}, - "bindStatus": 0,
- "bindErrMsg": "string",
- "displayBindRelationSourceAttributes": [
- {
- "sourceTemplate": {
- "displayName": "Data 1",
- "id": 11119,
- "enName": "metadata1",
- "namespace": "system"
}, - "sourceFunctionSet": {
- "displayName": "Data 1",
- "id": 11119,
- "enName": "metadata1",
- "namespace": "system"
}, - "sourceInstance": {
- "displayName": "Data 1",
- "id": "11119",
- "enName": "metadata1"
}, - "sourceAttribute": {
- "displayName": "Data 1",
- "id": 11119,
- "enName": "metadata1",
- "namespace": "system"
}
}
]
}
}
], - "pagination": {
- "total": 10,
- "pageSize": 20,
- "current": 1
}
}
Get Detailed Information about Instance Attributes Based on Attribute Namespace Aliases
Get the specified instance attributes. If they do not exist, they will not be returned. Supports a maximum of 100 attributes.
Authorizations:
query Parameters
instanceAttributes | Array of strings Example: instanceAttributes=instance1.system.t1 Instance attribute aliases in the format of instance alias.namespace alias.attribute alias, such as instance1.system.t1 |
Responses
Response samples
- 200
- 400
{- "code": 200,
- "message": "ok",
- "data": [
- {
- "enName": "p1",
- "displayName": "p1",
- "dataType": "BOOLEAN",
- "unique": false,
- "readWriteMode": "READ_WRITE",
- "persistent": false,
- "historical": false,
- "display": false,
- "hasKeyRelation": false,
- "id": 14811,
- "templateId": 14810,
- "labelIds": [ ],
- "namespace": "system",
- "templateName": "hss1",
- "templateNamespace": "system",
- "instanceEnName": "testInstance1",
- "instanceDisplayName": "testInstance1",
- "editable": true,
- "deletable": true
}
]
}
Create Template Attribute
Authorizations:
path Parameters
templateNamespace required | string Example: system Template namespace, e.g., system |
templateName required | string Example: t1 Template alias, e.g., t1 |
Request Body schema: application/json
dto
comment | string <= 1024 characters Description |
dataType required | string Enum: "BOOLEAN" "INTEGER" "LONG" "FLOAT" "DOUBLE" "DATE" "DATETIME" "FILE" "STRING" "DECIMAL" "OBJECT" "SYSTEMCODE" Data type (OBJECT type only possible in queries, not available for creation in OpenAPI)
|
subDataType | string <= 200 characters Sub data type, required when dataType is SYSTEMCODE, otherwise invalid |
dataTypePrecision | integer <int32> ( 0 .. 38 ] Precision of decimal type (1-38), required when dataType is DECIMAL, otherwise cannot be filled |
dataTypeScale | integer <int32> >= 0 Decimal precision (0-value of dataTypeScale), required when dataType is DECIMAL, otherwise cannot be filled |
defaultValue | string <= 1024 characters Default value |
displayName required | string <= 255 characters Name |
enName required | string Alias, instance attribute cannot exceed 128, template attribute cannot exceed 64 |
hasKeyRelation | boolean Whether it has an object key relationship (for display purposes, invalid for creation and modification) |
historical | boolean Default: false Whether to store historical values. Not applicable for DECIMAL/FILE/OBJECT types, required for others |
persistent | boolean Default: false Whether it is persistent |
readWriteMode required | string Enum: "READ_ONLY" "READ_WRITE" Read-write mode
|
stringMaxLength | integer <int32> > 0 Maximum length of string (1-16777215), required when dataType is STRING, otherwise cannot be filled |
valueScale | integer <int32> >= 0 Value decimal precision, required for FLOAT (0-6)/DOUBLE (0-15)/DECIMAL (0-value of dataTypeScale), otherwise cannot be filled |
appAccessMode required | string Enum: "PUBLIC" "PRIVATE" Whether it is visible to other apps
|
appName | string <= 128 characters Deprecated This field name is incorrect and has been deprecated. Please use the 'appId' field. The current version is still valid and has the same functionality as 'appId'. |
appId | string <= 128 characters Unique identifier for the app, the ID of the app to which the attribute belongs. Either appName or appId must be non-empty. |
appShowName | string <= 255 characters App display name, for display only, not applicable during creation |
namespace | string <= 64 characters Default: "system" Namespace |
max | integer <int64> Upper limit of the range |
min | integer <int64> Lower limit of the range |
maxValue | number <float> Upper limit |
minValue | number <float> Lower limit |
unit | string <= 64 characters Unit |
compress | boolean Whether to configure compression parameters (effective when selecting historical values) |
paramValue | string <= 255 characters Parameter value (effective when compress = true) |
paramUnit | string <= 32 characters Enum: "%" "Parameters" Parameter unit (effective when compress = true), available units: %, engineering parameter |
maxRisingPeriod | integer <int32> Maximum rising period (effective when compress = true), unit (seconds) |
labelIds | Array of integers <int64> <= 100 items [ items <int64 > ] Labels |
unique | boolean Deprecated Default: false Whether it is unique (this field is deprecated and no longer effective) |
display | boolean Default: false Whether it is the main display field. Not applicable to entity template attributes |
Responses
Request samples
- Payload
{- "comment": "This is a test template",
- "dataType": "LONG",
- "subDataType": "LONG",
- "dataTypePrecision": 0,
- "dataTypeScale": 0,
- "defaultValue": "666",
- "displayName": "p1",
- "enName": "p1",
- "hasKeyRelation": false,
- "historical": false,
- "persistent": false,
- "readWriteMode": "READ_ONLY",
- "stringMaxLength": 0,
- "valueScale": 2,
- "appAccessMode": "PUBLIC",
- "appName": "system",
- "appId": "system",
- "appShowName": "system",
- "namespace": "system",
- "max": 100,
- "min": 0,
- "maxValue": 100.88,
- "minValue": 0.88,
- "unit": "kg",
- "compress": true,
- "paramValue": "0.2",
- "paramUnit": "%",
- "maxRisingPeriod": 600,
- "labelIds": [
- 12333
], - "unique": false,
- "display": false
}
Response samples
- 200
- 500
{- "code": 200,
- "data": 19999,
- "detail": "string",
- "message": "ok"
}
List Template Self Attributes
Authorizations:
path Parameters
templateNamespace required | string Example: system template namespace, e.g., system |
templateName required | string Example: t1 Template alias, e.g., t1 |
query Parameters
pageIndex required | integer <int32> Example: pageIndex=1 Page number, e.g., 1 |
pageSize required | integer <int32> Example: pageSize=20 Number of data entries per page, maximum 500, e.g., 20 |
Responses
Response samples
- 200
- 500
{- "code": 200,
- "data": {
- "data": [
- {
- "comment": "This is a test template",
- "dataType": "LONG",
- "subDataType": "LONG",
- "dataTypePrecision": 0,
- "dataTypeScale": 0,
- "defaultValue": "666",
- "displayName": "p1",
- "enName": "p1",
- "hasKeyRelation": false,
- "historical": false,
- "persistent": false,
- "readWriteMode": "READ_ONLY",
- "stringMaxLength": 0,
- "valueScale": 2,
- "id": 12345,
- "templateId": 12222,
- "sourceFunctionSetId": 12221,
- "instanceId": "12223",
- "labelIds": [
- 11111
], - "deletable": true,
- "editable": true,
- "max": 100,
- "min": 0,
- "maxValue": 100.88,
- "minValue": 0.88,
- "namespace": "system",
- "unit": "kg",
- "templateName": "Template_12",
- "templateNamespace": "system",
- "unique": false,
- "display": false
}
], - "pageIndex": 1,
- "pageSize": 20,
- "total": 100
}, - "detail": "string",
- "message": "ok"
}
Update Template Attribute
Authorizations:
path Parameters
templateNamespace required | string Example: system Template namespace, e.g., system |
templateName required | string Example: t1 Template alias, e.g., t1 |
attributeNamespace required | string Example: system Attribute namespace, e.g., system |
attributeName required | string Example: attribute1 Attribute alias, e.g., attribute1 |
Request Body schema: application/json
dto
appAccessMode required | string Enum: "PUBLIC" "PRIVATE" Whether it can be seen in other apps
|
comment | string Description |
compress | boolean Default: false Whether to compress (effective when selecting historical values). |
defaultValue | string Default value (using INTEGER type as an example). |
displayName | string Name |
historical | boolean Default: false Whether to store historical values. |
labelIds | Array of integers <int64> [ items <int64 > ] Label |
max | integer <int64> Upper limit of the range |
maxRisingPeriod | integer <int32> Maximum reporting period (effective when compress = true), unit (seconds). |
min | integer <int64> Minimum range |
maxValue | number <float> Upper limit |
minValue | number <float> Lower limit |
paramUnit | string Parameter unit (effective when compress = true), optional units (% for percentage, engineering parameters). |
paramValue | string Parameter value (effective when compress = true). |
persistent | boolean Default: false Whether to persist. |
readWriteMode | string Enum: "READ_ONLY" "READ_WRITE" Read-write mode
|
unit | string 单位 |
useDisplayField | boolean Default: false Whether to enable the primary display field (effective when the attribute type is object). |
valueScale | integer <int32> Value decimal precision |
unique | boolean Deprecated Default: false Whether it is unique. This field is deprecated and no longer effective. |
display | boolean Default: false Whether it is used as the primary display field. Not applicable to entity template attributes. |
Responses
Request samples
- Payload
{- "appAccessMode": "PUBLIC",
- "comment": "edited attribute",
- "compress": false,
- "defaultValue": "12",
- "displayName": "udpateAttribute1",
- "historical": false,
- "labelIds": [
- 15555
], - "max": 100,
- "maxRisingPeriod": 900,
- "min": 1,
- "maxValue": 100.88,
- "minValue": 0.88,
- "paramUnit": "%",
- "paramValue": "0.2",
- "persistent": false,
- "readWriteMode": "READ_ONLY",
- "unit": "kg",
- "useDisplayField": false,
- "valueScale": 2,
- "unique": false,
- "display": false
}
Response samples
- 200
- 500
{- "code": 200,
- "message": "ok"
}
Delete Template Attribute
Authorizations:
path Parameters
templateNamespace required | string Example: system Template namespace, e.g., system |
templateName required | string Example: t1 Template alias, e.g., t1 |
attributeNamespace required | string Example: system Attribute namespace, e.g., system |
attributeName required | string Example: attribute1 Attribute alias, e.g., attribute1 |
Responses
Response samples
- 200
- 500
{- "code": 200,
- "message": "ok"
}
Create Entity Instance Attribute
Authorizations:
path Parameters
templateNamespace required | string Example: system Template namespace, e.g., system |
templateName required | string Example: t1 Template alias, e.g., t1 |
instanceName required | string Example: instance1 instance alias, e.g., instance1 |
Request Body schema: application/json
createInstanceAttribute
comment | string <= 1024 characters Description |
dataType required | string Enum: "BOOLEAN" "INTEGER" "LONG" "FLOAT" "DOUBLE" "DATE" "DATETIME" "FILE" "STRING" "DECIMAL" "OBJECT" "SYSTEMCODE" Data type (OBJECT type only possible in queries, not available for creation in OpenAPI)
|
subDataType | string <= 200 characters Sub data type, required when dataType is SYSTEMCODE, otherwise invalid |
dataTypePrecision | integer <int32> ( 0 .. 38 ] Precision of decimal type (1-38), required when dataType is DECIMAL, otherwise cannot be filled |
dataTypeScale | integer <int32> >= 0 Decimal precision (0-value of dataTypeScale), required when dataType is DECIMAL, otherwise cannot be filled |
defaultValue | string <= 1024 characters Default value |
displayName required | string <= 255 characters Name |
enName required | string Alias, instance attribute cannot exceed 128, template attribute cannot exceed 64 |
hasKeyRelation | boolean Whether it has an object key relationship (for display purposes, invalid for creation and modification) |
historical | boolean Default: false Whether to store historical values. Not applicable for DECIMAL/FILE/OBJECT types, required for others |
persistent | boolean Default: false Whether it is persistent |
readWriteMode required | string Enum: "READ_ONLY" "READ_WRITE" Read-write mode
|
stringMaxLength | integer <int32> > 0 Maximum length of string (1-16777215), required when dataType is STRING, otherwise cannot be filled |
valueScale | integer <int32> >= 0 Value decimal precision, required for FLOAT (0-6)/DOUBLE (0-15)/DECIMAL (0-value of dataTypeScale), otherwise cannot be filled |
appAccessMode required | string Enum: "PUBLIC" "PRIVATE" Whether it is visible to other apps
|
appName | string <= 128 characters Deprecated This field name is incorrect and has been deprecated. Please use the 'appId' field. The current version is still valid and has the same functionality as 'appId'. |
appId | string <= 128 characters Unique identifier for the app, the ID of the app to which the attribute belongs. Either appName or appId must be non-empty. |
appShowName | string <= 255 characters App display name, for display only, not applicable during creation |
namespace | string <= 64 characters Default: "system" Namespace |
max | integer <int64> Upper limit of the range |
min | integer <int64> Lower limit of the range |
maxValue | number <float> Upper limit |
minValue | number <float> Lower limit |
unit | string <= 64 characters Unit |
compress | boolean Whether to configure compression parameters (effective when selecting historical values) |
paramValue | string <= 255 characters Parameter value (effective when compress = true) |
paramUnit | string <= 32 characters Enum: "%" "Parameters" Parameter unit (effective when compress = true), available units: %, engineering parameter |
maxRisingPeriod | integer <int32> Maximum rising period (effective when compress = true), unit (seconds) |
labelIds | Array of integers <int64> <= 100 items [ items <int64 > ] Labels |
object (CreateAttributeBinding) Information required to create attribute binding |
Responses
Request samples
- Payload
{- "comment": "This is a test attribute",
- "dataType": "DOUBLE",
- "defaultValue": "666.1",
- "displayName": "p1",
- "enName": "p22",
- "valueScale": 2,
- "historical": false,
- "persistent": true,
- "readWriteMode": "READ_ONLY",
- "appAccessMode": "PUBLIC",
- "appId": "system",
- "namespace": "system",
- "max": 100,
- "min": 0,
- "maxValue": 100.123,
- "minValue": 0.123,
- "unit": "kg",
- "compress": true,
- "paramValue": "0.2",
- "paramUnit": "%",
- "maxRisingPeriod": 600,
- "labelIds": [
- 12333
], - "attributeBindRelation": {
- "bindType": "EXPRESSION",
- "expressionBindRelation": {
- "expression": "PROP(\"system.t2.instance2.system.p1\") + 1.1"
}
}
}
Response samples
- 200
- 400
{- "code": 200,
- "data": 19999,
- "detail": "string",
- "message": "ok"
}
Batch Create Entity Instance Attributes
Maximum 100 at a time
Authorizations:
path Parameters
templateNamespace required | string Example: system Template namespace, e.g., system |
templateName required | string Example: t1 Template alias, e.g., t1 |
instanceName required | string Example: instance1 Instance alias, e.g., instance1 |
Request Body schema: application/json
ListCreateInstanceAttribute
comment | string <= 1024 characters Description |
dataType required | string Enum: "BOOLEAN" "INTEGER" "LONG" "FLOAT" "DOUBLE" "DATE" "DATETIME" "FILE" "STRING" "DECIMAL" "OBJECT" "SYSTEMCODE" Data type (OBJECT type only possible in queries, not available for creation in OpenAPI)
|
subDataType | string <= 200 characters Sub data type, required when dataType is SYSTEMCODE, otherwise invalid |
dataTypePrecision | integer <int32> ( 0 .. 38 ] Precision of decimal type (1-38), required when dataType is DECIMAL, otherwise cannot be filled |
dataTypeScale | integer <int32> >= 0 Decimal precision (0-value of dataTypeScale), required when dataType is DECIMAL, otherwise cannot be filled |
defaultValue | string <= 1024 characters Default value |
displayName required | string <= 255 characters Name |
enName required | string Alias, instance attribute cannot exceed 128, template attribute cannot exceed 64 |
hasKeyRelation | boolean Whether it has an object key relationship (for display purposes, invalid for creation and modification) |
historical | boolean Default: false Whether to store historical values. Not applicable for DECIMAL/FILE/OBJECT types, required for others |
persistent | boolean Default: false Whether it is persistent |
readWriteMode required | string Enum: "READ_ONLY" "READ_WRITE" Read-write mode
|
stringMaxLength | integer <int32> > 0 Maximum length of string (1-16777215), required when dataType is STRING, otherwise cannot be filled |
valueScale | integer <int32> >= 0 Value decimal precision, required for FLOAT (0-6)/DOUBLE (0-15)/DECIMAL (0-value of dataTypeScale), otherwise cannot be filled |
appAccessMode required | string Enum: "PUBLIC" "PRIVATE" Whether it is visible to other apps
|
appName | string <= 128 characters Deprecated This field name is incorrect and has been deprecated. Please use the 'appId' field. The current version is still valid and has the same functionality as 'appId'. |
appId | string <= 128 characters Unique identifier for the app, the ID of the app to which the attribute belongs. Either appName or appId must be non-empty. |
appShowName | string <= 255 characters App display name, for display only, not applicable during creation |
namespace | string <= 64 characters Default: "system" Namespace |
max | integer <int64> Upper limit of the range |
min | integer <int64> Lower limit of the range |
maxValue | number <float> Upper limit |
minValue | number <float> Lower limit |
unit | string <= 64 characters Unit |
compress | boolean Whether to configure compression parameters (effective when selecting historical values) |
paramValue | string <= 255 characters Parameter value (effective when compress = true) |
paramUnit | string <= 32 characters Enum: "%" "Parameters" Parameter unit (effective when compress = true), available units: %, engineering parameter |
maxRisingPeriod | integer <int32> Maximum rising period (effective when compress = true), unit (seconds) |
labelIds | Array of integers <int64> <= 100 items [ items <int64 > ] Labels |
object (CreateAttributeBinding) Information required to create attribute binding |
Responses
Request samples
- Payload
[- {
- "comment": "This is a test attribute",
- "dataType": "LONG",
- "defaultValue": "666",
- "displayName": "p1",
- "enName": "p22",
- "historical": false,
- "persistent": false,
- "readWriteMode": "READ_ONLY",
- "appAccessMode": "PUBLIC",
- "appId": "system",
- "namespace": "system",
- "max": 100,
- "min": 0,
- "maxValue": 100.5,
- "minValue": 0.5,
- "unit": "kg",
- "compress": true,
- "paramValue": "0.2",
- "paramUnit": "%",
- "maxRisingPeriod": 600,
- "labelIds": [
- 12333
], - "attributeBindRelation": {
- "bindType": "STATISTIC_ABSOLUTE",
- "statisticBindRelation": {
- "enableMarkPeriod": true,
- "endTime": "2022-09-11T00:41:20Z",
- "insValueType": "START_TIME",
- "markPeriodType": "DELAY",
- "markPeriodValue": 1,
- "sourceAttributeFullPath": "system.t1.i1.system.p1",
- "startTime": "2022-09-10T00:41:15Z",
- "statisticFunction": "INS",
- "statisticPeriod": 1,
- "statisticPeriodUnit": "MINUTE"
}
}
}
]
Response samples
- 400
{- "code": 10001009,
- "message": "Template with full name (namespace.alias) system.t1 not found",
- "data": { },
- "detail": "string"
}
Update Object Instance Attribute
Authorizations:
path Parameters
templateNamespace required | string Example: system Template namespace, e.g., system |
templateName required | string Example: t1 Template alias, e.g., t1 |
instanceName required | string Example: isntance1 Instance alias, e.g., instance1 |
attributeNamespace required | string Example: system Attribute namespace, e.g., system |
attributeName required | string Example: attribute1 Attribute alias, e.g., attribute1 |
Request Body schema: application/json
dto
appAccessMode required | string Enum: "PUBLIC" "PRIVATE" Whether it can be seen in other apps
|
comment | string Description |
compress | boolean Default: false Whether to compress (effective when selecting historical values). |
defaultValue | string Default value (using INTEGER type as an example). |
displayName | string Name |
historical | boolean Default: false Whether to store historical values. |
labelIds | Array of integers <int64> [ items <int64 > ] Label |
max | integer <int64> Upper limit of the range |
maxRisingPeriod | integer <int32> Maximum reporting period (effective when compress = true), unit (seconds). |
min | integer <int64> Minimum range |
maxValue | number <float> Upper limit |
minValue | number <float> Lower limit |
paramUnit | string Parameter unit (effective when compress = true), optional units (% for percentage, engineering parameters). |
paramValue | string Parameter value (effective when compress = true). |
persistent | boolean Default: false Whether to persist. |
readWriteMode | string Enum: "READ_ONLY" "READ_WRITE" Read-write mode
|
unit | string 单位 |
useDisplayField | boolean Default: false Whether to enable the primary display field (effective when the attribute type is object). |
valueScale | integer <int32> Value decimal precision |
Responses
Request samples
- Payload
{- "appAccessMode": "PUBLIC",
- "comment": "edited attribute",
- "compress": false,
- "defaultValue": "12",
- "displayName": "udpateAttribute1",
- "historical": false,
- "labelIds": [
- 15555
], - "max": 100,
- "maxRisingPeriod": 900,
- "min": 1,
- "maxValue": 100.88,
- "minValue": 0.88,
- "paramUnit": "%",
- "paramValue": "0.2",
- "persistent": false,
- "readWriteMode": "READ_ONLY",
- "unit": "kg",
- "useDisplayField": false,
- "valueScale": 2
}
Response samples
- 200
- 500
{- "code": 200,
- "message": "ok"
}
Delete Extended Attribute of Object Template Instance
Authorizations:
path Parameters
templateNamespace required | string Example: system Template namespace, e.g., system |
templateName required | string Example: t1 Template alias, e.g., t1 |
instanceName required | string Example: instance1 Instance alias, e.g., instance1 |
attributeNamespace required | string Example: system Attribute namespace, e.g., system |
attributeName required | string Example: attribute Attribute alias, e.g., attribute1 |
Responses
Response samples
- 200
- 500
{- "code": 200,
- "message": "ok"
}
List Instance Self Attributes
Authorizations:
path Parameters
templateNamespace required | string Example: system Template namespace, e.g., system |
templateName required | string Example: t1 Template alias, e.g., t1 |
instanceName required | string Example: instance1 Instance alias, e.g., instance1 |
query Parameters
pageIndex required | integer <int32> Example: pageIndex=1 Page index, e.g., 1 |
pageSize required | integer <int32> Example: pageSize=20 Number of data entries per page cannot exceed 500, e.g., 20 |
Responses
Response samples
- 200
- 500
{- "code": 200,
- "data": {
- "data": [
- {
- "comment": "This is a test template",
- "dataType": "LONG",
- "subDataType": "LONG",
- "dataTypePrecision": 0,
- "dataTypeScale": 0,
- "defaultValue": "666",
- "displayName": "p1",
- "enName": "p1",
- "hasKeyRelation": false,
- "historical": false,
- "persistent": false,
- "readWriteMode": "READ_ONLY",
- "stringMaxLength": 0,
- "valueScale": 2,
- "id": 12345,
- "templateId": 12222,
- "sourceFunctionSetId": 12221,
- "instanceId": "12223",
- "labelIds": [
- 11111
], - "deletable": true,
- "editable": true,
- "max": 100,
- "min": 0,
- "maxValue": 100.88,
- "minValue": 0.88,
- "namespace": "system",
- "unit": "kg",
- "templateName": "Template_12",
- "templateNamespace": "system",
- "unique": false,
- "display": false,
- "existAlarm": false,
- "value": "string"
}
], - "pageIndex": 1,
- "pageSize": 20,
- "total": 100
}, - "detail": "string",
- "message": "ok"
}
Search Label Category List
Authorizations:
query Parameters
keyword | string Example: keyword=xx Keyword for fuzzy matching of name or alias, e.g., xx |
pageIndex required | integer <int32> Example: pageIndex=1 Page number, e.g., 1 |
pageSize required | integer <int32> Example: pageSize=20 Number of data items per page, maximum limit is 500, e.g., 20 |
Responses
Response samples
- 200
- 500
{- "code": 200,
- "data": {
- "data": [
- {
- "appAccessMode": "PUBLIC",
- "appName": "system",
- "appId": "system",
- "comment": "This is a test label",
- "displayName": "Category 1",
- "enName": "labelCategory1",
- "namespace": "system",
- "id": 17777
}
], - "pageIndex": 1,
- "pageSize": 20,
- "total": 100
}, - "detail": "string",
- "message": "ok"
}
Create Label Category
Authorizations:
Request Body schema: application/json
createLabelCategoryDto
appAccessMode required | string Enum: "PUBLIC" "PRIVATE" Whether it can be seen in other apps
|
appName | string <= 128 characters Deprecated This field name is incorrect and has been deprecated. Please use the 'appId' field. The usage is the same as 'appId'. |
appId | string <= 128 characters App unique identifier, ID of the app to which the event belongs |
comment | string Description |
displayName required | string <= 128 characters Name |
enName required | string <= 64 characters Alias |
namespace | string <= 64 characters Default: "system" Namespace |
Responses
Request samples
- Payload
{- "appAccessMode": "PUBLIC",
- "appName": "system",
- "appId": "system",
- "comment": "This is a test label",
- "displayName": "Category 1",
- "enName": "labelCategory1",
- "namespace": "system"
}
Response samples
- 200
- 500
{- "code": 200,
- "data": 19999,
- "detail": "string",
- "message": "ok"
}
Get Label/Category
Authorizations:
path Parameters
namespace required | string Example: system Label namespace, e.g., system |
name required | string Example: label1 Label alias, e.g., label1 |
Responses
Response samples
- 200
- 500
{- "code": 200,
- "data": {
- "appAccessMode": "PUBLIC",
- "appName": "system",
- "appId": "system",
- "comment": "This is a test label",
- "displayName": "Category 1",
- "enName": "labelCategory1",
- "namespace": "system",
- "id": 17778
}, - "detail": "string",
- "message": "ok"
}
Search All Labels
Authorizations:
query Parameters
keyword | string Example: keyword=xx Keyword for fuzzy matching of name or alias, e.g., xx |
pageIndex required | integer <int32> Example: pageIndex=1 Page number, e.g., 1 |
pageSize required | integer <int32> Example: pageSize=20 Number of data items per page, maximum limit is 500, e.g., 20 |
categoryId | integer <int64> Example: categoryId=402 Category ID, e.g., 402 |
metadataType | string Enum: "ATTRIBUTE" "EVENT" "SERVICE" "SUBSCRIPTION" Example: metadataType=ATTRIBUTE Metadata type (restricts all labels marked with this metadata type, used in conjunction with specified template or instance), e.g., ATTRIBUTE
|
excludeMetadata | boolean Default: false Example: excludeMetadata=false Excludes all labels marked with metadata, used in conjunction with metadataType. This field is invalid when metadataType is empty. |
templateName | string Example: templateName=t1 Template alias. This parameter needs to be passed in conjunction with the templateNamespace parameter; otherwise, the template cannot be queried. This field is invalid when metadataType is empty. |
templateNamespace | string Example: templateNamespace=system Template namespace. This parameter needs to be passed in conjunction with the templateName parameter; otherwise, the template cannot be queried. This field is invalid when metadataType is empty. |
instanceName | string Example: instanceName=instance1 Instance alias. This parameter needs to be used in conjunction with metadataType. This field is invalid when metadataType is empty. |
Responses
Response samples
- 200
- 500
{- "code": 200,
- "data": {
- "data": [
- {
- "appAccessMode": "PUBLIC",
- "appName": "system",
- "appId": "system",
- "comment": "This is a test label",
- "displayName": "Category 1",
- "enName": "labelCategory1",
- "namespace": "system",
- "id": 17778
}
], - "pageIndex": 1,
- "pageSize": 20,
- "total": 100
}, - "detail": "string",
- "message": "ok"
}
Labels
Authorizations:
Request Body schema: application/json
createLabelDto
appAccessMode required | string Enum: "PUBLIC" "PRIVATE" Whether it can be seen in other apps
|
appName | string <= 128 characters Deprecated This field name is incorrect and has been deprecated. Please use the 'appId' field. The usage is the same as 'appId'. |
appId | string <= 128 characters App unique identifier, ID of the app to which the event belongs |
comment | string Description |
displayName required | string <= 128 characters Name |
enName required | string <= 64 characters Alias |
namespace | string <= 64 characters Default: "system" Namespace |
categoryId required | integer <int64> Category id |
Responses
Request samples
- Payload
{- "appAccessMode": "PUBLIC",
- "appName": "system",
- "appId": "system",
- "comment": "This is a test label",
- "displayName": "Category 1",
- "enName": "labelCategory1",
- "namespace": "system",
- "categoryId": 17777
}
Response samples
- 200
- 500
{- "code": 200,
- "data": 19999,
- "detail": "string",
- "message": "ok"
}
Unbind Labels from Instance
Authorizations:
path Parameters
templateNamespace required | string Example: system Template namespace, e.g., system |
templateName required | string Example: t1 Template alias, e.g., t1 |
Request Body schema: application/json
dto
instanceNames | Array of strings Instance aliases list |
labelIds | Array of integers <int64> [ items <int64 > ] Label id list |
Responses
Request samples
- Payload
{- "instanceNames": [
- "instance1"
], - "labelIds": [
- 14444
]
}
Response samples
- 200
- 500
{- "code": 200,
- "message": "ok"
}
Bind Labels to Instance
Authorizations:
path Parameters
templateNamespace required | string Example: system Template namespace, e.g., system |
templateName required | string Example: t1 Template alias, e.g., t1 |
instanceName required | string Example: instance1 Instance alias, e.g., instance1 |
Request Body schema: application/json
dto
instanceId | string Deprecated Instance ID, deprecated field, use the Instance ID obtained based on the path |
labelIds | Array of integers <int64> [ items <int64 > ] Labelid |
relationId | integer <int64> Deprecated Relation ID, deprecated field |
templateId | integer <int64> Deprecated Template ID, deprecated field, use the Template ID obtained based on the path |
Responses
Request samples
- Payload
{- "instanceId": "10001",
- "labelIds": [
- 12222
], - "relationId": 12333,
- "templateId": 12332
}
Response samples
- 200
- 500
{- "code": 200,
- "message": "ok"
}
List Networks
Authorizations:
query Parameters
keyword | string Example: keyword=n1 Keyword for fuzzy matching of name or alias, e.g., n1 |
pageIndex | integer <int32> Default: 1 Example: pageIndex=2 Page number, e.g., 2 |
pageSize | integer <int32> Default: 20 Example: pageSize=10 Number of data items per page, maximum limit is 500, e.g., 10 |
Responses
Response samples
- 200
- 500
{- "code": 200,
- "data": {
- "data": [
- {
- "comment": "This is a test query for network",
- "displayName": "network1",
- "enName": "network1",
- "id": 15555
}
], - "pageIndex": 1,
- "pageSize": 20,
- "total": 100
}, - "detail": "string",
- "message": "ok"
}
Create Network
Authorizations:
Request Body schema: application/json
dto
comment | string Description |
displayName required | string <= 128 characters Alias |
enName required | string <= 64 characters Name |
Responses
Request samples
- Payload
{- "comment": "This is a newly-created network",
- "displayName": "network1",
- "enName": "network1"
}
Response samples
- 200
- 500
{- "code": 200,
- "data": 19999,
- "detail": "string",
- "message": "ok"
}
Update Network
Authorizations:
path Parameters
networkName required | string Example: n1 Network alias, e.g., n1 |
Request Body schema: application/json
dto
comment | string Description |
displayName | string Name |
Responses
Request samples
- Payload
{- "comment": "This is an edited network",
- "displayName": "Edited network"
}
Response samples
- 200
- 500
{- "code": 200,
- "message": "ok"
}
Create Network Node
Authorizations:
path Parameters
networkName required | string Example: n1 Network alias, e.g., n1 |
Request Body schema: application/json
dto
instanceName | string Alias of the current node instance |
networkOrder | number <double> Sorting field (after filling, the nodes can be sorted in ascending/descending order based on this field value) |
parentId | integer <int64> Parent node ID. If it is the root node, leave it blank or fill with -1 |
templateName | string Alias of the current node template |
templateNamespace | string Namespace of the current node template |
Responses
Request samples
- Payload
{- "instanceName": "instance1",
- "networkOrder": 2.3,
- "parentId": -1,
- "templateName": "t1",
- "templateNamespace": "system"
}
Response samples
- 200
- 500
{- "code": 200,
- "data": 19999,
- "detail": "string",
- "message": "ok"
}
Get Subtree of Current Node
Authorizations:
path Parameters
networkName required | string Example: n1 Network alias, e.g., n1 |
nodeId required | integer <int64> Example: 12222 Node ID, e.g., 12222 |
query Parameters
needParent | boolean Default: false Example: needParent=true Whether to include parent node, e.g., true |
excludeTemplateName | Array of strings Example: excludeTemplateName=t1 exclude template name, e.g., t1 |
deep | integer <int32> Default: -1 Example: deep=1 Query depth, how many layers of byte point queries, e.g., 1 |
needAttributeValue | boolean Default: false Example: needAttributeValue=true Whehter to need attribute value,(set within the content), e.g., true |
needLabels | boolean Default: false Example: needLabels=true whether to need labels, e.g., true |
Responses
Response samples
- 200
- 500
{- "code": 200,
- "data": {
- "children": [
- { }
], - "content": { },
- "hasChildren": false,
- "instanceName": "instance1",
- "networkOrder": 2.3,
- "nodeId": 12456,
- "parent": { },
- "parentNodeId": 12455,
- "templateName": "t1",
- "templateNamespace": "system",
- "labels": [
- "label1"
]
}, - "detail": "string",
- "message": "ok"
}
Update Network Node
Authorizations:
path Parameters
networkName required | string Example: n1 Network alias, e.g., n1 |
nodeId required | integer <int64> Example: 12222 Node ID, e.g., 12222 |
Request Body schema: application/json
dto
networkOrder | number <double> Sorting field (after filling, the nodes can be sorted in ascending/descending order based on this field value) |
parentId | integer <int64> Parent node ID |
Responses
Request samples
- Payload
{- "networkOrder": 2.3,
- "parentId": 16666
}
Response samples
- 200
- 500
{- "code": 200,
- "message": "ok"
}
Get Network Tree Node
Authorizations:
path Parameters
networkName required | string Example: n1 Network alias, e.g., n1 |
query Parameters
excludeTemplateName | Array of strings Example: excludeTemplateName=t1 Exclude specified template, e.g., t1 |
deep | integer <int32> Default: -1 Example: deep=-1 Query depth, i.e., how many layers of child nodes to query, e.g., -1 |
needLabels | boolean Default: false Example: needLabels=true Whether to need labels, e.g., true |
needAttributeValue | boolean Default: false Example: needAttributeValue=true Whether to include attribute values (set in content), e.g., true |
Responses
Response samples
- 200
- 500
{- "code": 200,
- "data": {
- "children": [
- { }
], - "content": { },
- "hasChildren": false,
- "instanceName": "instance1",
- "networkOrder": 2.3,
- "nodeId": 12456,
- "parent": { },
- "parentNodeId": 12455,
- "templateName": "t1",
- "templateNamespace": "system",
- "labels": [
- "label1"
]
}, - "detail": "string",
- "message": "ok"
}
Create Template
Authorizations:
Request Body schema: application/json
dto
appAccessMode required | string Enum: "PUBLIC" "PRIVATE" Whether it can be seen in other apps
|
appName | string <= 128 characters Deprecated This field name is incorrect and has been deprecated. Please use the 'appId' field. The current version is still valid and has the same functionality as 'appId'. |
appId | string <= 128 characters Unique identifier for the app, the ID of the app to which the attribute belongs. Either appName or appId must be non-empty. |
comment | string Description |
displayAttributes | Array of integers <int64> [ items <int64 > ] Main Display Field ID |
displayName required | string <= 128 characters Name |
enName required | string <= 64 characters Alias |
fileName | string Icon Name (For display only. Can skip filling it when creating an account) |
functionSetIds | Array of integers <int64> [ items <int64 > ] 功能集Function set ID and name合id列表 |
iconPath | string Icon path |
labelIds | Array of integers <int64> [ items <int64 > ] Label ID list |
namespace | string <= 64 characters Default: "system" Namespace |
parentId required | integer <int64> Parent Template id |
type required | string Enum: "ENTITY" "FORM" Template type (the same as the parent template)
|
dataUsedBy | string Default: "USER" Enum: "SYSTEM" "USER" The nature of data usage. If not specified, it will search within all scopes.
|
Array of objects (CreateTemplateAttributeWithAlarm) | |
Array of objects (CreateEvent) | |
Array of objects (CreateService) | |
Array of objects (CreateSubscription) |
Responses
Request samples
- Payload
{- "appAccessMode": "PUBLIC",
- "appName": "system",
- "appId": "system",
- "comment": "Template created",
- "displayAttributes": [
- 14444
], - "displayName": "t1",
- "enName": "t1",
- "fileName": "boatxxx.png",
- "functionSetIds": [
- 10016
], - "iconPath": "/api/config/download?fileName=2021-03-02/1614673872183/boatxxx.png",
- "labelIds": [
- 10017
], - "namespace": "system",
- "parentId": 10018,
- "type": "ENTITY",
- "dataUsedBy": "USER",
- "attributeDtos": [
- {
- "comment": "This is a test template",
- "dataType": "LONG",
- "subDataType": "LONG",
- "dataTypePrecision": 0,
- "dataTypeScale": 0,
- "defaultValue": "666",
- "displayName": "p1",
- "enName": "p1",
- "hasKeyRelation": false,
- "historical": false,
- "persistent": false,
- "readWriteMode": "READ_ONLY",
- "stringMaxLength": 0,
- "valueScale": 2,
- "appAccessMode": "PUBLIC",
- "appName": "system",
- "appId": "system",
- "appShowName": "system",
- "namespace": "system",
- "max": 100,
- "min": 0,
- "maxValue": 100.88,
- "minValue": 0.88,
- "unit": "kg",
- "compress": true,
- "paramValue": "0.2",
- "paramUnit": "%",
- "maxRisingPeriod": 600,
- "labelIds": [
- 12333
], - "unique": false,
- "display": false,
- "alarms": [
- {
- "displayName": "Alarm 1",
- "priority": 2,
- "enable": false,
- "operator": "EQ",
- "limitValue": "11",
- "deadBand": 12,
- "deadBandType": "NUMERIC",
- "comment": "Test data",
- "alarmType": "Test alarm"
}
]
}
], - "eventDtos": [
- {
- "appAccessMode": "PUBLIC",
- "appName": "system",
- "appId": "system",
- "comment": "test data",
- "dataSetId": 501,
- "displayName": "event1",
- "enName": "event1",
- "labelIds": [
- 11131
], - "namespace": "system"
}
], - "serviceDtos": [
- {
- "appAccessMode": "PUBLIC",
- "appName": "system",
- "appId": "system",
- "comment": "test data",
- "displayName": "service1",
- "enName": "service1",
- "inputs": [
- {
- "appAccessMode": "PUBLIC",
- "appName": "system",
- "appId": "system",
- "comment": "test data",
- "dataType": "BOOLEAN",
- "defaultValue": "string",
- "displayName": "filed1",
- "enName": "filed1",
- "id": 11135,
- "jsonDesc": "{'name':'string'}",
- "namespace": "system",
- "referDataDisplayName": "ds1",
- "referDataSetEnName": "ds1",
- "referDataSetId": 12222,
- "required": false
}
], - "labelIds": [
- 11132
], - "namespace": "system",
- "out": {
- "appAccessMode": "PUBLIC",
- "appName": "system",
- "appId": "system",
- "comment": "test data",
- "dataType": "BOOLEAN",
- "defaultValue": "string",
- "displayName": "filed1",
- "enName": "filed1",
- "id": 11135,
- "jsonDesc": "{'name':'string'}",
- "namespace": "system",
- "referDataDisplayName": "ds1",
- "referDataSetEnName": "ds1",
- "referDataSetId": 12222,
- "required": false
}, - "script": "print('1');"
}
], - "subscriptionDtos": [
- {
- "enName": "s1",
- "displayName": "s1",
- "comment": "This is a subscription",
- "appShowName": "aaaa",
- "appAccessMode": "PUBLIC",
- "namespace": "system",
- "script": "log.debug(1111);",
- "triggerType": "EVENT",
- "appName": "system",
- "appId": "system",
- "timingTrigger": {
- "enable": false,
- "end": "2020-12-15T02:56:51Z",
- "periodMs": 60,
- "start": "2020-12-15T02:56:50Z"
}, - "eventTriggers": [
- {
- "attributeId": 11134,
- "eventId": 11135,
- "instanceId": "11136",
- "templateId": 11137
}
]
}
]
}
Response samples
- 200
- 500
{- "code": 200,
- "data": 19999,
- "detail": "string",
- "message": "ok"
}
Get All Templates under an App Deprecated
The URL of this API is named incorrectly and has been deprecated. Please use the /v2/appIds/{appId}/templates API. The current version is still valid and has the same functionality as /v2/appIds/{appId}/templates.
Authorizations:
query Parameters
appName required | string <= 128 characters Example: appName=system App name, e.g., system |
pageIndex required | integer <int32> >= 1 Example: pageIndex=1 Page number, e.g., 1 |
pageSize required | integer <int32> <= 500 Example: pageSize=20 Number of data entries per page, maximum of 500, e.g., 20 |
Responses
Response samples
- 200
- 500
{- "code": 200,
- "data": {
- "data": [
- {
- "editable": true,
- "deletable": true,
- "instanceCreatable": true,
- "instanceQueryable": true,
- "supportInstanceMetadata": true,
- "templateCreatable": true,
- "templateEditable": true,
- "templateQueryable": true,
- "appAccessMode": "PUBLIC",
- "appName": "system",
- "appId": "system",
- "comment": "This is a test template",
- "displayAttributes": [
- {
- "displayName": "Data 1",
- "id": 11119,
- "templateId": 15556
}
], - "displayName": "t1",
- "enName": "t1",
- "fileName": "boatxxx.png",
- "functionSets": [
- {
- "displayName": "Data 1",
- "id": 11119
}
], - "iconPath": "/api/config/download?fileName=2021-03-02/1614673872183/boatxxx.png",
- "id": 11111,
- "labels": [
- {
- "displayName": "Data 1",
- "id": 11119
}
], - "mark": 0,
- "namespace": "system",
- "parent": {
- "displayName": "Data 1",
- "id": 11119
}, - "type": "ENTITY"
}
], - "pageIndex": 1,
- "pageSize": 20,
- "total": 100
}, - "detail": "string",
- "message": "ok"
}
Get All Templates under a Label
Authorizations:
query Parameters
labelId required | integer <int64> Example: labelId=12221 Label ID, e.g., 12221 |
templateTypes | Array of strings Items Enum: "ROOT" "INTERNAL" "EXTERNAL" "RELATION" "ENTITY" "FORM" "REMOTE" "COLLECTOR" "MAPPING" Example: templateTypes=ENTITY Template types, e.g.: ENTITY
|
pageIndex required | integer <int32> Example: pageIndex=1 Page number, e.g., 1 |
pageSize required | integer <int32> Example: pageSize=20 Number of items per page, maximum is 500, e.g., 20 |
Responses
Response samples
- 200
- 500
{- "code": 200,
- "data": {
- "data": [
- {
- "editable": true,
- "deletable": true,
- "instanceCreatable": true,
- "instanceQueryable": true,
- "supportInstanceMetadata": true,
- "templateCreatable": true,
- "templateEditable": true,
- "templateQueryable": true,
- "appAccessMode": "PUBLIC",
- "appName": "system",
- "appId": "system",
- "comment": "This is a test template",
- "displayAttributes": [
- {
- "displayName": "Data 1",
- "id": 11119,
- "templateId": 15556
}
], - "displayName": "t1",
- "enName": "t1",
- "fileName": "boatxxx.png",
- "functionSets": [
- {
- "displayName": "Data 1",
- "id": 11119
}
], - "iconPath": "/api/config/download?fileName=2021-03-02/1614673872183/boatxxx.png",
- "id": 11111,
- "labels": [
- {
- "displayName": "Data 1",
- "id": 11119
}
], - "mark": 0,
- "namespace": "system",
- "parent": {
- "displayName": "Data 1",
- "id": 11119
}, - "type": "ENTITY"
}
], - "pageIndex": 1,
- "pageSize": 20,
- "total": 100
}, - "detail": "string",
- "message": "ok"
}
Get Templates by Alias
Authorizations:
Request Body schema: application/json
dto
Array of objects (NameWithNamespace) Template namespace and alias | |||||
Array
|
Responses
Request samples
- Payload
{- "inputs": [
- {
- "enName": "xxx",
- "namespace": "system"
}
]
}
Response samples
- 200
- 500
{- "code": 200,
- "data": [
- {
- "editable": true,
- "deletable": true,
- "instanceCreatable": true,
- "instanceQueryable": true,
- "supportInstanceMetadata": true,
- "templateCreatable": true,
- "templateEditable": true,
- "templateQueryable": true,
- "appAccessMode": "PUBLIC",
- "appName": "system",
- "appId": "system",
- "comment": "This is a test template",
- "displayAttributes": [
- {
- "displayName": "Data 1",
- "id": 11119,
- "templateId": 15556
}
], - "displayName": "t1",
- "enName": "t1",
- "fileName": "boatxxx.png",
- "functionSets": [
- {
- "displayName": "Data 1",
- "id": 11119
}
], - "iconPath": "/api/config/download?fileName=2021-03-02/1614673872183/boatxxx.png",
- "id": 11111,
- "labels": [
- {
- "displayName": "Data 1",
- "id": 11119
}
], - "mark": 0,
- "namespace": "system",
- "parent": {
- "displayName": "Data 1",
- "id": 11119
}, - "type": "ENTITY"
}
], - "detail": "string",
- "message": "ok"
}
Search Templates
Authorizations:
query Parameters
labelIds | Array of integers <int64> [ items <int64 > ] Example: labelIds=12220 labels, e.g., 12220 |
namespaces | Array of strings Example: namespaces=system Namespaces, e.g., system |
keyword | string Example: keyword=mpl Keyword for fuzzy matching alias names, e.g., 2 |
pageIndex | integer <int32> Default: 1 Example: pageIndex=2 Page index |
pageSize | integer <int32> Default: 20 Example: pageSize=20 Number of data entries per page, with a maximum of 500, e.g., 20 |
templateType | string Enum: "ROOT" "INTERNAL" "EXTERNAL" "RELATION" "ENTITY" "FORM" "REMOTE" "COLLECTOR" "MAPPING" Example: templateType=ENTITY Template type, e.g., ENTITY
|
dataUsedBy | string Default: "USER" Enum: "SYSTEM" "USER" Nature of data usage, e.g., USER
|
Responses
Response samples
- 200
- 500
{- "code": 200,
- "data": {
- "data": [
- {
- "appName": "system",
- "appId": "system",
- "displayName": "t1",
- "enName": "t1",
- "id": 12323,
- "labelIds": [
- 12222
], - "namespace": "system",
- "type": "ENTITY"
}
], - "pageIndex": 1,
- "pageSize": 20,
- "total": 100
}, - "detail": "string",
- "message": "ok"
}
Search for All Apps Where Templates Belongs Deprecated
The URL of this API has a naming error and has been deprecated. Please use the /v2/appIds endpoint. The current version is still valid and has the same functionality as /v2/appIds.
Authorizations:
query Parameters
keyword | string Example: keyword=xx Keyword for fuzzy matching app IDs, e.g., xx |
pageIndex required | integer <int32> >= 1 Example: pageIndex=1 Page index, e.g., 1 |
pageSize required | integer <int32> <= 500 Example: pageSize=20 Number of data entries per page, with a maximum of 500, e.g., 20 |
Responses
Response samples
- 200
- 500
{- "code": 200,
- "data": {
- "data": [
- "app1"
], - "pageIndex": 1,
- "pageSize": 20,
- "total": 100
}, - "detail": "string",
- "message": "ok"
}
Update Template
Authorizations:
path Parameters
templateNamespace required | string Example: system Template namespace, e.g., system |
templateName required | string Example: t1 Template alias, e.g., t1 |
Request Body schema: application/json
dto
appAccessMode required | string Enum: "PUBLIC" "PRIVATE" Whether it can be seen in other apps
|
comment | string Description |
displayAttributes | Array of integers <int64> [ items <int64 > ] Main display field IDs |
displayName | string Name |
functionSetIds | Array of integers <int64> [ items <int64 > ] Function set ID list |
iconPath | string Icon path |
id | integer <int64> ID obtained from the template information on the path will override |
labelIds | Array of integers <int64> [ items <int64 > ] Label ID list |
Responses
Request samples
- Payload
{- "appAccessMode": "PUBLIC",
- "comment": "Modified template",
- "displayAttributes": [
- 12349
], - "displayName": "updatet1",
- "functionSetIds": [
- 12344
], - "iconPath": "/api/config/download?fileName=2021-03-02/1614673872183/boatxxx.png",
- "id": 12345,
- "labelIds": [
- 12343
]
}
Response samples
- 200
- 500
{- "code": 200,
- "message": "ok"
}
Get All Derived Templates
Authorizations:
path Parameters
templateNamespace required | string Example: system Namespace, e.g., system |
templateName required | string Example: t1 Template alias, e.g., t1 |
Responses
Response samples
- 200
- 500
{- "code": 200,
- "data": [
- {
- "editable": true,
- "deletable": true,
- "instanceCreatable": true,
- "instanceQueryable": true,
- "supportInstanceMetadata": true,
- "templateCreatable": true,
- "templateEditable": true,
- "templateQueryable": true,
- "associationType": "BINARY",
- "comment": "This is a test template",
- "displayName": "t1",
- "enName": "t1",
- "id": 16666,
- "leaf": true,
- "namespace": "system",
- "type": "ENTITY"
}
], - "detail": "string",
- "message": "ok"
}
Recursive Search for All Parent Templates
It includes the current template.
Authorizations:
path Parameters
templateNamespace required | string Example: system Namespace of the template, e.g., system |
templateName required | string Example: t1 Template alias, e.g., t1 |
Responses
Response samples
- 200
- 500
{- "code": 200,
- "data": {
- "children": [
- { }
], - "deletable": true,
- "displayName": "t1",
- "editable": true,
- "enName": "t1",
- "id": 13333,
- "namespace": "system",
- "type": "ENTITY"
}, - "detail": "string",
- "message": "ok"
}
List by AppId
Authorizations:
path Parameters
appId required | string <= 128 characters Example: system ID of the app to which the templates belongs |
query Parameters
pageIndex required | integer <int32> >= 1 Example: pageIndex=1 Page number, e.g., 1 |
pageSize required | integer <int32> <= 500 Example: pageSize=20 Number of data entries per page, maximum of 500, e.g., 20 |
Responses
Response samples
- 200
- 400
{- "data": [
- {
- "editable": true,
- "deletable": true,
- "instanceCreatable": true,
- "instanceQueryable": true,
- "supportInstanceMetadata": true,
- "templateCreatable": true,
- "templateEditable": true,
- "templateQueryable": true,
- "appAccessMode": "PUBLIC",
- "appName": "system",
- "appId": "system",
- "comment": "This is a test template",
- "displayAttributes": [
- {
- "displayName": "Data 1",
- "id": 11119,
- "templateId": 15556
}
], - "displayName": "t1",
- "enName": "t1",
- "fileName": "boatxxx.png",
- "functionSets": [
- {
- "displayName": "Data 1",
- "id": 11119
}
], - "iconPath": "/api/config/download?fileName=2021-03-02/1614673872183/boatxxx.png",
- "id": 11111,
- "labels": [
- {
- "displayName": "Data 1",
- "id": 11119
}
], - "mark": 0,
- "namespace": "system",
- "parent": {
- "displayName": "Data 1",
- "id": 11119
}, - "type": "ENTITY"
}
], - "pagination": {
- "total": 10,
- "pageSize": 20,
- "current": 1
}
}
Search for All App IDs
Authorizations:
query Parameters
keyword | string Example: keyword=xx Keyword for fuzzy matching app IDs, e.g., xx |
parentFullName | string Example: parentFullName=system.t1 The full name of the parent class where the metadata belongs. For templates/function sets, the format is namespace.alias; for physical template instances, the format is alias. |
parentType | string Example: parentType=TEMPLATE The type of the parent class where the metadata belongs.
|
metadataType | string Default: "TEMPLATE" Enum: "ATTRIBUTE" "EVENT" "SERVICE" "SUBSCRIPTION" "TEMPLATE" "FUNCTIONSET" "INSTANCE" Example: metadataType=TEMPLATE The type of data query. When metadataType=INSTANCE/ATTRIBUTE/EVENT/SERVICE/SUBSCRIPTION, parentFullName and parentType are required; otherwise, parentFullName and parentType are ignored.
|
pageIndex required | integer <int32> >= 1 Example: pageIndex=1 Page number, e.g., 1 |
pageSize required | integer <int32> <= 500 Example: pageSize=20 Number of data entries per page, maximum is 500, e.g., 20 |
Responses
Response samples
- 200
- 400
{- "data": [
- "App_bac090d688004de9bf927b9ff66bfca7"
], - "pagination": {
- "total": 10,
- "pageSize": 20,
- "current": 1
}
}
Create a Regular Template Instance
Authorizations:
path Parameters
templateNamespace required | string Example: system Template namespace, e.g., system |
templateName required | string Example: t1 Template alias, e.g., t1 |
Request Body schema: application/json
dto
appAccessMode required | string Enum: "PUBLIC" "PRIVATE" Whether it can be seen in other apps
|
appName | string <= 128 characters Deprecated This field name is incorrect and has been deprecated. Please use the appId field. Functionality is the same as appId. |
appId | string <= 128 characters Unique identifier of the app to which the template belongs |
Array of objects (AttributeValueDto) Inherited attribute values | |
code | string code |
comment | string Description |
displayName | string Display name (required for entity template instance) |
enName | string Alias (required for entity template instance) |
functionSetIds | Array of integers <int64> [ items <int64 > ] Function set IDs |
iconPath | string icon |
labelIds | Array of integers <int64> [ items <int64 > ] Label |
Responses
Request samples
- Payload
{- "appAccessMode": "PUBLIC",
- "appName": "system",
- "appId": "system",
- "attributeValues": [
- {
- "attributeName": "p1",
- "attributeNamespace": "system",
- "attributeValue": "123"
}
], - "code": "xxxxx",
- "comment": "Creating a test instance",
- "displayName": "instance1",
- "enName": "instance1",
- "functionSetIds": [
- 12222
], - "iconPath": "/api/config/download?fileName=2021-03-02/1614673872183/boatxxx.png",
- "labelIds": [
- 13333
]
}
Response samples
- 200
- 500
{- "code": 200,
- "data": "13456",
- "detail": "string",
- "message": "ok"
}
Incrementally Update Instance
Operate on the instance of a template (only template attribute values). If the instance exists, update the instance data; otherwise, create a new instance. Maximum 1000 instances can be processed at once. If there are any exceptions such as missing template attributes, mismatched value types, or null unique identifier values in the form data, errors will be prompted and the data will be rolled back. If there are any exceptions in setting real-time values, errors will be prompted and the request will be terminated.
Authorizations:
path Parameters
templateNamespace required | string Example: system Template namespace, e.g., system |
templateName required | string Example: employee Template alias, e.g., employee |
Request Body schema: application/json
instances
Map type:attributeNameapce.attributeEnName:attributeValue
Responses
Request samples
- Payload
[- {
- "system.en_name": "zhangsan"
}
]
Response samples
- 400
{- "code": 10001001,
- "data": { },
- "detail": "string",
- "message": "string",
- "context": { },
- "targetService": "string"
}
Query Instance List under a Regular Template
Query compatible with SQL syntax V2 version
Authorizations:
path Parameters
templateNamespace required | string Example: system Template namespace, e.g., system |
templateName required | string Example: t1 Template alias, e.g., t1 |
query Parameters
pageIndex | integer <int32> Example: pageIndex=1 Page number, e.g., 1 |
pageSize | integer <int32> Example: pageSize=20 Number of data entries per page cannot exceed 500, e.g., 20 |
needExtAttribute | boolean Default: false Example: needExtAttribute=true Whether to include the static values of extended attributes, e.g., true |
Request Body schema: application/json
query
distinct | boolean Whether to perform data deduplication |
Array of objects (OrderBy) | |
selectAttributeNames | Array of strings |
object (ConditionGroup) |
Responses
Request samples
- Payload
{- "distinct": true,
- "orderBys": [
- {
- "by": [
- "time"
], - "order": "ASC"
}
], - "selectAttributeNames": [
- "p1"
], - "where": {
- "conditions": [
- {
- "attributeName": "p1",
- "operator": "=",
- "value": { }
}
], - "logicOperator": "AND"
}
}
Response samples
- 200
- 500
{- "code": 200,
- "data": {
- "data": [
- {
- "system_app_name": "system",
- "system_last_modified_time": "2021-03-02 03:15:24"
}
], - "pageIndex": 1,
- "pageSize": 20,
- "total": 100
}, - "detail": "string",
- "message": "ok"
}
Update Template Instance
Authorizations:
path Parameters
templateNamespace required | string Example: system Template namespace, e.g., system |
templateName required | string Example: t1 Template alias, e.g., t1 |
instanceName required | string Example: insatnce1 Instance alias, e.g., instance1 |
Request Body schema: application/json
dto
appAccessMode required | string Enum: "PUBLIC" "PRIVATE" Whether it can be seen in other apps
|
Array of objects (AttributeValueDto) Inherited attribute values | |
code | string code |
comment | string Description |
displayName | string Display name |
functionSetIds | Array of integers <int64> [ items <int64 > ] Function set IDs |
iconPath | string Icon path |
labelIds | Array of integers <int64> [ items <int64 > ] Label |
needSetPropertyVqtValue | boolean Default: false Whether to set real-time values. Only when set to true, the corresponding values can be queried in the page and service. By default, only the values in the database are updated. |
needSetMetadata | boolean Default: true Whether to update only metadata. When set to false, the function set, label, and other instance fields are invalid, and all attribute information and corresponding values are placed in the attributeValues field. |
Responses
Request samples
- Payload
{- "appAccessMode": "PUBLIC",
- "attributeValues": [
- {
- "attributeName": "p1",
- "attributeNamespace": "system",
- "attributeValue": "123"
}
], - "code": "xxxxx",
- "comment": "Modifying the entity template instance",
- "displayName": "updateInsatnce1",
- "functionSetIds": [
- 12222
], - "iconPath": "/api/config/download?fileName=2021-03-02/1614673872183/boatxxx.png",
- "labelIds": [
- 12223
], - "needSetPropertyVqtValue": false,
- "needSetMetadata": false
}
Response samples
- 200
- 500
{- "code": 200,
- "message": "ok"
}
Delete Entity Template Instance
Authorizations:
path Parameters
templateNamespace required | string Template namespace, e.g., system |
templateName required | string Template alias, e.g., t1 |
instanceName required | string Instance alias, e.g., instance1 |
Responses
Response samples
- 200
- 500
{- "code": 200,
- "message": "ok"
}
Search Normal Instances
Authorizations:
path Parameters
templateNamespace required | string Example: system template namespace, for example, system |
templateName required | string Example: t1 template alias, for example, t1 |
query Parameters
labelIds | Array of integers <int64> [ items <int64 > ] Example: labelIds=12222 labels, for example 12222 |
keyword | string Example: keyword=sx Keyword used in conjunction with searchAttributeId. This field is ineffective when searchAttributeId is empty. Matches the fuzzy value of the specified attribute, e.g., sx. |
pageIndex | integer <int32> Default: 1 Example: pageIndex=1 Page number, e.g., 1 |
pageSize | integer <int32> Default: 20 Example: pageSize=10 Number of data entries per page cannot exceed 500, e.g., 20 |
searchAttributeId | integer <int64> Example: searchAttributeId=12221 搜索字段,如:12221 |
containsDerivedInstances | boolean Default: true Example: containsDerivedInstances=true Whether to include instances of derived templates, e.g., true |
needSystemAttributeValue | boolean Default: false Example: needSystemAttributeValue=true Whether system attribute values are needed, e.g., true |
needNormalAttributeValue | boolean Default: false Example: needNormalAttributeValue=true Whether data of normal attributes (non-system attributes, non-main display fields) are needed. By default, only the values of main display fields are returned, e.g., true |
Responses
Response samples
- 200
- 500
{- "code": 200,
- "data": {
- "data": [
- {
- "system_app_name": "system",
- "system_last_modified_time": "2021-03-02 03:15:24"
}
], - "titles": [
- {
- "name": "system_en_name",
- "value": "Alias",
- "namespace": "system",
- "enName": "enName"
}
], - "total": 1000,
- "pageIndex": 1,
- "pageSize": 20
}, - "detail": "string",
- "message": "ok"
}
Get Instance Details by Instance Alias
Currently, it only supports entity template instances
Authorizations:
path Parameters
templateNamespace required | string Example: system template namespace, e.g., system |
templateName required | string Example: employee template alias, e.g., employee |
instanceName required | string Example: zhangsan instance alias, e.g., zhangsan |
Responses
Response samples
- 200
- 400
{- "system.enName": "zhangsan"
}
Get Instance Details under an Entity Template
Authorizations:
path Parameters
templateNamespace required | string Example: system template namespace, e.g., system |
templateName required | string Example: t1 template alias, e.g., t1 |
instanceName required | string Example: instance1 instance alias, e.g., instance1 |
Responses
Response samples
- 200
- 500
{- "code": 200,
- "data": {
- "appAccessMode": "PUBLIC",
- "appName": "system",
- "appId": "system",
- "displayAttributeValues": [
- "456"
], - "id": "11111",
- "labels": [
- {
- "displayName": "Data 1",
- "id": 11119
}
], - "template": {
- "editable": true,
- "deletable": true,
- "instanceCreatable": true,
- "instanceQueryable": true,
- "supportInstanceMetadata": true,
- "templateCreatable": true,
- "templateEditable": true,
- "templateQueryable": true,
- "comment": "This is a test template",
- "displayName": "t1",
- "enName": "t1",
- "id": 12345,
- "namespace": "system"
}
}, - "detail": "string",
- "message": "ok"
}
Search Relation Instances
Authorizations:
path Parameters
templateNamespace required | string Example: system Template namespace, e.g., system |
templateName required | string Example: test Template alias, e.g., test |
relationNamespace required | string Example: system Relation namespace, e.g., system |
relationName required | string Example: relation1 Relation alias, e.g., relation1 |
query Parameters
labelFullNames | Array of strings Example: labelFullNames=system.label1 Label namespace. alias list, e.g., system.label1 |
keyword | string Example: keyword=14 Keyword for fuzzy matching values of specified attributes, used in conjunction with the 'searchAttributeNameWithNamespace' field. For example, 14; |
pageIndex | integer <int32> Default: 1 Example: pageIndex=1 Page number, e.g., 1 |
pageSize | integer <int32> Default: 20 Example: pageSize=20 Maximum number of data entries per page is 500. e.g., 20 |
searchAttributeNameWithNamespace | string Example: searchAttributeNameWithNamespace=system.status Namespace and alias of the search field (can only be the attribute on the target template), e.g., system.status |
containsDerivedInstances | boolean Default: true Example: containsDerivedInstances=true Whether to include instances of derived templates, e.g., true |
needSystemAttributeValue | boolean Default: false Example: needSystemAttributeValue=false Whether system attribute values are required, e.g., false |
needNormalAttributeValue | boolean Default: false Example: needNormalAttributeValue=false Whether values of normal attributes (non-system attributes, non-primary display fields) are required. By default, only the values of primary display fields are included, e.g., false |
Responses
Response samples
- 200
- 400
{- "data": [
- {
- "system_app_name": "system",
- "system_last_modified_time": "2021-03-02 03:15:24"
}
], - "titles": [
- {
- "name": "system_en_name",
- "value": "Alias",
- "namespace": "system",
- "enName": "enName"
}
], - "total": 1000,
- "pageIndex": 1,
- "pageSize": 20
}
Search All Events
Interface usage scenario description is that a comprehensive event search interface for complex filtering queries on events.
For example, Search for events under the system.t1 template that originate from the function set with the ID system.f1, not bound to the label with the ID system.l1, and have enName or displayName containing 'es'.
templateFullNames=system.t1&sourceFunctionSetFullNames=system.f1&
excludeLabelFullNames=true&labelFullNames=system.l1&keyword=es,
Authorizations:
query Parameters
keyword | string Example: keyword=value jump event Keyword, e.g., value jump event |
pageIndex | integer <int32> Default: 1 Example: pageIndex=1 Page index, e.g., 1 |
pageSize | integer <int32> Default: 20 Example: pageSize=20 Number of data entries per page cannot exceed 500, e.g., 20 |
namespaces | Array of strings Example: namespaces=system Namespace, e.g., system |
labelFullNames | Array of strings Example: labelFullNames=system.label1 Label namespace and alias list, e.g., system.label1 |
excludeLabelFullNames | boolean Default: false Example: excludeLabelFullNames=false Query data without specified labels, used in conjunction with labelFullNames. This field is invalid when labelFullNames is empty. |
appNames | Array of strings[ items <= 128 characters ] Deprecated Example: appNames=App_bac090d688004de9bf927b9ff66bfca7 This field is named incorrectly and has been deprecated. Please use the 'appIds' field instead. This field is still valid in the current version, and its functionality and usage are the same as 'appIds'. |
appIds | Array of strings[ items <= 128 characters ] Example: appIds=App_bac090d688004de9bf927b9ff66bfca7 Query specified appIds |
excludeAppNames | boolean Deprecated Default: false Example: excludeAppNames=false This field is named incorrectly and has been deprecated. Please use the 'excludeAppIds' field instead. This field is still valid in the current version, and its functionality and usage are the same as 'excludeAppIds'. |
excludeAppIds | boolean Default: false Example: excludeAppIds=false When query data that does not belong to the specified app, this parameter needs to be used in conjunction with 'appIds'. This field is invalid when 'appIds' is empty. |
instanceNames | Array of strings Example: instanceNames=instance1 List of instance aliases to which the metadata belongs (priority item). When this field is provided, templateNames is ignored. |
sourceFunctionSetFullNames | Array of strings Example: sourceFunctionSetFullNames=system.f1 List of aliases for the namespaces of the source function sets. For example, system.f1 |
templateFullNames | Array of strings Example: templateFullNames=system.t1 List of aliases for the namespaces of the templates to which the metadata belongs. For example, system.t1 |
functionSetFullNames | Array of strings Example: functionSetFullNames=system.f2 List of aliases for the namespaces of the function sets to which the metadata belongs. For example, system.f2 |
containsInheritedMetadata | boolean Default: true Example: containsInheritedMetadata=true Specifies whether to include inherited metadata. Needs to be used in conjunction with specified templates or instances. This parameter has no effect when instanceNames and templateFullNames are empty. |
containsSelfMetadata | boolean Default: true Example: containsSelfMetadata=true Specifies whether to include self metadata. Needs to be used in conjunction with specified templates or instances. This parameter has no effect when instanceNames and templateFullNames are empty. |
Responses
Response samples
- 200
- 400
{- "data": [
- {
- "id": 11139,
- "templateId": 11140,
- "instanceId": "11141",
- "functionSetId": 11142,
- "dataSetId": 11143,
- "dataSetDisplayName": "Value Change Event Data Set",
- "labelIds": [
- 11144
], - "appShowName": "system",
- "appName": "system",
- "appId": "system",
- "namespace": "system",
- "sourceFunctionSetId": 11145,
- "displayName": "event1",
- "enName": "event1",
- "comment": "test data",
- "appAccessMode": "PUBLIC"
}
], - "pageIndex": 1,
- "pageSize": 20,
- "total": 20
}
Relation Search
Comprehensive search interface for relations, allowing complex filtering queries on relations. For example, to search for relations in templates "system.t1" and "system.t3" that reference template "system.t5", the parameters would be:
templateFullNames=system.t1&templateFullNames=system.t3
&refFullNames=system.t5&refFullNameType=TEMPLATE
Authorizations:
query Parameters
templateFullNames | Array of strings Example: templateFullNames=system.t1 Namespace and alias list of the metadata templates, e.g., system.t1 |
relationFullNames | Array of strings Example: relationFullNames=system.r1 Namespace and alias list of the relations, e.g., system.r1 |
refFullNames | Array of strings Example: refFullNames=system.t2 Namespace and alias list of the referenced templates, e.g., system.t2 |
refFullNameType | string Default: "TEMPLATE" Enum: "TEMPLATE" "RELATION" "ATTRIBUTE" Example: refFullNameType=RELATION Type of referenced namespace and alias (used in conjunction with refFullNames), e.g., RELATION
|
pageIndex | integer <int32> Default: 1 Example: pageIndex=1 Page number, e.g., 1 |
pageSize | integer <int32> Default: 20 Example: pageSize=20 Maximum number of data entries is 500 per page, e.g., 20 |
Responses
Response samples
- 200
- 400
{- "list": [
- {
- "displayName": "realtion1",
- "enName": "relation1",
- "id": 11111,
- "namespace": "system",
- "nodes": [
- {
- "main": false,
- "refAttributeDataType": "LONG",
- "refAttributeDisplayName": "attribute1",
- "logicColumnName": "system_template1_attribute1",
- "refAttributeEnName": "attribute1",
- "refAttributeId": 11113,
- "refAttributeNamespace": "system",
- "refComment": "One end of the node",
- "refEnName": "system_template1",
- "refRelationDisplayName": "system_relation2",
- "refRelationId": 11114,
- "refTemplateDisplayName": "template1",
- "refTemplateEnName": "template1",
- "refTemplateId": 11115,
- "refTemplateNamespace": "system"
}
], - "templateInfo": {
- "displayName": "Data 1",
- "id": 11119,
- "enName": "metadata1",
- "namespace": "system"
}
}
], - "pagination": {
- "total": 10,
- "pageSize": 20,
- "current": 1
}
}
Get Nodes by RelationID
Authorizations:
path Parameters
templateNamespace required | string Example: system Template namespace, e.g., system |
templateName required | string Example: test Template alias, e.g., test |
relationNamespace required | string Example: system Relation namespace, e.g., system |
relationName required | string Example: relation1 Relation alias, e.g., relation1 |
Responses
Response samples
- 200
- 400
[- {
- "main": false,
- "refAttributeDataType": "LONG",
- "refAttributeDisplayName": "attribute1",
- "logicColumnName": "system_template1_attribute1",
- "refAttributeEnName": "attribute1",
- "refAttributeId": 11113,
- "refAttributeNamespace": "system",
- "refComment": "One end of the node",
- "refEnName": "system_template1",
- "refRelationDisplayName": "system_relation2",
- "refRelationId": 11114,
- "refTemplateDisplayName": "template1",
- "refTemplateEnName": "template1",
- "refTemplateId": 11115,
- "refTemplateNamespace": "system"
}
]
Confirm Real-time Alarm Information
Authorizations:
Request Body schema: application/json
dto
ackAll | boolean Default: false Whether to acknowledge all alarms |
userName required | string Name of the person acknowledging the alarms |
fullNames | Array of strings List of instance IDs + alarm aliases triggered |
Responses
Request samples
- Payload
{- "ackAll": false,
- "userName": "Zhang San",
- "fullNames": [
- "11401uuid08fb884b9a4743d08464e95c64074d09"
]
}
Response samples
- 400
{- "code": 10001001,
- "data": { },
- "detail": "string",
- "message": "string",
- "context": { },
- "targetService": "string"
}
Query Alarms
Interface usage scenario description is that comprehensive alarm search interface is for complex filtering queries on alarms.
For example, Search for enabled alarms with the name containing "xxx" under the attribute labeled "system.aaa" bound to the instance "employee".
instanceEnName=employee&attributeLabelNames=system.aaa&
alarmDisplayName=xxx&alarmEnable=true
Authorizations:
query Parameters
instanceEnName | string Example: instanceEnName=Zhang San Instance alias, e.g., Zhang San |
instanceDisplayName | string Example: instanceDisplayName=Zhang San Multiple instances with the same name may be obtained in different namespaces, e.g., Zhang San |
instanceLabelNames | Array of strings Example: instanceLabelNames=objectLabel1 Instance label list, multiple labels with the same name may be obtained in different namespaces, e.g., objectLabel1 |
attributeEnName | string Example: attributeEnName=attr1 Attribute alias, multiple attributes with the same alias may be obtained in different namespaces, e.g., attr1 |
attributeDisplayName | string Example: attributeDisplayName=attr1 Attribute name, multiple attributes with the same name may be obtained in different namespaces, e.g., attr1 |
attributeComment | string Example: attributeComment=test Attribute description, fuzzy matching, e.g., test |
attributeLabelNames | Array of strings Example: attributeLabelNames=attrLabel1 Attribute label list, multiple labels with the same name may be obtained in different namespaces, e.g., attrLabel1 |
alarmEnName | string Example: alarmEnName=uuid295479a136334d50810427cfa3573fd4,uuidba26fbeaec5f4d55a0335b1cc713d4b2,uuid538e39e0c57d4c07ad023edaa78244a2 Alarm alias has multiple aliases separated by commas, e.g., uuid295479a136334d50810427cfa3573fd4,uuidba26fbeaec5f4d55a0335b1cc713d4b2,uuid538e39e0c57d4c07ad023edaa78244a2 |
alarmDisplayName | string Example: alarmDisplayName=alarm Alarm name, fuzzy matching, e.g., alarm |
alarmComment | string Example: alarmComment=lower than Alarm description, fuzzy matching, e.g., lower than |
alarmPriority | integer <int32> Example: alarmPriority=5 Alarm priority (1-10), e.g., 5 |
alarmEnabled | boolean Example: alarmEnabled=true Alarm enabled, e.g., true |
alarmType | string Example: alarmType=high temperature alarm Alarm type, e.g., high temperature alarm |
page | integer <int32> Default: 1 Example: page=1 Page number for pagination, starting from 1, e.g., 1 |
perPage | integer <int32> Default: 20 Example: perPage=50 Number of elements to return per page. The default is 20 and maximum number is 500, e.g., 50 |
excludeFunctionSetAlarm | boolean Default: false Example: excludeFunctionSetAlarm=false Whether to exclude function set alarm |
Responses
Response samples
- 200
- 400
{- "list": [
- {
- "displayName": "Alarm 1",
- "priority": 2,
- "enable": false,
- "operator": "EQ",
- "limitValue": "11",
- "deadBand": 12,
- "deadBandType": "NUMERIC",
- "comment": "Test data",
- "alarmType": "Test alarm",
- "id": 11145,
- "enName": "uuid08fb884b9a4743d08464e95c64074d09",
- "templateEnName": "testTemplate",
- "templateDisplayName": "Test template",
- "instanceEnName": "testEntity",
- "instanceDisplayName": "Test instance",
- "attributeEnName": "p1",
- "attributeDisplayName": "p1",
- "attributeComment": "Test attribute p1",
- "instanceLabels": [
- {
- "displayName": "Data 1",
- "id": 11119,
- "enName": "metadata1"
}
], - "attributeLabels": [
- {
- "displayName": "Data 1",
- "id": 11119,
- "enName": "metadata1"
}
]
}
], - "pagination": {
- "total": 10,
- "pageSize": 20,
- "current": 1
}
}
Batch Create Alarm Rules
Create a maximum of 1000 alarms at once. If an error occurs, it will be rolled back. Possible exceptions include templates, instances, and attributes not found, non-physical templates not supported for creating alarms, required fields not provided, exceeded priority value range, etc.
Authorizations:
Request Body schema: application/json
dto
Array of objects (CreateAlarmDtoWithSource) | |||||||||||||||||||||||||
Array
|
Responses
Request samples
- Payload
{- "dtos": [
- {
- "templateName": "system.employee",
- "attributeName": "system.p1",
- "instanceName": "zhangsan",
- "displayName": "alarm 1",
- "priority": 2,
- "enable": false,
- "operator": "EQ",
- "limitValue": "11",
- "deadBand": 12,
- "deadBandType": "NUMERIC",
- "comment": "Test data",
- "alarmType": "Test alarm"
}
]
}
Response samples
- 400
{- "code": 10001001,
- "data": { },
- "detail": "string",
- "message": "string",
- "context": { },
- "targetService": "string"
}
Modify Alarm Rules
Modify alarm rules
Authorizations:
path Parameters
name required | string Example: e82d430a-c503-4f28-a063-54d981eec43e Currently, the alias is a system-generated UUID at the time of creation |
Request Body schema: application/json
Alarm metadata information
displayName required | string <= 64 characters Name |
priority | integer <int32> [ 1 .. 10 ] Priority (between 1 and 10) |
enable | boolean Default: false Enable flag |
operator required | string Enum: "LT" "LE" "GT" "GE" "EQ" Condition (only EQ is applicable when the attribute is Boolean)
|
limitValue required | string Limit value (numeric for numeric attributes, true/false for boolean attributes) |
deadBand | number <double> Default: 0 Deadband value |
deadBandType | string Default: "NUMERIC" Enum: "NUMERIC" "PERCENT" Deadband value type
|
comment | string <= 1024 characters Description |
alarmType | string <= 128 characters Alarm type |
Responses
Request samples
- Payload
{- "displayName": "Boiler High Temperature Alarm",
- "priority": 8,
- "enable": true,
- "operator": "GE",
- "limitValue": "100",
- "deadBand": 10,
- "deadBandType": "NUMERIC",
- "comment": "Alarm triggered when boiler temperature exceeds 100",
- "alarmType": "Temperature Alarm"
}
Response samples
- 200
- 400
{- "code": 200,
- "message": "ok"
}
List Alarms by Attributed ID
Authorizations:
path Parameters
attributeFullName required | string Examples:
Full path of the attribute (template namespace.template alias.instance alias.attribute namespace.attribute alias), e.g., system.t1.sytem.p1 or system.t2.instance1.system.p2 |
Responses
Response samples
- 200
- 400
[- {
- "displayName": "Alarm 1",
- "priority": 2,
- "enable": false,
- "operator": "EQ",
- "limitValue": "11",
- "deadBand": 12,
- "deadBandType": "NUMERIC",
- "comment": "Test data",
- "alarmType": "Test alarm",
- "enName": "alarm1",
- "id": 11145,
- "instanceId": "11234"
}
]
Get Authorized Users by Alarms
The maximum number of alarms to be processed is 100. An error is thrown if it exceeds 100. If the full path of an alarm does not exist or no users with push permissions are found, an empty array is returned. To handle high concurrency scenarios, the user list for each alarm is cached for 5 minutes (there may be a delay of less than 5 minutes for user data changes).
Authorizations:
query Parameters
alarmFullPaths required | Array of strings Example: alarmFullPaths=system.Template_823.msa_test_05.p1_a1,system.Template_829.msa_test_09.p1_a2 List of alarm full paths, complete alarm information (template namespace, template alias, instance alias, alarm alias). Multiple alarm full paths are separated by commas (the maximum limit is 100, an error is thrown if it exceeds 100). |
Responses
Response samples
- 200
- 400
{- "system.Template_823.msa_test_05.p1_a1": [
- "admin",
- "test"
], - "system.Template_829.msa_test_09.p1_a2": [ ]
}
Query Alert History
Authorizations:
path Parameters
alertRecordId required | string Alert record ID |
Responses
Response samples
- 200
- 400
[- {
- "alertRecordId": "a95eb247e47e466ebcc1e5ff8df764a1",
- "alarmName": "uuid1079ef50a32c4b1d8dad7f97addf46fd",
- "triggerCompareOperator": "GT",
- "priority": 1,
- "templateName": "materialInfo",
- "templateNamespace": "system",
- "instanceName": "m_100012870",
- "attributeName": "discharge_pressure",
- "instanceDisplayName": "obj_data2",
- "attributeDisplayName": "pro_obj",
- "displayName": "alarm6",
- "ackUserName": "test",
- "ackStatus": 0,
- "triggerCondition": "150 > 100",
- "description": "An alarm is triggered when the number exceeds 100",
- "startDatetime": "2021-04-06T16:00:00.000+08:00",
- "ackDatetime": "2021-04-06T17:00:00.000+08:00",
- "disappearedDatetime": "2021-04-06T18:00:00.000+08:00",
- "triggerAttributeValue": "150",
- "disappearedStatus": 0
}
]
Get alarm record history
The parameters of the interface are combined with an "AND" relationship. If a parameter is not provided, there are no restrictions. For example: If no parameters are passed to the interface, the data retrieved will be based on the trigger time (start_datatimestamp) in descending order, limited to the top 20 records. If you want to query alarms triggered between 2021-04-01 16:00:00 and 2021-04-10 23:59:59 (Beijing time), with instance or attribute aliases, and alarm descriptions containing 'p1',and currently occurring alarms, you can provide the following parameters: keyword:p1 startTime:2021-04-01T16:00:00.000+08:00 endTime:2021-04-10T23:59:59.000+08:00 status:1
Authorizations:
query Parameters
keyword | string Match instances, attribute aliases, or alarm descriptions (description) with a fuzzy search |
ackUserName | string User who acknowledged the alarm |
ackStatus | integer Enum: 0 1 Acknowledgment status (0 is not acknowledged, 1 is acknowledged) |
startTime | string <date-time> Example: startTime=2021-04-06T16:00:00.000+08:00 Start time (trigger time) in RFC 3339 format, yyyy-MM-dd'T'HH:mm:ss.SSSZ, e.g., 2021-04-06T16:00:00.000+08:00 (+08:00 indicates the time zone offset) If not provided, there is no start time restriction |
endTime | string <date-time> Example: endTime=2021-04-06T16:00:00.000+08:00 End time (trigger time) in RFC 3339 format, yyyy-MM-dd'T'HH:mm:ss.SSSZ, e.g., 2021-04-06T16:00:00.000+08:00 (+08:00 indicates the time zone offset) If not provided, there is no end time restriction |
status | string Enum: "0" "1" Example: status=1 Alarm record status (0 is disappeared, 1 is currently occurring) |
current | integer <int32> Default: 1 Example: current=1 Current page, e.g., 1 |
pageSize | integer <int32> Default: 20 Example: pageSize=20 Maximum number of data entries is 500, e.g., 20 |
priorities | string Example: priorities=1,3,4 Priority (integer between 1 and 10), multiple values separated by commas. |
displayName | string Alarm name |
orderBy | string Sorting order (ascending: asc, descending: desc). Supports sorting fields: priority, start_datatimestamp, disappeared_datatimestamp, ack_datatimestamp. Format: field1 order, field2 order. For example, priority desc,start_datatimestamp desc 默认:start_datatimestamp desc |
Responses
Response samples
- 200
- 400
{- "list": [
- {
- "alertRecordId": "0ccf80f0c7a842d19ef53ee6209d0d9c",
- "priority": 1,
- "displayName": "L",
- "startDatetime": "2021-04-06T16:00:00.000+08:00",
- "ackDatetime": "2021-04-06T17:00:00.000+08:00",
- "disappearedDatetime": "2021-04-06T18:00:00.000+08:00",
- "instanceName": "T11020225",
- "attributeName": "material_spec",
- "instanceDisplayName": "obj_data2",
- "attributeDisplayName": "specifications and models"
}
], - "pagination": {
- "total": 10,
- "pageSize": 20,
- "current": 1
}
}
Search Subscriptions
Authorizations:
query Parameters
pageIndex | integer <int32> Default: 1 Example: pageIndex=1 Page number. e.g., 1 |
pageSize | integer <int32> <= 200 Default: 20 Example: pageSize=20 Maximum data entries per page is 200, e.g., 20 |
keyword | string <= 64 characters Example: keyword=o1 Fuzzy match subscription alias, e.g., o1. Cannot be used with enNames simultaneously. |
namespaces | Array of strings <= 100 items [ items <= 64 characters ] Example: namespaces=system&namespaces=system1 Exact match subscription namespace. Limit: 100 |
enNames | Array of strings <= 100 items Example: enNames=o1&enNames=o2 Exact match subscription alias. Cannot be used with keyword simultaneously. Limit: 100 |
templatesOrInstances | Array of strings <= 100 items Example: templatesOrInstances=system.Template&templatesOrInstances=system.Template.instance Template instance information. Template format: (templateNamespace.templateName: system.Template); Instance format: (templateNamespace.templateName.instanceName: system.Template.instance). Limit: 100. Strict adherence to the format rules is required; otherwise, an error will occur |
Responses
Response samples
- 200
- 400
{- "list": [
- {
- "enName": "s1",
- "displayName": "s1",
- "comment": "This is a subscription",
- "appShowName": "aaaa",
- "appAccessMode": "PUBLIC",
- "namespace": "system",
- "script": "log.debug(1111);",
- "triggerType": "EVENT",
- "templateName": "template",
- "templateNamespace": "system",
- "instanceName": "instance",
- "templateId": 1,
- "instanceId": "2",
- "labels": [
- {
- "displayName": "Data 1",
- "id": 11119
}
], - "appId": "system",
- "timingTrigger": {
- "enable": false,
- "end": "2022-07-19T02:56:51Z",
- "periodSecond": 60,
- "start": "2022-07-19T02:56:50Z"
}, - "eventTriggers": [
- {
- "attributeId": 11134,
- "eventId": 11135,
- "instanceId": "11136",
- "templateId": 11137,
- "templateName": "template",
- "instanceName": "instance",
- "eventName": "ValueChangeEvent",
- "attributeName": "attribute"
}
]
}
], - "pagination": {
- "total": 10,
- "pageSize": 20,
- "current": 1
}
}
Search Template Subscriptions
Authorizations:
path Parameters
templateNamespace required | string <= 64 characters Example: system Template namespace |
templateName required | string <= 64 characters Example: template Template alias |
subscriptionNamespace required | string <= 64 characters Example: system Subscription namespace |
subscriptionName required | string <= 64 characters Example: s1 Subscription alias |
Responses
Response samples
- 200
- 400
{- "enName": "s1",
- "displayName": "s1",
- "comment": "This is a subscription",
- "appShowName": "aaaa",
- "appAccessMode": "PUBLIC",
- "namespace": "system",
- "script": "log.debug(1111);",
- "triggerType": "EVENT",
- "templateName": "template",
- "templateNamespace": "system",
- "instanceName": "instance",
- "templateId": 1,
- "instanceId": "2",
- "labels": [
- {
- "displayName": "Data 1",
- "id": 11119
}
], - "appId": "system",
- "timingTrigger": {
- "enable": false,
- "end": "2022-07-19T02:56:51Z",
- "periodSecond": 60,
- "start": "2022-07-19T02:56:50Z"
}, - "eventTriggers": [
- {
- "attributeId": 11134,
- "eventId": 11135,
- "instanceId": "11136",
- "templateId": 11137,
- "templateName": "template",
- "instanceName": "instance",
- "eventName": "ValueChangeEvent",
- "attributeName": "attribute"
}
]
}
Search Instance Subscriptions
Authorizations:
path Parameters
templateNamespace required | string <= 64 characters Example: system Template namespace |
templateName required | string <= 64 characters Example: template Template alias |
instanceName required | string <= 64 characters Example: instance Instance alias |
subscriptionNamespace required | string <= 64 characters Example: system Subscription namespace |
subscriptionName required | string <= 64 characters Example: s1 subscription alias |
Responses
Response samples
- 200
- 400
{- "enName": "s1",
- "displayName": "s1",
- "comment": "This is a subscription",
- "appShowName": "aaaa",
- "appAccessMode": "PUBLIC",
- "namespace": "system",
- "script": "log.debug(1111);",
- "triggerType": "EVENT",
- "templateName": "template",
- "templateNamespace": "system",
- "instanceName": "instance",
- "templateId": 1,
- "instanceId": "2",
- "labels": [
- {
- "displayName": "Data 1",
- "id": 11119
}
], - "appId": "system",
- "timingTrigger": {
- "enable": false,
- "end": "2022-07-19T02:56:51Z",
- "periodSecond": 60,
- "start": "2022-07-19T02:56:50Z"
}, - "eventTriggers": [
- {
- "attributeId": 11134,
- "eventId": 11135,
- "instanceId": "11136",
- "templateId": 11137,
- "templateName": "template",
- "instanceName": "instance",
- "eventName": "ValueChangeEvent",
- "attributeName": "attribute"
}
]
}
Batch Update Entity Template Instance Subscriptions
Support batch update of subscriptions across instances
Authorizations:
Request Body schema: application/json
Update instance subscriptions
enName required | string <= 64 characters Subscription alias |
displayName required | string <= 64 characters Subscription name |
comment | string <= 1024 characters Description |
appShowName | string <= 64 characters app display name |
appAccessMode required | string <= 64 characters Enum: "PUBLIC" "PRIVATE" Data type
|
namespace | string <= 64 characters Default: "system" Subscription namespace |
script | string There is no limit on the length of the script, but it is recommended to keep the size of a single subscription script below 800mb. |
triggerType required | string <= 64 characters Enum: "EVENT" "TIMING" Trigger type
|
templateNamespace required | string <= 64 characters Template namespace |
templateName required | string <= 64 characters Template name |
instanceName required | string <= 64 characters Instance name |
labelIds | Array of integers <int64> <= 100 items [ items <int64 > ] Label |
appId required | string <= 128 characters App unique identifier (When the subscription belongs to a specific app, provide the appId. For example, App_5b3791a084a574e619cb15690a985b94) |
object (TimingTrigger) Scheduled triggering | |
Array of objects (OperateEventTrigger) <= 20 items Event trigger information. Required when triggerType is EVENT; cannot be used together with timingTrigger. |
Responses
Request samples
- Payload
[- {
- "enName": "s1",
- "displayName": "s1",
- "comment": "This is a subscription",
- "appShowName": "aaaa",
- "appAccessMode": "PUBLIC",
- "namespace": "system",
- "script": "log.debug(1111);",
- "triggerType": "EVENT",
- "templateNamespace": "system",
- "templateName": "template",
- "instanceName": "instance",
- "labelIds": [
- 11133
], - "appId": "App_5b3791a084a574e619cb15690a985b94",
- "timingTrigger": {
- "enable": false,
- "end": "2022-07-19T02:56:51Z",
- "periodSecond": 60,
- "start": "2022-07-19T02:56:50Z"
}, - "eventTriggers": [
- {
- "templateName": "template",
- "templateNamespace": "system",
- "instanceName": "instance",
- "eventName": "ValueChangeEvent",
- "eventNamespace": "system",
- "attributeNamespace": "system",
- "attributeName": "attribute"
}
]
}
]
Response samples
- 400
{- "code": 10001001,
- "data": { },
- "detail": "string",
- "message": "string",
- "context": { },
- "targetService": "string"
}
Batch Create Entity Template Instance Subscriptions
Support batch creation of subscriptions across instances
Authorizations:
Request Body schema: application/json
Create instance subscription
enName required | string <= 64 characters Subscription alias |
displayName required | string <= 64 characters Subscription name |
comment | string <= 1024 characters Description |
appShowName | string <= 64 characters app display name |
appAccessMode required | string <= 64 characters Enum: "PUBLIC" "PRIVATE" Data type
|
namespace | string <= 64 characters Default: "system" Subscription namespace |
script | string There is no limit on the length of the script, but it is recommended to keep the size of a single subscription script below 800mb. |
triggerType required | string <= 64 characters Enum: "EVENT" "TIMING" Trigger type
|
templateNamespace required | string <= 64 characters Template namespace |
templateName required | string <= 64 characters Template name |
instanceName required | string <= 64 characters Instance name |
labelIds | Array of integers <int64> <= 100 items [ items <int64 > ] Label |
appId required | string <= 128 characters App unique identifier (When the subscription belongs to a specific app, provide the appId. For example, App_5b3791a084a574e619cb15690a985b94) |
object (TimingTrigger) Scheduled triggering | |
Array of objects (OperateEventTrigger) <= 20 items Event trigger information. Required when triggerType is EVENT; cannot be used together with timingTrigger. |
Responses
Request samples
- Payload
[- {
- "enName": "s1",
- "displayName": "s1",
- "comment": "This is a subscription",
- "appShowName": "aaaa",
- "appAccessMode": "PUBLIC",
- "namespace": "system",
- "script": "log.debug(1111);",
- "triggerType": "EVENT",
- "templateNamespace": "system",
- "templateName": "template",
- "instanceName": "instance",
- "labelIds": [
- 11133
], - "appId": "App_5b3791a084a574e619cb15690a985b94",
- "timingTrigger": {
- "enable": false,
- "end": "2022-07-19T02:56:51Z",
- "periodSecond": 60,
- "start": "2022-07-19T02:56:50Z"
}, - "eventTriggers": [
- {
- "templateName": "template",
- "templateNamespace": "system",
- "instanceName": "instance",
- "eventName": "ValueChangeEvent",
- "eventNamespace": "system",
- "attributeNamespace": "system",
- "attributeName": "attribute"
}
]
}
]
Response samples
- 400
{- "code": 10001001,
- "data": { },
- "detail": "string",
- "message": "string",
- "context": { },
- "targetService": "string"
}
Batch Delete Entity Template Instance Subscriptions
Support batch delete of subscriptions across instances
Authorizations:
Request Body schema: application/json
Delete instance subscriptions
templateNamespace required | string <= 64 characters Template namespace |
templateName required | string <= 64 characters Template name |
instanceName required | string <= 64 characters Instance name |
namespace required | string <= 64 characters Subscription namespace |
enName required | string <= 64 characters subscription |
Responses
Request samples
- Payload
[- {
- "templateNamespace": "system",
- "templateName": "template",
- "instanceName": "instance",
- "namespace": "system",
- "enName": "s1"
}
]
Create a Model Import Task for a Compressed Package
Create a task to import a model compressed package under a specified app. For the same app, if an import or export task is already in progress, importing is not allowed. The maximum concurrent execution is 5. In case of import failure, successfully imported models will not be rolled back. However, the same model compressed package can be imported multiple times, and the system handles it as an incremental update (existing models will be updated, and new models will be added if they don't exist).
Authorizations:
Request Body schema: multipart/form-data
appId required | string <= 128 characters The appId where the model is imported, used to check if the app exists. |
file required | string <binary> The zip file containing the imported model. The file name must be "model.zip". It can be obtained through /v2/models/tasks/exports or from the same-named file in the app's exported zip package. |
Responses
Response samples
- 201
- 400
{- "taskId": "ac063e0a4ecb439186f6ae7eb9223842",
- "createdTime": "2019-08-24T14:15:22Z",
- "finishedTime": "2019-08-24T14:15:22Z",
- "status": 0,
- "message": "string"
}
Create a Task to Export Model Compressed Package
Create a task to export the model compressed package of a specified app. If an import task is already executing for the same app, exporting is not allowed. However, if an export task is already executing, another export can be initiated. The maximum concurrent export tasks per app is 5, and the overall maximum concurrent export tasks is also 5. The export process only involves query operations and does not modify any model or instance data. Multiple exports of the same package are idempotent.
Authorizations:
Request Body schema: application/json
Information required for model export
appId required | string <= 128 characters The appId where the model is exported from. |
Responses
Request samples
- Payload
{- "appId": "App_1af1a690b81b7cabc2f5fde0b00d15ad"
}
Response samples
- 201
- 400
{- "taskId": "ac063e0a4ecb439186f6ae7eb9223842",
- "createdTime": "2019-08-24T14:15:22Z",
- "finishedTime": "2019-08-24T14:15:22Z",
- "status": 0,
- "message": "string",
- "expirationTime": "2019-08-24T14:15:22Z"
}
Download Model Compressed Package
Download the exported model compressed package as a binary file in the response.
Authorizations:
path Parameters
taskId required | string <= 32 characters Example: ac063e0a4ecb439186f6ae7eb9223842 task id |
Responses
Response samples
- 400
{- "code": 10001001,
- "data": { },
- "detail": "string",
- "message": "string",
- "context": { },
- "targetService": "string"
}
Query Model Export Task Status
Get detailed information about the export task, including its status and other system-generated information. When the task status is successful, you can call the /v2/models/tasks/{taskId}/download endpoint to download the export file. The export task status will be cleared 30 minutes after the task is completed.
Authorizations:
path Parameters
taskId required | string <= 32 characters Example: ac063e0a4ecb439186f6ae7eb9223842 task id |
Responses
Response samples
- 200
- 400
{- "taskId": "ac063e0a4ecb439186f6ae7eb9223842",
- "createdTime": "2019-08-24T14:15:22Z",
- "finishedTime": "2019-08-24T14:15:22Z",
- "status": 0,
- "message": "string",
- "expirationTime": "2019-08-24T14:15:22Z"
}
Query Model Import Task Status
Get detailed information about an import task, including its status and other system-generated information. Clients can use this interface to retrieve the status of the import task. The import task status will be cleared after 30 minutes of task completion.
Authorizations:
path Parameters
taskId required | string <= 32 characters Example: ac063e0a4ecb439186f6ae7eb9223842 task id |
Responses
Response samples
- 200
- 400
{- "taskId": "ac063e0a4ecb439186f6ae7eb9223842",
- "createdTime": "2019-08-24T14:15:22Z",
- "finishedTime": "2019-08-24T14:15:22Z",
- "status": 0,
- "message": "string"
}