latestOpenAPI 3.1.0Apache License Version 2.02026-08-17498525913.3 KB

40169ccdec5c

asset-profile-controller

Create Or Update Asset Profile (saveAssetProfile)

Create or update the Asset Profile. When creating asset profile, platform generates asset profile id as time-based UUID. The newly created asset profile id will be present in the response. Specify existing asset profile id to update the asset profile. Referencing non-existing asset profile Id will cause 'Not Found' error.

Asset profile name is unique in the scope of tenant. Only one 'default' asset profile may exist in scope of tenant. Remove 'id', 'tenantId' from the request body example (below) to create new Asset Profile entity.

Available for users with 'TENANT_ADMIN' authority.

post/api/assetProfile

Request body

createdTimeinteger

Timestamp of the profile creation, in milliseconds

namestring

Unique Asset Profile Name in scope of Tenant.

descriptionstring

Asset Profile description.

imagestring

Either URL or Base64 data of the icon. Used in the mobile application to visualize set of asset profiles in the grid view.

defaultQueueNamestring

Rule engine queue name. If present, the specified queue will be used to store all unprocessed messages related to asset, including asset updates, telemetry, attribute updates, etc. Otherwise, the 'Main' queue will be used to store those messages.

versioninteger
defaultboolean

Used to mark the default profile. Default profile is used when the asset profile is not specified during asset creation.

Example request

{
  "id": {
    "id": "784f394c-42b6-435a-983c-b7beff2784f9",
    "entityType": "ASSET_PROFILE"
  },
  "createdTime": 1609459200000,
  "tenantId": {
    "id": "784f394c-42b6-435a-983c-b7beff2784f9",
    "entityType": "TENANT"
  },
  "name": "Building",
  "defaultRuleChainId": {
    "id": "784f394c-42b6-435a-983c-b7beff2784f9",
    "entityType": "RULE_CHAIN"
  },
  "defaultDashboardId": {
    "id": "784f394c-42b6-435a-983c-b7beff2784f9",
    "entityType": "DASHBOARD"
  },
  "defaultEdgeRuleChainId": {
    "id": "784f394c-42b6-435a-983c-b7beff2784f9",
    "entityType": "RULE_CHAIN"
  }
}

Response

OK

createdTimeinteger

Timestamp of the profile creation, in milliseconds

namestring

Unique Asset Profile Name in scope of Tenant.

descriptionstring

Asset Profile description.

imagestring

Either URL or Base64 data of the icon. Used in the mobile application to visualize set of asset profiles in the grid view.

defaultQueueNamestring

Rule engine queue name. If present, the specified queue will be used to store all unprocessed messages related to asset, including asset updates, telemetry, attribute updates, etc. Otherwise, the 'Main' queue will be used to store those messages.

versioninteger
defaultboolean

Used to mark the default profile. Default profile is used when the asset profile is not specified during asset creation.

Example response

{
  "id": {
    "id": "784f394c-42b6-435a-983c-b7beff2784f9",
    "entityType": "ASSET_PROFILE"
  },
  "createdTime": 1609459200000,
  "tenantId": {
    "id": "784f394c-42b6-435a-983c-b7beff2784f9",
    "entityType": "TENANT"
  },
  "name": "Building",
  "defaultRuleChainId": {
    "id": "784f394c-42b6-435a-983c-b7beff2784f9",
    "entityType": "RULE_CHAIN"
  },
  "defaultDashboardId": {
    "id": "784f394c-42b6-435a-983c-b7beff2784f9",
    "entityType": "DASHBOARD"
  },
  "defaultEdgeRuleChainId": {
    "id": "784f394c-42b6-435a-983c-b7beff2784f9",
    "entityType": "RULE_CHAIN"
  }
}