Skip to main content
All CollectionsDeveloper Documentation
Device Management API: Bulk operations via CSV file upload
Device Management API: Bulk operations via CSV file upload

API operations for bulk device activation/deactivation, device group assignment, SIM Lock and Static IP addressing

Team Celona avatar
Written by Team Celona
Updated over a week ago

This document provides a detailed step-by-step description of how to use the Device Activation and Device Group Assignment APIs

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

  1. The first row must specify the names of the attributes to be updated

  2. The attribute names are case-sensitive

  3. The attribute names can be in any order

  4. A cell should be left blank if that field should not be updated

  5. A cell value having double quotes ("") is treated as empty value and that field will not be updated

  6. Attributes/Cells:

    • iccid: mandatory and the following are needed only if they are to be updated

    • name: 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 if authorized_edge_clusters_typeis LIST.

    • sim_lock_enabled: SIM lock configuration for the device. trueto 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 if sim_lock_policy is IMEIMAPPING.

    • 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
Did this answer your question?