Bulk create devices
POST http://localhost:8080/core/api/v1/projects/:project_id/fleets/:fleet_id/devices/bulk
Bulk creates devices into the fleet of the project.
Path Parameters
- project_id string required
Project ID
- fleet_id string required
Fleet ID
- application/json
Request Body required
Device Bulk Create Body
- certificate_id string
- connected boolean
- currentShadow integer[]
- device_count integer required
Query level
device_data_point_config object[]
- device_names string[]
- device_prefix string
- device_suffix string
- fleet_device_template_id string
Template to refer the creation
- fleet_id string
- last_seen string
- org_id string
- project_id string
- shadow_definition_id string
- status_flags integer
- tags string[]
Responses
- 200
- 400
- 401
- 403
Success" {"ok":1,"data":{"deviceIds":["<device_id_1>","<device_id_2>"]}}
- application/json
- Schema
- Example (from schema)
Schema
{}
Bad Request" {"ok":0,"error":{"code":400,"message":"<error_message>"}}
- application/json
- Schema
- Example (from schema)
Schema
{}
Unauthorized" {"ok":0,"error":{"code":401,"message":"<error_message>"}}
- application/json
- Schema
- Example (from schema)
Schema
{}
Forbidden" {"ok":0,"error":{"code":403,"message":"<error_message>"}}
- application/json
- Schema
- Example (from schema)
Schema
{}
Request
Request
curl / cURL
curl -L -X POST 'http://localhost:8080/core/api/v1/projects/:project_id/fleets/:fleet_id/devices/bulk' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
--data-raw '{
"certificate_id": "string",
"connected": true,
"currentShadow": [
0
],
"device_count": 0,
"device_data_point_config": [
{
"active": true,
"data_point_definition_id": "string",
"data_point_name": "string",
"device_data_policy_id": "string"
}
],
"device_names": [
"string"
],
"device_prefix": "string",
"device_suffix": "string",
"fleet_device_template_id": "string",
"fleet_id": "string",
"last_seen": "string",
"org_id": "string",
"project_id": "string",
"shadow_definition_id": "string",
"status_flags": 0,
"tags": [
"string"
]
}'
python / requests
curl -L -X POST 'http://localhost:8080/core/api/v1/projects/:project_id/fleets/:fleet_id/devices/bulk' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
--data-raw '{
"certificate_id": "string",
"connected": true,
"currentShadow": [
0
],
"device_count": 0,
"device_data_point_config": [
{
"active": true,
"data_point_definition_id": "string",
"data_point_name": "string",
"device_data_policy_id": "string"
}
],
"device_names": [
"string"
],
"device_prefix": "string",
"device_suffix": "string",
"fleet_device_template_id": "string",
"fleet_id": "string",
"last_seen": "string",
"org_id": "string",
"project_id": "string",
"shadow_definition_id": "string",
"status_flags": 0,
"tags": [
"string"
]
}'
go / native
curl -L -X POST 'http://localhost:8080/core/api/v1/projects/:project_id/fleets/:fleet_id/devices/bulk' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
--data-raw '{
"certificate_id": "string",
"connected": true,
"currentShadow": [
0
],
"device_count": 0,
"device_data_point_config": [
{
"active": true,
"data_point_definition_id": "string",
"data_point_name": "string",
"device_data_policy_id": "string"
}
],
"device_names": [
"string"
],
"device_prefix": "string",
"device_suffix": "string",
"fleet_device_template_id": "string",
"fleet_id": "string",
"last_seen": "string",
"org_id": "string",
"project_id": "string",
"shadow_definition_id": "string",
"status_flags": 0,
"tags": [
"string"
]
}'
nodejs / axios
curl -L -X POST 'http://localhost:8080/core/api/v1/projects/:project_id/fleets/:fleet_id/devices/bulk' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
--data-raw '{
"certificate_id": "string",
"connected": true,
"currentShadow": [
0
],
"device_count": 0,
"device_data_point_config": [
{
"active": true,
"data_point_definition_id": "string",
"data_point_name": "string",
"device_data_policy_id": "string"
}
],
"device_names": [
"string"
],
"device_prefix": "string",
"device_suffix": "string",
"fleet_device_template_id": "string",
"fleet_id": "string",
"last_seen": "string",
"org_id": "string",
"project_id": "string",
"shadow_definition_id": "string",
"status_flags": 0,
"tags": [
"string"
]
}'