This document provides a detailed step-by-step description of how to use the Device Activation and Device Group Assignment APIs
Link to API Documentation: https://app.swaggerhub.com/apis/celonanetworks/celona-network_management_api/1.0.0#/default/bulkUpdateDevicesJson
API Endpoint: /v1/api/cfgm/update-devices
The following device properties can be updated using above API:
Device Activation
Device Deactivation
Device Group assignment
Device Name
SIM Lock
Device Static IP address
CSV API Endpoint: /v1/api/cfgm/update-devices-csv
This API accepts a CSV file containing device information and below specified attributes/cells.
CSV File Format
The first row must specify the names of the attributes to be updated
The attribute names are case-sensitive
The attribute names can be in any order
A cell should be left blank if that field should not be updated
A cell value having double quotes ("") is treated as empty value and that field will not be updated
Attributes/Cells:
iccid
: mandatory and the following are needed only if they are to be updatedname
: Name of the device.device_group_name
: Name of the device group the device belongs to. Specify 'default' (all lowercase, no quotes) for the default device-group.authorized_edge_clusters_type
: one of the following values:ALL
LIST
authorized_edge_clusters
: a pipe-separated (|
) list of edge-cluster IDs. For example:ec-id1|ec-id2
. Must be specified only ifauthorized_edge_clusters_type
isLIST
.sim_lock_enabled
: SIM lock configuration for the device.true
to enable, any other values will be considered as false and disable SIM lock.sim_lock_policy
: If sim lock is enabled, one of the following two policies must be specified:ONATTACH
IMEIMAPPING
EID
sim_lock_expected_imei
: 15-digit IMEI number must be specified ifsim_lock_policy
isIMEIMAPPING
.static_ipaddress
: Static IP address for the device.
API call example
update-devices
https://api.celona.io/v1/api/cfgm/update-devices?customer_id=10001
update-devices-csv
https://api.celona.io/v1/api/cfgm/update-devices-csv?customer_id=10006
API Request
update-devices
curl -X 'POST' \ 'https://api.celona.io/v1/api/cfgm/update-devices?customer_id=10001' \ -H 'accept: application/json' \ -H 'Content-Type: application/json' \ -d '[ { "iccid": "string", "device_group_name": "string", "name": "string", "authorized_edge_clusters_type": "ALL", "authorized_edge_clusters": [ "string" ], "sim_lock_enabled": true, "sim_lock_policy": "ONATTACH", "sim_lock_expected_imei": "string", "static_ip_address": "string", "reason": "SIM_LOCK_IMEI_MISMATCH" } ]'
update-devices-csv
curl -X 'POST' \ 'https://api.celona.io/v1/api/cfgm/update-devices-csv?customer_id=10006' \ -H 'accept: application/json' \ -H 'Content-Type: multipart/form-data' \ -F 'device_updates_csv_file=@example.csv;type=text/csv'
API Sample Responses for failures:
update-devices
& update-devices-csv
200:
description: All devices are updated successfully.
schema:
type: string
400:
description: Bad Request. None of the devices are updated.
schema:
type: array
items:
$ref: '#/definitions/CNUpdateDevicesCsvError'
[ { "csv_error": "string", "device_errors": [ { "iccid": "string", "error": "string" } ] } ]
403:
description: Not authorized.
schema:
type: string
404:
description: Not Found. None of the devices are updated.
schema:
type: string
500:
description: Internal server error. None of the devices are updated.
schema:
type: string