Create Device
Cloud Mock
Cloud Mock
POST
/v1/site/{siteId}/devices
devices
Request
Authorization
Provide your bearer token in the
Authorization
header when making requests to protected resources.Example:
Authorization: Bearer ********************
Path Params
siteId
string
required
Body Params application/json
id
string
Id
site_id
string
required
manufacturer_name
string
Manufacturer Name
product_name
string
Product Name
serial_number
string
Serial Number
type
enum<string>
required
Allowed values:
BATTERYEV_CHARGER
attributes
object (DeviceBatteryAttributes)
required
type
. They are not user-adjustable and should be configured during installation / commissioning.battery_capacity_wh
integer
required
battery_power_input_w
integer
required
battery_power_output_w
integer
required
configuration
object (DeviceBatteryConfig)
deprecated
reserve_percentage
integer
deprecated
Example
Request samples
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://mock.apidog.com/m1/479670-0-default/v1/site//devices' \
--header 'Content-Type: application/json' \
--data-raw ''
Responses
🟢200OK
application/json
Body
id
string
Id
site_id
string
required
manufacturer_name
string
Manufacturer Name
product_name
string
Product Name
serial_number
string
Serial Number
type
enum<string>
required
Allowed values:
BATTERYEV_CHARGER
attributes
object (DeviceBatteryAttributes)
required
type
. They are not user-adjustable and should be configured during installation / commissioning.battery_capacity_wh
integer
required
battery_power_input_w
integer
required
battery_power_output_w
integer
required
configuration
object (DeviceBatteryConfig)
required
type
reserve_percentage
integer
required
install_date
string <date-time> | null
read-onlyoptional
created_at
string <date-time>
Created At
updated_at
string <date-time>
Updated At
Example
{
"id": "string",
"site_id": "string",
"manufacturer_name": "string",
"product_name": "string",
"serial_number": "string",
"type": "BATTERY",
"attributes": {
"battery_capacity_wh": 0,
"battery_power_input_w": 0,
"battery_power_output_w": 0
},
"configuration": {
"reserve_percentage": 0
},
"install_date": "2019-08-24T14:15:22Z",
"created_at": "2019-08-24T14:15:22Z",
"updated_at": "2019-08-24T14:15:22Z"
}
🟠400Invalid input
🟠409Conflict
Modified at 2025-03-26 20:29:29