Device Create and Device Update Samples
Create one or more Devices
Property | Description |
Resource URL | /customer/v1/{customer_id}/service_provisioning/devicesUpdate |
Method | POST |
Body | Device Object List |
Sample Request
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 |
POST /customer/v1/5a393ea210d91806b7ef702c/service_provisioning/devicesUpdate HEADER authorization:Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiIiLCJpYXQiOjEzMzIwNjk5MDIsImV4cCI6MTUyMTM3NDE5OSwiYXVkIjoiIiwic3ViIjoiIiwiY3VzdG9tZXJfaWQiOiI1YTM5M2VhMjEwZDkxODA2YjdlZjcwMmMifQ.u4kBXOHCP7W-Vg9oSfkFniSKbxj8t1ULMnTcCAS2ykw { "request_id":"", "request_parameters":[ { "device_id":"", "device_name":"gas_tank_g2", "service_template_id":"config_profile_utililty_group1", "state":true, "device_type":"", "device_model":"", "device_firmware":"", "imsi":"901995678912341", "imei":"", "device_ip":"", "device_port":"", "device_app_protocol":"", "gpsloc_lat":"51.2277° N", "gpsloc_long":"6.7735° E", "auto_capture_device_token":false, "device_token":"", "pki_auth_pem_dev_cert":"", "pki_auth_pem_srv_cert":"", "pki_auth_pem_srv_key":"" }, { "device_name":"gas_tank_g2", "service_template_id":"config_profile_utililty_group1XXZZZXXZZ", "state":true, "imsi":"234991123456789", "gpsloc_lat":"51.2277° N", "gpsloc_long":"6.7735° E" }, { "device_name":"gas_smart_k55", "service_template_id":"config_profile_SmartDev_r22", "state":true } ] } |
Sample Response
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 |
{ "request_id":"", "result_code":0, "result_description":"Success", "response":{ "error_queue":[ { "device_id":"", "device_name":"gas_tank_g2", "service_template_id":"config_profile_utililty_group1XXZZZXXZZ", "state":true, "device_type":"", "device_model":"", "device_firmware":"", "imsi":"234991123456789", "imei":"", "device_ip":"", "device_port":"", "device_app_protocol":"", "gpsloc_lat":"51.2277° N", "gpsloc_long":"6.7735° E", "auto_capture_device_token":false, "device_token":"", "pki_auth_pem_dev_cert":"", "pki_auth_pem_srv_cert":"", "pki_auth_pem_srv_key":"", "error":"config_profile_utililty_group1XXZZZXXZZ not found - valid service_template_id required" } ], "completed_queue":[ { "udid":"5ab7fe554b04a933f459da0d", "state":true, "device_id":"", "service_template_id":"config_profile_utililty_group1", "device_port":0, "device_ip":"", "imsi":"901995678912341", "imei":"", "device_name":"gas_tank_g2", "device_model":"", "device_firmware":"", "device_type":"", "device_token":"", "last_activity":null, "last_wakeup":null, "connection_time":null, "signal_strength":"", "gpsloc_lat":"51.2277° N", "gpsloc_long":"6.7735° E", "create_time":"2016-03-25T19:53:57.729Z", "auto_capture_device_token":false, "first_session":null, "radius_auth_password":"", "radius_auth_username":"", "pki_auth_pem_srv_key":"", "pki_auth_pem_srv_cert":"", "pki_auth_pem_dev_cert":"", "disconnection_time":null, "last_accessed_sap_list":[ ], "custom_field_1":"", "custom_field_2":"" }, { "udid":"5ab7fe554b04a933f459da0e", "state":true, "device_id":"", "service_template_id":"config_profile_SmartDev_r22", "device_port":0, "device_ip":"", "imsi":"", "imei":"", "device_name":"gas_smart_k55", "device_model":"", "device_firmware":"", "device_type":"", "device_token":"", "last_activity":null, "last_wakeup":null, "connection_time":null, "signal_strength":"", "gpsloc_long":"", "gpsloc_lat":"", "create_time":"2016-03-25T19:53:57.729Z", "auto_capture_device_token":false, "first_session":null, "radius_auth_password":"", "radius_auth_username":"", "pki_auth_pem_srv_key":"", "pki_auth_pem_srv_cert":"", "pki_auth_pem_dev_cert":"", "disconnection_time":null, "last_accessed_sap_list":[ ], "custom_field_1":"", "custom_field_2":"" } ] } } |
Note:
A unique device identifier (UDID) is assigned to each device object successfully created.
A unique device identifier (UDID) is assigned to each device object successfully created.
Update one or more Devices
Property | Description |
Resource URL | /customer/v1/{customer_id} /service_provisioning/devicesUpdate |
Method | PUT |
Body | Device Object List |
Sample Request
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
POST /customer/v1/5a393ea210d91806b7ef702c/service_provisioning/devicesUpdate HEADER authorization:Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiIiLCJpYXQiOjEzMzIwNjk5MDIsImV4cCI6MTUyMTM3NDE5OSwiYXVkIjoiIiwic3ViIjoiIiwiY3VzdG9tZXJfaWQiOiI1YTM5M2VhMjEwZDkxODA2YjdlZjcwMmMifQ.u4kBXOHCP7W-Vg9oSfkFniSKbxj8t1ULMnTcCAS2ykw { "request_id":"", "request_parameters":[ { "udid":"5ab7fe554b04a933f459da0d", "state":true, "service_template_id":"config_profile_utililty_group1", "device_name":"gas_tank_g3", "device_token":"jV3dUvNQn6246Dfe1v" }, { "udid":"5ab7fe554b04a933f459da0e", "state":false, "device_id":"Q3009qC1001", "service_template_id":"config_profile_utililty_group1" } ] } |
Sample Response
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 |
{ "request_id":"", "result_code":0, "result_description":"Success", "response":{ "error_queue":[ ], "completed_queue":[ { "udid":"5ab7fe554b04a933f459da0d", "state":true, "device_id":"", "service_template_id":"config_profile_utililty_group1", "device_port":0, "device_ip":"", "imsi":"901995678912341", "imei":"", "device_name":"gas_tank_g3", "device_model":"", "device_firmware":"", "device_type":"", "device_token":"jV3dUvNQn6246Dfe1v", "last_activity":null, "last_wakeup":null, "connection_time":null, "signal_strength":"", "gpsloc_lat":"51.2277° N", "gpsloc_long":"6.7735° E", "create_time":"2016-03-25T19:53:57.729Z", "auto_capture_device_token":false, "first_session":null, "radius_auth_password":"", "radius_auth_username":"", "pki_auth_pem_srv_key":"", "pki_auth_pem_srv_cert":"", "pki_auth_pem_dev_cert":"", "disconnection_time":null, "last_accessed_sap_list":[ ], "custom_field_1":"", "custom_field_2":"" }, { "udid":"5ab7fe554b04a933f459da0e", "state":false, "device_id":"Q3009qC1001", "service_template_id":"config_profile_utililty_group1", "device_port":0, "device_ip":"", "imsi":"", "imei":"", "device_name":"gas_smart_k55", "device_model":"", "device_firmware":"", "device_type":"", "device_token":"", "last_activity":null, "last_wakeup":null, "connection_time":null, "signal_strength":"", "gpsloc_long":"", "gpsloc_lat":"", "create_time":"2016-03-25T19:53:57.729Z", "auto_capture_device_token":false, "first_session":null, "radius_auth_password":"", "radius_auth_username":"", "pki_auth_pem_srv_key":"", "pki_auth_pem_srv_cert":"", "pki_auth_pem_dev_cert":"", "disconnection_time":null, "last_accessed_sap_list":[ ], "custom_field_1":"", "custom_field_2":"" } ] } } |