Update Asset Type
PUThttps://app.infodeck.io/api/organizations/:organizationId/asset-types/:assetTypeId
Update asset type
Request
Path Parameters
organizationId stringrequired
The ID of organization.
assetTypeId stringrequired
The ID of asset type.
- application/json
Body
required
name stringrequired
The name of asset type
description string
The description of asset type
supportedAssetTypeId string
The id of supported model
isIotDevice stringrequired
Is the asset an IoT device?
image string
The custom image of asset type
encodeCodec string
The encode codec of asset type
decodeCodec string
The decode codec of asset type
properties object[]
actions object[]
Responses
- 200
- 401
- 403
- 404
- 422
- application/json
- Schema
- Example (from schema)
- Example
Schema
data objectrequired
{
"data": {
"supportedAssetTypeId": "string",
"name": "string",
"description": "string",
"isIotDevice": "string",
"image": "string",
"encodeCodec": "string",
"decodeCodec": "string",
"properties": [
{}
],
"actions": [
{}
],
"updatedBy": "string",
"updatedAtDateString": "string",
"updatedAt": 0
}
}
{
"supportedAssetTypeId": "Infodeck-NS300-ABC",
"name": "IDT-Bot-AssetType",
"description": "IDT-AssetType-Description",
"isIotDevice": true,
"image": "Asset-Type-Image.png",
"encodeCodec": "function encodeDownlink(input) {\n const bytes = [];\n\n return {\n bytes,\n };\n}",
"decodeCodec": "function decodeUplink(input) {\n const bytes = input.bytes;\n const data = {};\n\n return {\n data,\n };\n}",
"properties": [
{
"key": "Power",
"name": "Power",
"type": "integer",
"unit": "W"
}
],
"actions": [
{
"confirmed": true,
"fPort": 85,
"name": "Power On",
"payload": "080100ff",
"payloadDataType": "Hex"
}
],
"updatedBy": "d6b0e137-xxxx-xxxx-xxxx-c944cc12a5f4",
"updatedAtDateString": "2024-01-31T00:00:00.000Z",
"updatedAt": 1706659200000
}
The request has not permission.
- application/json
- Schema
- Example (from schema)
- Example
Schema
error stringrequired
The request has not permission.
message stringrequired
The request has not permission message.
{
"error": "string",
"message": "string"
}
{
"error": "Unauthenticated",
"message": "Authentication is required and has failed or has not yet been provided."
}
The request has not permission.
- application/json
- Schema
- Example (from schema)
- Example
Schema
error stringrequired
The request has not permission.
message stringrequired
The request has not permission message.
{
"error": "string",
"message": "string"
}
{
"error": "Forbidden",
"message": "Access to the requested resource is forbidden."
}
The resource hasn't found.
- application/json
- Schema
- Example (from schema)
- Example
Schema
error stringrequired
The resource hasn't found.
message stringrequired
The resource hasn't found message.
{
"error": "string",
"message": "string"
}
{
"error": "ResourceNotFound",
"message": "The requested resource could not be found."
}
The input data has invalid.
- application/json
- Schema
- Example (from schema)
- Example
Schema
error stringrequired
The input data has invalid.
message stringrequired
The input data has invalid message.
{
"error": "string",
"message": "string"
}
{
"error": "ValidationError",
"message": "Input data validation failed."
}
Authorization: http
name: usertype: httpscheme: bearerbearerFormat: JWTdescription: Get your API token via POST /authentications/tokens
- curl
- python
- go
- nodejs
- ruby
- csharp
- php
- java
- powershell
- CURL
curl -L -X PUT 'https://app.infodeck.io/api/organizations/:organizationId/asset-types/:assetTypeId' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <TOKEN>' \
--data-raw '{
"name": "string",
"description": "string",
"supportedAssetTypeId": "string",
"isIotDevice": "string",
"image": "string",
"encodeCodec": "string",
"decodeCodec": "string",
"properties": [
{}
],
"actions": [
{}
]
}'
ResponseClear