Create Asset
POST/organizations/:organizationId/assets
Create asset
Request
Path Parameters
The ID of organization.
- application/json
Body
required
The asset type ID.
The location ID.
The integration service ID of asset.
The IDs of asset.
The name of asset.
The description of asset.
The ID of chat room.
The serial number of asset.
The model of name.
The name of manufacturer.
The year of manufacture of asset.
The purchase cost of asset.
The purchase date of asset.
The warranty end date of asset.
The uuid of device to filter assets.
The image of asset.
The files of asset.
The interval of keep alive.
Responses
- 200
- 401
- 403
- 404
- 409
- 422
- application/json
- Schema
- Example (from schema)
- Example
Schema
- Array [
- ]
data objectrequired
Data of the asset.
assetType objectrequired
properties object[]required
location objectrequired
shadows objectrequired
{
"data": {
"id": "string",
"organizationId": "string",
"assetTypeId": "string",
"locationId": "string",
"integrationServiceId": "string",
"linkIds": "string",
"name": "string",
"description": "string",
"chatRoomId": "string",
"serialNumber": "string",
"modelName": "string",
"nameOfManufacturer": "string",
"yearOfManufacture": 0,
"purchaseCost": 0,
"purchaseDate": 0,
"warrantyEndDate": 0,
"assetType": {
"id": "string",
"name": "string",
"isIotDevice": "string",
"supportedAssetTypeId": "string",
"properties": [
{}
]
},
"location": {
"id": "string",
"name": "string"
},
"devEui": "string",
"uuid": "string",
"image": "string",
"files": {},
"keepAlive": 0,
"connectionStatus": true,
"status": "string",
"shadows": {},
"createdAtDateString": 0,
"createdAt": 0
}
}
{
"data": {
"id": "o-organizationId-a-assetId",
"organizationId": "o-organizationId",
"assetTypeId": "at-assetTypeId",
"locationId": "l-locationId",
"integrationServiceId": "is-integrationServiceId",
"linkIds": [
"a-assetId"
],
"name": "IDT-Bot-Asset",
"description": "IDT-Bot-Asset-Description",
"chatRoomId": "ABCDE",
"serialNumber": "123456789",
"modelName": "Bot-Model-Name",
"nameOfManufacturer": "Bot-Manufacturer",
"yearOfManufacture": 2024,
"purchaseCost": 12345,
"purchaseDate": 1700000000000,
"warrantyEndDate": 1800000000000,
"assetType": {
"id": "at-assetType",
"name": "assetType",
"isIotDevice": true,
"supportedAssetTypeId": "Infodeck-NS300-ABC",
"properties": [
{
"name": "Battery",
"unit": "%",
"type": "integer",
"key": "Battery"
}
]
},
"location": {
"id": "locationId",
"name": "location"
},
"devEui": "24e124535b312345",
"uuid": "24e124535b312345",
"image": "Asset-Image.png",
"files": [
"Infodeck-Bot-0001.pdf"
],
"keepAlive": 2592000,
"connectionStatus": false,
"status": "Normal",
"shadows": {},
"createdAtDateString": "2024-01-01T00:00:00.000Z",
"createdAt": 1704067200000
}
}
The request has not permission.
- application/json
- Schema
- Example (from schema)
- Example
Schema
The request has not permission.
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
The request has not permission.
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
The resource hasn't found.
The resource hasn't found message.
{
"error": "string",
"message": "string"
}
{
"error": "ResourceNotFound",
"message": "The requested resource could not be found."
}
The resource already exists.
- application/json
- Schema
- Example (from schema)
- Example
Schema
The resource already exists.
The resource already exists message.
{
"error": "string",
"message": "string"
}
{
"error": "ResourceAlreadyExistsError",
"message": "The operation cannot be completed because a resource with the specified identifier already exists."
}
The input data has invalid.
- application/json
- Schema
- Example (from schema)
- Example
Schema
The input data has invalid.
The input data has invalid message.
{
"error": "string",
"message": "string"
}
{
"error": "ValidationError",
"message": "Input data validation failed."
}