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
- Base URLhttps://demo.thingsboard.io
- Authnone declared
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Request body
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
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"
}
}Changes
No recorded changes to this operation across all 2 revisions of this API.