Skip to main content

Data Modeling

Download OpenAPI specification:Download

Authentication

Sign

Security Scheme Type: API Key
Header parameter name: Authorization

runtime function

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:
Sign
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

Content type
application/json
Example
{
  • "code": 200,
  • "data": [
    ],
  • "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:
Sign
Request Body schema: application/json

Set real-time values

Array
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

Content type
application/json
[
  • {
    }
]

Response samples

Content type
application/json
{
  • "code": 10001009,
  • "message": "ATTRIBUTE:system.xx not found.",
  • "detail": "string",
  • "data": { }
}

Query Real-time Data of Object attributes

Authorizations:
Sign
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

Content type
application/json
{
  • "inputs": [
    ]
}

Response samples

Content type
application/json
{
  • "code": 200,
  • "data": {
    },
  • "detail": "string",
  • "message": "ok"
}

Query Historical Data of Object Attributes

Authorizations:
Sign
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)

  • ASC Ascending
  • DESC Descending
select
Array of strings
object (HistoryWhere)

Historical data query conditio

Responses

Request samples

Content type
application/json
{
  • "fill": {
    },
  • "groupBy": {
    },
  • "limit": 1,
  • "offset": 23,
  • "order": "DESC",
  • "select": [
    ],
  • "where": {
    }
}

Response samples

Content type
application/json
{
  • "code": 200,
  • "data": {
    },
  • "detail": "string",
  • "message": "ok"
}

Execute Instance Service

Authorizations:
Sign
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

object

Responses

Request samples

Content type
application/json
{
  • "propName": "p1"
}

Response samples

Content type
application/json
{
  • "code": 200,
  • "data": {
    },
  • "detail": "string",
  • "message": "ok"
}

Execute form Template Service

Authorizations:
Sign
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

object

Responses

Request samples

Content type
application/json
{
  • "propName": "p1"
}

Response samples

Content type
application/json
{
  • "code": 200,
  • "data": {
    },
  • "detail": "string",
  • "message": "ok"
}

attribute

Get a List of Attribute Units

Authorizations:
Sign
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

Content type
application/json
{
  • "code": 200,
  • "data": [
    ],
  • "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:
Sign
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

  • BOOLEAN Boolean type
  • STRING String type
  • INTEGER Integer type
  • LONG Long type
  • FLOAT Float type
  • DOUBLE Double type
  • DECIMAL Decimal type
  • FILE File type
  • DATE Date type
  • DATETIME Long date type
  • OBJECT Object type for primary-foreign key relationships
  • SYSTEMCODE System code
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

Content type
application/json
{
  • "list": [
    ],
  • "pagination": {
    }
}

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:
Sign
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

Content type
application/json
{
  • "code": 200,
  • "message": "ok",
  • "data": [
    ]
}

Create Template Attribute

Authorizations:
Sign
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)

  • BOOLEAN Boolean type
  • STRING String type
  • INTEGER Integer type
  • LONG Long type
  • FLOAT Float type
  • DOUBLE Double type
  • DECIMAL Decimal type
  • FILE File type
  • DATE Date type
  • DATETIME Datetime type
  • OBJECT Object type
  • SYSTEMCODE System code
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

  • READ_ONLY Read-only
  • READ_WRITE Read-write
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

  • PUBLIC Public
  • PRIVATE Private
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

Content type
application/json
{
  • "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": [
    ],
  • "unique": false,
  • "display": false
}

Response samples

Content type
application/json
{
  • "code": 200,
  • "data": 19999,
  • "detail": "string",
  • "message": "ok"
}

List Template Self Attributes

Authorizations:
Sign
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

Content type
application/json
{
  • "code": 200,
  • "data": {
    },
  • "detail": "string",
  • "message": "ok"
}

Update Template Attribute

Authorizations:
Sign
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

  • PUBLIC publicly-owned
  • PRIVATE privately-owned
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

  • READ_ONLY Read-only
  • READ_WRITE Read-write
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

Content type
application/json
{
  • "appAccessMode": "PUBLIC",
  • "comment": "edited attribute",
  • "compress": false,
  • "defaultValue": "12",
  • "displayName": "udpateAttribute1",
  • "historical": false,
  • "labelIds": [
    ],
  • "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

Content type
application/json
{
  • "code": 200,
  • "message": "ok"
}

Delete Template Attribute

Authorizations:
Sign
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

Content type
application/json
{
  • "code": 200,
  • "message": "ok"
}

Create Entity Instance Attribute

Authorizations:
Sign
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)

  • BOOLEAN Boolean type
  • STRING String type
  • INTEGER Integer type
  • LONG Long type
  • FLOAT Float type
  • DOUBLE Double type
  • DECIMAL Decimal type
  • FILE File type
  • DATE Date type
  • DATETIME Datetime type
  • OBJECT Object type
  • SYSTEMCODE System code
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

  • READ_ONLY Read-only
  • READ_WRITE Read-write
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

  • PUBLIC Public
  • PRIVATE Private
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

Content type
application/json
{
  • "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": [
    ],
  • "attributeBindRelation": {
    }
}

Response samples

Content type
application/json
{
  • "code": 200,
  • "data": 19999,
  • "detail": "string",
  • "message": "ok"
}

Batch Create Entity Instance Attributes

Maximum 100 at a time

Authorizations:
Sign
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

Array (<= 100 items)
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)

  • BOOLEAN Boolean type
  • STRING String type
  • INTEGER Integer type
  • LONG Long type
  • FLOAT Float type
  • DOUBLE Double type
  • DECIMAL Decimal type
  • FILE File type
  • DATE Date type
  • DATETIME Datetime type
  • OBJECT Object type
  • SYSTEMCODE System code
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

  • READ_ONLY Read-only
  • READ_WRITE Read-write
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

  • PUBLIC Public
  • PRIVATE Private
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

Content type
application/json
[
  • {
    }
]

Response samples

Content type
application/json
{
  • "code": 10001009,
  • "message": "Template with full name (namespace.alias) system.t1 not found",
  • "data": { },
  • "detail": "string"
}

Update Object Instance Attribute

Authorizations:
Sign
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

  • PUBLIC publicly-owned
  • PRIVATE privately-owned
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

  • READ_ONLY Read-only
  • READ_WRITE Read-write
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

Content type
application/json
{
  • "appAccessMode": "PUBLIC",
  • "comment": "edited attribute",
  • "compress": false,
  • "defaultValue": "12",
  • "displayName": "udpateAttribute1",
  • "historical": false,
  • "labelIds": [
    ],
  • "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

Content type
application/json
{
  • "code": 200,
  • "message": "ok"
}

Delete Extended Attribute of Object Template Instance

Authorizations:
Sign
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

Content type
application/json
{
  • "code": 200,
  • "message": "ok"
}

List Instance Self Attributes

Authorizations:
Sign
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

Content type
application/json
{
  • "code": 200,
  • "data": {
    },
  • "detail": "string",
  • "message": "ok"
}

label

Search Label Category List

Authorizations:
Sign
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

Content type
application/json
{
  • "code": 200,
  • "data": {
    },
  • "detail": "string",
  • "message": "ok"
}

Create Label Category

Authorizations:
Sign
Request Body schema: application/json

createLabelCategoryDto

appAccessMode
required
string
Enum: "PUBLIC" "PRIVATE"

Whether it can be seen in other apps

  • PUBLIC publicly-owned
  • PRIVATE privately-owned
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

Content type
application/json
{
  • "appAccessMode": "PUBLIC",
  • "appName": "system",
  • "appId": "system",
  • "comment": "This is a test label",
  • "displayName": "Category 1",
  • "enName": "labelCategory1",
  • "namespace": "system"
}

Response samples

Content type
application/json
{
  • "code": 200,
  • "data": 19999,
  • "detail": "string",
  • "message": "ok"
}

Get Label/Category

Authorizations:
Sign
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

Content type
application/json
{
  • "code": 200,
  • "data": {
    },
  • "detail": "string",
  • "message": "ok"
}

Search All Labels

Authorizations:
Sign
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

  • ATTRIBUTE Attribute
  • EVENT Event
  • SERVICE Service
  • SUBSCRIPTION Subscription
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

Content type
application/json
{
  • "code": 200,
  • "data": {
    },
  • "detail": "string",
  • "message": "ok"
}

Labels

Authorizations:
Sign
Request Body schema: application/json

createLabelDto

appAccessMode
required
string
Enum: "PUBLIC" "PRIVATE"

Whether it can be seen in other apps

  • PUBLIC publicly-owned
  • PRIVATE privately-owned
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

Content type
application/json
{
  • "appAccessMode": "PUBLIC",
  • "appName": "system",
  • "appId": "system",
  • "comment": "This is a test label",
  • "displayName": "Category 1",
  • "enName": "labelCategory1",
  • "namespace": "system",
  • "categoryId": 17777
}

Response samples

Content type
application/json
{
  • "code": 200,
  • "data": 19999,
  • "detail": "string",
  • "message": "ok"
}

Unbind Labels from Instance

Authorizations:
Sign
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

Content type
application/json
{
  • "instanceNames": [
    ],
  • "labelIds": [
    ]
}

Response samples

Content type
application/json
{
  • "code": 200,
  • "message": "ok"
}

Bind Labels to Instance

Authorizations:
Sign
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

Content type
application/json
{
  • "instanceId": "10001",
  • "labelIds": [
    ],
  • "relationId": 12333,
  • "templateId": 12332
}

Response samples

Content type
application/json
{
  • "code": 200,
  • "message": "ok"
}

network

List Networks

Authorizations:
Sign
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

Content type
application/json
{
  • "code": 200,
  • "data": {
    },
  • "detail": "string",
  • "message": "ok"
}

Create Network

Authorizations:
Sign
Request Body schema: application/json

dto

comment
string

Description

displayName
required
string <= 128 characters

Alias

enName
required
string <= 64 characters

Name

Responses

Request samples

Content type
application/json
{
  • "comment": "This is a newly-created network",
  • "displayName": "network1",
  • "enName": "network1"
}

Response samples

Content type
application/json
{
  • "code": 200,
  • "data": 19999,
  • "detail": "string",
  • "message": "ok"
}

Update Network

Authorizations:
Sign
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

Content type
application/json
{
  • "comment": "This is an edited network",
  • "displayName": "Edited network"
}

Response samples

Content type
application/json
{
  • "code": 200,
  • "message": "ok"
}

Delete Network

Authorizations:
Sign
path Parameters
networkName
required
string

Network alias, e.g., n1

Responses

Response samples

Content type
application/json
{
  • "code": 200,
  • "message": "ok"
}

Create Network Node

Authorizations:
Sign
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

Content type
application/json
{
  • "instanceName": "instance1",
  • "networkOrder": 2.3,
  • "parentId": -1,
  • "templateName": "t1",
  • "templateNamespace": "system"
}

Response samples

Content type
application/json
{
  • "code": 200,
  • "data": 19999,
  • "detail": "string",
  • "message": "ok"
}

Get Subtree of Current Node

Authorizations:
Sign
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

Content type
application/json
{
  • "code": 200,
  • "data": {
    },
  • "detail": "string",
  • "message": "ok"
}

Update Network Node

Authorizations:
Sign
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

Content type
application/json
{
  • "networkOrder": 2.3,
  • "parentId": 16666
}

Response samples

Content type
application/json
{
  • "code": 200,
  • "message": "ok"
}

Recursive Delete Network Node

Authorizations:
Sign
path Parameters
networkName
required
string
Example: n1

Network alias, e.g., n1

nodeId
required
integer <int64>
Example: 12222

Node ID, e.g., 12222

Responses

Response samples

Content type
application/json
{
  • "code": 200,
  • "message": "ok"
}

Get Network Tree Node

Authorizations:
Sign
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

Content type
application/json
{
  • "code": 200,
  • "data": {
    },
  • "detail": "string",
  • "message": "ok"
}

template

Create Template

Authorizations:
Sign
Request Body schema: application/json

dto

appAccessMode
required
string
Enum: "PUBLIC" "PRIVATE"

Whether it can be seen in other apps

  • PUBLIC publicly-owned
  • PRIVATE privately-owned
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)

  • ENTITY entity template
  • FORM form template
dataUsedBy
string
Default: "USER"
Enum: "SYSTEM" "USER"

The nature of data usage. If not specified, it will search within all scopes.

  • SYSTEM Data with template metadata created by internal services.
  • USER Data with template metadata created by users.
Array of objects (CreateTemplateAttributeWithAlarm)
Array of objects (CreateEvent)
Array of objects (CreateService)
Array of objects (CreateSubscription)

Responses

Request samples

Content type
application/json
{
  • "appAccessMode": "PUBLIC",
  • "appName": "system",
  • "appId": "system",
  • "comment": "Template created",
  • "displayAttributes": [
    ],
  • "displayName": "t1",
  • "enName": "t1",
  • "fileName": "boatxxx.png",
  • "functionSetIds": [
    ],
  • "iconPath": "/api/config/download?fileName=2021-03-02/1614673872183/boatxxx.png",
  • "labelIds": [
    ],
  • "namespace": "system",
  • "parentId": 10018,
  • "type": "ENTITY",
  • "dataUsedBy": "USER",
  • "attributeDtos": [
    ],
  • "eventDtos": [
    ],
  • "serviceDtos": [
    ],
  • "subscriptionDtos": [
    ]
}

Response samples

Content type
application/json
{
  • "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:
Sign
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

Content type
application/json
{
  • "code": 200,
  • "data": {
    },
  • "detail": "string",
  • "message": "ok"
}

Get All Templates under a Label

Authorizations:
Sign
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

  • ROOT Root template type
  • INTERNAL Internal template type
  • EXTERNAL External template type
  • RELATION Relation template type
  • ENTITY Entity template type
  • FORM Form template type
  • REMOTE Remote template type
  • COLLECTOR Collector template type
  • MAPPING Mapping template type
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

Content type
application/json
{
  • "code": 200,
  • "data": {
    },
  • "detail": "string",
  • "message": "ok"
}

Get Templates by Alias

Authorizations:
Sign
Request Body schema: application/json

dto

Array of objects (NameWithNamespace)

Template namespace and alias

Array
enName
string

Alias of an object of a certain type (template)

namespace
string

Namespace of an object of a certain type (template)

Responses

Request samples

Content type
application/json
{
  • "inputs": [
    ]
}

Response samples

Content type
application/json
{
  • "code": 200,
  • "data": [
    ],
  • "detail": "string",
  • "message": "ok"
}

Search Templates

Authorizations:
Sign
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

  • ROOT Root template type
  • INTERNAL Internal template type
  • EXTERNAL External template type
  • RELATION Relationship template type
  • ENTITY Entity template type
  • FORM Form template type
  • REMOTE Remote template type
  • COLLECTOR Collector template type
  • MAPPING Mapping template type
dataUsedBy
string
Default: "USER"
Enum: "SYSTEM" "USER"

Nature of data usage, e.g., USER

  • SYSTEM Metadata of the template is created by internal services
  • USER Metadata of the template is created by users

Responses

Response samples

Content type
application/json
{
  • "code": 200,
  • "data": {
    },
  • "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:
Sign
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

Content type
application/json
{
  • "code": 200,
  • "data": {
    },
  • "detail": "string",
  • "message": "ok"
}

Update Template

Authorizations:
Sign
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

  • PUBLIC publicly-owned
  • PRIVATE privately-owned
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

Content type
application/json
{
  • "appAccessMode": "PUBLIC",
  • "comment": "Modified template",
  • "displayAttributes": [
    ],
  • "displayName": "updatet1",
  • "functionSetIds": [
    ],
  • "iconPath": "/api/config/download?fileName=2021-03-02/1614673872183/boatxxx.png",
  • "id": 12345,
  • "labelIds": [
    ]
}

Response samples

Content type
application/json
{
  • "code": 200,
  • "message": "ok"
}

Delete Template

Authorizations:
Sign
path Parameters
templateNamespace
required
string

Template namespace, e.g., system

templateName
required
string

Template alias, e.g., t1

Responses

Response samples

Content type
application/json
{
  • "code": 200,
  • "message": "ok"
}

Get All Derived Templates

Authorizations:
Sign
path Parameters
templateNamespace
required
string
Example: system

Namespace, e.g., system

templateName
required
string
Example: t1

Template alias, e.g., t1

Responses

Response samples

Content type
application/json
{
  • "code": 200,
  • "data": [
    ],
  • "detail": "string",
  • "message": "ok"
}

Recursive Search for All Parent Templates

It includes the current template.

Authorizations:
Sign
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

Content type
application/json
{
  • "code": 200,
  • "data": {
    },
  • "detail": "string",
  • "message": "ok"
}

app

List by AppId

Authorizations:
Sign
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

Content type
application/json
{
  • "data": [
    ],
  • "pagination": {
    }
}

Search for All App IDs

Authorizations:
Sign
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.

  • TEMPLATE Template
  • FUNCTIONSET Function set
  • INSTANCE Instance
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.

  • ATTRIBUTE Attribute
  • EVENT event
  • SERVICE service
  • SUBSCRIPTION subscription
  • TEMPLATE template
  • FUNCTIONSET functionset
  • INSTANCE instance
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

Content type
application/json
{
  • "data": [
    ],
  • "pagination": {
    }
}

instance

Create a Regular Template Instance

Authorizations:
Sign
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

  • PUBLIC publicly-owned
  • PRIVATE privately-owned
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

Content type
application/json
{
  • "appAccessMode": "PUBLIC",
  • "appName": "system",
  • "appId": "system",
  • "attributeValues": [
    ],
  • "code": "xxxxx",
  • "comment": "Creating a test instance",
  • "displayName": "instance1",
  • "enName": "instance1",
  • "functionSetIds": [
    ],
  • "iconPath": "/api/config/download?fileName=2021-03-02/1614673872183/boatxxx.png",
  • "labelIds": [
    ]
}

Response samples

Content type
application/json
{
  • "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:
Sign
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

Array
object

Map type:attributeNameapce.attributeEnName:attributeValue

Responses

Request samples

Content type
application/json
[
  • {
    }
]

Response samples

Content type
application/json
{
  • "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:
Sign
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

Content type
application/json
{
  • "distinct": true,
  • "orderBys": [
    ],
  • "selectAttributeNames": [
    ],
  • "where": {
    }
}

Response samples

Content type
application/json
{
  • "code": 200,
  • "data": {
    },
  • "detail": "string",
  • "message": "ok"
}

Update Template Instance

Authorizations:
Sign
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

  • PUBLIC publicly-owned
  • PRIVATE privately-owned
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

Content type
application/json
{
  • "appAccessMode": "PUBLIC",
  • "attributeValues": [
    ],
  • "code": "xxxxx",
  • "comment": "Modifying the entity template instance",
  • "displayName": "updateInsatnce1",
  • "functionSetIds": [
    ],
  • "iconPath": "/api/config/download?fileName=2021-03-02/1614673872183/boatxxx.png",
  • "labelIds": [
    ],
  • "needSetPropertyVqtValue": false,
  • "needSetMetadata": false
}

Response samples

Content type
application/json
{
  • "code": 200,
  • "message": "ok"
}

Delete Entity Template Instance

Authorizations:
Sign
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

Content type
application/json
{
  • "code": 200,
  • "message": "ok"
}

Search Normal Instances

Authorizations:
Sign
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.
1. When performing fuzzy search on dateTime type, the stored value is in UTC, and time zone conversion needs to be done manually.
2. This field does not support fuzzy queries for boolean type attributes.

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

Content type
application/json
{
  • "code": 200,
  • "data": {
    },
  • "detail": "string",
  • "message": "ok"
}

Get Instance Details by Instance Alias

Currently, it only supports entity template instances

Authorizations:
Sign
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

Content type
application/json
{
  • "system.enName": "zhangsan"
}

Get Instance Details under an Entity Template

Authorizations:
Sign
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

Content type
application/json
{
  • "code": 200,
  • "data": {
    },
  • "detail": "string",
  • "message": "ok"
}

Search Relation Instances

Authorizations:
Sign
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;
1. When performing fuzzy search on dateTime type, the stored value is in the 0 time zone and needs to be converted accordingly.
2. This field does not support fuzzy queries for boolean type attributes.

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

Content type
application/json
{
  • "data": [
    ],
  • "titles": [
    ],
  • "total": 1000,
  • "pageIndex": 1,
  • "pageSize": 20
}

event

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:
Sign
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

Content type
application/json
{
  • "data": [
    ],
  • "pageIndex": 1,
  • "pageSize": 20,
  • "total": 20
}

relation

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:
Sign
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

  • TEMPLATE Template
  • RELATION Relation
  • ATTRIBUTE Attribute
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

Content type
application/json
{
  • "list": [
    ],
  • "pagination": {
    }
}

Get Nodes by RelationID

Authorizations:
Sign
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

Content type
application/json
[
  • {
    }
]

alarm

Confirm Real-time Alarm Information

Authorizations:
Sign
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

Content type
application/json
{
  • "ackAll": false,
  • "userName": "Zhang San",
  • "fullNames": [
    ]
}

Response samples

Content type
application/json
{
  • "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:
Sign
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

Content type
application/json
{
  • "list": [
    ],
  • "pagination": {
    }
}

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:
Sign
Request Body schema: application/json

dto

Array of objects (CreateAlarmDtoWithSource)
Array
templateName
required
string

Template information

attributeName
required
string

Attribute information

instanceName
string

Instance alias

displayName
required
string

name

priority
required
integer <int32>

Priority (1-10)

enable
boolean
Default: false

Enable flag

operator
required
string
Enum: "LT" "LE" "GT" "GE" "EQ"

条件

  • LT Less than
  • LE Less than or equal to
  • GT Greater than
  • GE Greater than or equal to
  • EQ Equal to
limitValue
required
string

Limit value (numeric for numeric attributes, true/false for boolean attributes)

deadBand
required
number <double>

Deadband value

deadBandType
required
string
Enum: "NUMERIC" "PERCENT"

Deadband value type

  • NUMERIC Numeric type
  • PERCENT Percentage type
comment
string

Description

alarmType
string

Alarm type

Responses

Request samples

Content type
application/json
{
  • "dtos": [
    ]
}

Response samples

Content type
application/json
{
  • "code": 10001001,
  • "data": { },
  • "detail": "string",
  • "message": "string",
  • "context": { },
  • "targetService": "string"
}

Modify Alarm Rules

Modify alarm rules

Authorizations:
Sign
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)

  • LT Less than
  • LE Less than or equal to
  • GT Greater than
  • GE Greater than or equal to
  • EQ Equal to
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

  • NUMERIC Numeric type
  • PERCENT Percentage
comment
string <= 1024 characters

Description

alarmType
string <= 128 characters

Alarm type

Responses

Request samples

Content type
application/json
{
  • "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

Content type
application/json
{
  • "code": 200,
  • "message": "ok"
}

Delete Alarm Rule

Delete alarm rule, returns success even if the alarm rule is not found

Authorizations:
Sign
path Parameters
name
required
string
Example: e82d430a-c503-4f28-a063-54d981eec43e

Alarm alias, currently the alias is a system-generated UUID at the time of creation

Responses

List Alarms by Attributed ID

Authorizations:
Sign
path Parameters
attributeFullName
required
string
Examples:
  • system.t1.sytem.p1 -
  • system.t2.instance1.system.p2 -

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

Content type
application/json
[
  • {
    }
]

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:
Sign
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

Content type
application/json
{
  • "system.Template_823.msa_test_05.p1_a1": [
    ],
  • "system.Template_829.msa_test_09.p1_a2": [ ]
}

alarm history

Query Alert History

Authorizations:
Sign
path Parameters
alertRecordId
required
string

Alert record ID

Responses

Response samples

Content type
application/json
[
  • {
    }
]

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:
Sign
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

Content type
application/json
{
  • "list": [
    ],
  • "pagination": {
    }
}

subscription

Search Subscriptions

Authorizations:
Sign
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

Content type
application/json
{
  • "list": [
    ],
  • "pagination": {
    }
}

Search Template Subscriptions

Authorizations:
Sign
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

Content type
application/json
{
  • "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": [
    ],
  • "appId": "system",
  • "timingTrigger": {
    },
  • "eventTriggers": [
    ]
}

Search Instance Subscriptions

Authorizations:
Sign
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

Content type
application/json
{
  • "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": [
    ],
  • "appId": "system",
  • "timingTrigger": {
    },
  • "eventTriggers": [
    ]
}

Batch Update Entity Template Instance Subscriptions

Support batch update of subscriptions across instances

Authorizations:
Sign
Request Body schema: application/json

Update instance subscriptions

Array (<= 100 items)
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

  • PUBLIC accessible to all apps
  • PRIVATE accessible only to the creating app
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

  • EVENT event
  • TIMING timing
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

Content type
application/json
[
  • {
    }
]

Response samples

Content type
application/json
{
  • "code": 10001001,
  • "data": { },
  • "detail": "string",
  • "message": "string",
  • "context": { },
  • "targetService": "string"
}

Batch Create Entity Template Instance Subscriptions

Support batch creation of subscriptions across instances

Authorizations:
Sign
Request Body schema: application/json

Create instance subscription

Array (<= 100 items)
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

  • PUBLIC accessible to all apps
  • PRIVATE accessible only to the creating app
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

  • EVENT event
  • TIMING timing
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

Content type
application/json
[
  • {
    }
]

Response samples

Content type
application/json
{
  • "code": 10001001,
  • "data": { },
  • "detail": "string",
  • "message": "string",
  • "context": { },
  • "targetService": "string"
}

Batch Delete Entity Template Instance Subscriptions

Support batch delete of subscriptions across instances

Authorizations:
Sign
Request Body schema: application/json

Delete instance subscriptions

Array (<= 100 items)
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

Content type
application/json
[
  • {
    }
]

model import/export

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:
Sign
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

Content type
application/json
{
  • "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:
Sign
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

Content type
application/json
{
  • "appId": "App_1af1a690b81b7cabc2f5fde0b00d15ad"
}

Response samples

Content type
application/json
{
  • "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:
Sign
path Parameters
taskId
required
string <= 32 characters
Example: ac063e0a4ecb439186f6ae7eb9223842

task id

Responses

Response samples

Content type
application/json
{
  • "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:
Sign
path Parameters
taskId
required
string <= 32 characters
Example: ac063e0a4ecb439186f6ae7eb9223842

task id

Responses

Response samples

Content type
application/json
{
  • "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:
Sign
path Parameters
taskId
required
string <= 32 characters
Example: ac063e0a4ecb439186f6ae7eb9223842

task id

Responses

Response samples

Content type
application/json
{
  • "taskId": "ac063e0a4ecb439186f6ae7eb9223842",
  • "createdTime": "2019-08-24T14:15:22Z",
  • "finishedTime": "2019-08-24T14:15:22Z",
  • "status": 0,
  • "message": "string"
}