-
Notifications
You must be signed in to change notification settings - Fork 20
/
apiary.apib
1883 lines (1539 loc) · 89 KB
/
apiary.apib
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
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
FORMAT: 1A
HOST: https://dashboard.hologram.io/
# Hologram
The Hologram HTTP API is a REST-style interface for managing Hologram devices, accounts, and cloud data.
Using the Hologram REST API, you can activate SIMs, get your devices approximate location, send SMS to your devices, update a device's usage limit, and much more.
## Authentication
Hologram supports **HTTP Basic authentication** using API keys. Simply set the username of the request to `apikey`. The password field is the API key itself.
You can find your API key on the Hologram Dashboard under
[Account Settings](https://dashboard.hologram.io/settings/api).
Your API key gives you access to your personal account, as well as any organizations you are a member of. Make sure you don't store your API key in a publicly accessible place like GitHub. If you are a member of multiple organizations, many endpoints accept an `orgid` argument to filter for devices or other objects within a specific organization.
You can find your orgid by following this guide from our Help Center.
### Header Example
```
curl --verbose GET \
'https://dashboard.hologram.io/api/1/users/me' \
-u apikey:2rjpYZZNzFAoGxAgEP2SC6moL3emyB
```
You can also base64 encode "apikey:[YOUR_API_KEY]" where [YOUR_API_KEY] is your API key and include it directly in the header.
```
curl --verbose GET \
'https://dashboard.hologram.io/api/1/users/me' \
--header "Authorization: Basic YXBpa2V5OjJyanBZWlpOekZBb0d4QWdFUDJTQzZtb0wzZW15Qg=="
```
## Requests
Request bodies can be provided in either JSON or form-urlencoded formats. Please note that the examples in this documentation will only display JSON bodies.
### **JSON body**
```
curl --verbose --request POST \
--header "Content-Type: application/json" \
--header "Authorization: Basic YXBpa2V5OjJyanBZWlpOekZBb0d4QWdFUDJTQzZtb0wzZW15Qg=="
--data '{"deviceid": 56668, "body": "Hello device!"}' \
'https://dashboard.hologram.io/api/1/sms/incoming'
```
### **form-urlencoded body**
```
curl --verbose --request POST \
--header "Content-Type: application/x-form-urlencoded" \
--header "Authorization: Basic YXBpa2V5OjJyanBZWlpOekZBb0d4QWdFUDJTQzZtb0wzZW15Qg=="
--data 'deviceid=56668&body=Hello%20device!' \
'https://dashboard.hologram.io/api/1/sms/incoming'
```
## Responses
All API responses are returned as JSON objects with the following fields:
* `success` (boolean) - Indicates whether the request was successful.
* `data` (object or array) - Contains the requested data or information about the operation that was performed. Only present when `success` is true.
* `error` (string) - Information about why the request failed. Only present when `success` is false.
Most GET responses will also include the following fields if a limit is included as part of the query string:
* `limit` (number) - The query limit, some have this value built in and others often have a maximum value that the limit can be
* `size` (number) - The number of values returned by the query
* `continues` (boolean, optional) - This is only returned if there are more values than were returned
* `links` (array) - Contains information related to the query performed
* `path` (string) - The API endpoint path
* `base` (string) - API base URL
* `next` (string) - URL with query string to get the next results
## Rate Limiting
In order to provide a good quality of service to all of our customers, we enforce a rate limit on all API requests.
If you exceed the rate limit you will receive a HTTP 429 response with a JSON response body like this:
```
{
"success":false,
"error":"API rate limit exceeded"
}
```
If you receive this response, you should refrain from making requests for 5-10 seconds and then retry the request.
Hologram's REST API provides methods to perform many requests in bulk. For example, you can change the plans of multiple SIMs at once using https://dashboard.hologram.io/api/1/links/cellular/changeplan.
If there is request you would like to make in bulk but cannot, please reach out to [[email protected]](mailto:[email protected]) for assistance.
## Group Devices
Using the /devices endpoint, you can retrieve information about devices based on parameters. You can also update the name of a device, transfer ownership of a device to a different organization, and add device tags.
### Retrieve a Device [GET /api/1/devices/{deviceid}]
`GET https://dashboard.hologram.io/api/1/devices/{deviceid}`
Retrieves the details of an existing device. Specify the unique device identifier (device ID) in the request URL, which you can find on the Dashboard.
+ Parameters
+ deviceid: 1234 (number) - Return the device with the given device ID
+ Response 200 (application/json)
+ Attributes
+ success: true (boolean) - Was the request successful?
+ data (Device)
### List All Devices [GET /api/1/devices{?orgid,orgids,tagid,tagname,sim,limit,startafter,id,ids,linkid,phone,tunnelable,name,type,withlocation,imei,imei%2Dsv}]
`GET https://dashboard.hologram.io/api/1/devices`
Returns a list of your devices. The devices are returned sorted by creation date, with the most recent devices appearing first.
+ Parameters
+ orgid: 1234 (number, optional)
Only return results for the given organization ID
+ orgids: 1,2,3,4 (array, optional)
Only return results for the given organization IDs
+ tagid: 45 (number, optional)
Only return devices with the given tag ID
+ tagname: sensors (string, optional)
Only return devices with the given tag name
+ sim: 999000000123 (string, optional)
Show device with specific SIM number
+ limit: 20 (string, optional)
Return a maximum of this many devices
+ startafter: 1 (number, optional)
Return the devices whose IDs come after the given device ID
+ id: 1 (number, optional)
Return the device with the given device ID
+ ids: 1,2,3 (array, optional)
Return any device ids that match those given in the array
+ linkid: 1 (number, optional)
Return the device with the given Link ID
+ phone: +55555555555 (string, optional)
Return the device with the given phone number
+ tunnelable: true (boolean, optional)
Return the devices that are/n't tunnelable through Spacebridge
+ name: my device (string, optional)
Return the device with the given name
+ type: tracker (string, optional)
Return devices with the given type name
+ withlocation: true (boolean, optional)
Include location data on all devices where we have enough information to determine that. Requires professional plan.
+ imei: 957520074024080 (string, optional)
Filter for devices that had the given IMEI on their last session. This searches for
standard IMEI which should match what is on the label for the device.
+ imei%2Dsv: 9575200740240801 (string, optional)
Filter for devices that had the given IMEI-SV on their last session. This searches for
IMEI-SV which is the normal IMEI but instead of a check digit at the end it has a two
digit software version. This is what the network usually sees.
+ Response 200 (application/json)
+ Attributes
+ success: true (boolean) - Was the request successful?
+ limit: 1 (number) - The query limit
+ size: 1 (number) - The number of values returned
+ continues: true (boolean) - Only shows when there are more values
+ links (array)
+ path: /api/1/devices (string) - API endpoint specific base
+ base: dashboard.hologram.io (string) - API base URL
+ next: /api/1/devices?limit=1&startafter=4 (string) - URL with query string to get the next results
+ data (array)
+ (Device)
### List All Device Names [GET /api/1/devices/names{?orgid,limit,startafter}]
`GET https://dashboard.hologram.io/api/1/devices/names`
Returns a list of your devices. The devices are returned sorted by creation date, with the most recent devices appearing first.
+ Parameters
+ orgid: 1234 (number, optional)
Only return results for the given organization ID
+ limit: 20 (string, optional)
Return a maximum of this many devices
+ startafter: 1 (number, optional)
Return the devices whose IDs come after the given device ID
+ Response 200 (application/json)
+ Attributes
+ success: true (boolean) - Was the request successful?
+ limit: 1 (number) - The query limit
+ size: 1 (number) - The number of values returned
+ continues: true (boolean) - Only shows when there are more values
+ links (array)
+ path: /api/1/devices (string) - API endpoint specific base
+ base: dashboard.hologram.io (string) - API base URL
+ next: /api/1/devices?limit=1&startafter=4 (string) - URL with query string to get the next results
+ data (array)
+ deviceid: (string) - Key is the device id
+ name: (string) - value is the device name
### List All Device Locations [GET /api/1/devices/locations{?orgid,orgids,tagid,tagname,sim,limit,startafter,id,ids,linkid,phone,tunnelable,name,type,withlocation,imei,imei%2Dsv}]
`GET https://dashboard.hologram.io/api/1/devices/locations`
Returns a list of your devices. The devices are returned sorted by creation date, with the most recent devices appearing first.
+ Parameters
+ orgid: 1234 (number, optional)
Only return results for the given organization ID
+ orgids: 1,2,3,4 (array, optional)
Only return results for the given organization IDs
+ tagid: 45 (number, optional)
Only return devices with the given tag ID
+ tagname: sensors (string, optional)
Only return devices with the given tag name
+ sim: 999000000123 (string, optional)
Show device with specific SIM number
+ limit: 20 (string, optional)
Return a maximum of this many devices
+ startafter: 1 (number, optional)
Return the devices whose IDs come after the given device ID
+ id: 1 (number, optional)
Return the device with the given device ID
+ ids: 1,2,3 (array, optional)
Return any device ids that match those given in the array
+ linkid: 1 (number, optional)
Return the device with the given Link ID
+ phone: +55555555555 (string, optional)
Return the device with the given phone number
+ tunnelable: true (boolean, optional)
Return the devices that are/n't tunnelable through Spacebridge
+ name: my device (string, optional)
Return the device with the given name
+ type: tracker (string, optional)
Return devices with the given type name
+ withlocation: true (boolean, optional)
Include location data on all devices where we have enough information to determine that. Requires professional plan.
+ imei: 957520074024080 (string, optional)
Filter for devices that had the given IMEI on their last session. This searches for
standard IMEI which should match what is on the label for the device.
+ imei%2Dsv: 9575200740240801 (string, optional)
Filter for devices that had the given IMEI-SV on their last session. This searches for
IMEI-SV which is the normal IMEI but instead of a check digit at the end it has a two
digit software version. This is what the network usually sees.
+ Response 200 (application/json)
+ Attributes
+ success: true (boolean) - Was the request successful?
+ limit: 1 (number) - The query limit
+ size: 1 (number) - The number of values returned
+ continues: true (boolean) - Only shows when there are more values
+ links (array)
+ path: /api/1/devices (string) - API endpoint specific base
+ base: dashboard.hologram.io (string) - API base URL
+ next: /api/1/devices?limit=1&startafter=4 (string) - URL with query string to get the next results
+ data (array)
+ (object)
+ deviceid: 1 (number) - The device id
+ name: device1 (string) - The device name
+ longitude: 78.662 (number) - Devices longitude (estimate based on tower information)
+ latitude: 35.788 (number) - Devices latitude (estimate based on tower information)
### Update a Device [PUT /api/1/devices/{deviceid}?orgid={orgid}]
`PUT https://dashboard.hologram.io/api/1/devices/{deviceid}?orgid={orgid}`
Updates the specified device by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
You can change the device's name displayed on the Dashboard. You can also transfer ownership of the device to a different organizaton. You must be an Admin of the recipient organization in order to transfer the device.
+ Parameters
+ deviceid: 1234 (number) - Update device with the given device ID
+ orgid: 4321 (number, optional) - Current organization device is under
+ Request (application/json)
+ Attributes
+ name: Device123 (string) - Update name of the device
+ orgid: 100 (number) - Move device between organizations. Your API key must be at least an
Admin on both organizations for this to succeed
+ tunnelable: true (boolean) - Update whether the device is tunnelable or not
+ Response 200 (application/json)
+ Attributes
+ success: true (boolean) - Was the request successful?
+ data (Device)
### Pause or Unpause Device Data [POST /api/1/devices/{deviceid}/state]
`POST https://dashboard.hologram.io/api/1/devices/{deviceid}/state`
Pause or unpause device data on all of a devices SIM profiles. Pausing the device will prevent your device from passing any data on all SIM profiles. Paused devices still incur any applicable monthly reactivation fees.
+ Parameters
+ deviceid: 1234 (number) - Change device state with the given device ID
+ Request (application/json)
+ Attributes
+ state: pause (string) - New device state to set. Either `pause` or `live`.
+ Response 200 (application/json)
+ Attributes
+ success: true (boolean) - Was the request successful?
+ data (Device)
### Change device plans [POST /api/1/devices/{deviceid}/changeplan]
`POST https://dashboard.hologram.io/api/1/devices/{deviceid}/changeplan`
Change the plan for the given device. This changes the plan for all SIM profiles on a device
+ Parameters
+ deviceid: 1234 (number) - Change device plan with the given device ID
+ Request (application/json)
+ Attributes
+ planid: 1 (number) - Integer ID of the plan to change to
+ zone: global (string) - The availability zone of the plan
+ orgid: 45 (number) - Integer ID of the org this plan
+ overage_limit: 100000 (number, optional) - Amount of overage to consume before pausing, -1 for unlimited (default)
+ threshold: 100000 (number, optional) - Amount of data to consume before alerting, should be less than overage, -1 for unlimited (default)
+ smslimit: 10 (number, optional) - Amount of SMS to consume before pausing, -1 for unlimited (default)
+ useacctbalance: true (boolean) - Use the current account balance for this plan
+ Response 200 (application/json)
+ Attributes
+ success: true (boolean) - Was the request successful?
+ data (array) - The order information
## Group Bulk Devices
Operations to perform on multiple devices.
### Bulk Change plans [POST /api/1/devices/changeplan]
`POST https://dashboard.hologram.io/api/1/devices/changeplan`
Change the plan for the given devices
+ Request (application/json)
+ Attributes
+ deviceids (array) Devices to change the plans for
+ 1 (number)
+ 2 (number)
+ planid: 1 (number) - Integer ID of the plan to change to
+ zone: global (string) - The availability zone of the plan
+ orgid: 45 (number) - Integer ID of the org this plan
+ overage_limit: 100000 (number, optional) - Amount of overage to consume before pausing, -1 for unlimited (default)
+ threshold: 100000 (number, optional) - Amount of data to consume before alerting, should be less than overage, -1 for unlimited (default)
+ smslimit: 10 (number, optional) - Amount of SMS to consume before pausing, -1 for unlimited (default)
+ useacctbalance: true (boolean) - Use the current account balance for this plan
+ Response 200 (application/json)
+ Attributes
+ success: true (boolean) - Was the request successful?
+ data (array) - Summary of change plan result
### Bulk Pause or Unpause Device Data [POST /api/1/devices/state]
`POST https://dashboard.hologram.io/api/1/devices/state`
Pause or unpause device data on all of a devices SIM profiles. Pausing the device will prevent your device from passing any data on all SIM profiles. Paused devices still incur any applicable monthly reactivation fees.
+ Request (application/json)
+ Attributes
+ deviceids (array) Devices to pause or unpause data for
+ 1 (number)
+ 2 (number)
+ state: pause (string) - New device state to set. Either `pause` or `live`.
+ Response 200 (application/json)
+ Attributes
+ success: true (boolean) - Was the request successful?
+ data (array) - Summary of state change result
## Group Device Tags
Device tags are user-configurable categories that you can use to classify your devices. A device may be linked to more than one tag.
### List Device Tags [GET /api/1/devices/tags{?orgid,id,deviceids,limit}]
`GET https://dashboard.hologram.io/api/1/devices/tags`
Returns all device tags associated with your devices.
+ Parameters
+ orgid: 1234 (number, optional)
Only return results for the given organization ID
+ id: 1 (number, optional)
Only return results for the given device tag ID
+ deviceids: 12,34 (array, optional)
Only return results for the given device IDs
+ limit: 200 (number, optional) - Number of records to return
+ Response 200 (application/json)
+ Attributes
+ success: true (boolean) - Was the request successful?
+ data (array)
+ (Device Tag)
### Create a Device Tag [POST /api/1/devices/tags]
`POST https://dashboard.hologram.io/api/1/devices/tags`
Creates a new device tag. If you are creating the tag to be used for devices in a custom organization (not your personal organization), the `orgid` URL parameter is required.
+ Request (application/json)
+ Attributes
+ name: My Tag (string, required) - Name for the new tag, try to use shorter
+ deviceids: [1234, 5678] (array, optional) - Devices to add to the new tag (optional)
+ Response 200 (application/json)
+ Attributes
+ success: true (boolean) - Was the request successful?
+ data (Device Tag)
### Add Tag to Device [POST /api/1/devices/tags/{tagid}/link]
`POST https://dashboard.hologram.io/api/1/devices/tags/{tagid}/link`
Adds a device tag to specified device or devices.
+ Parameters
+ tagid: 1234 (number) - The ID of the tag
+ Request (application/json)
+ Attributes
+ deviceids (array) - List of device IDs to link to this tag. All devices should be on the same organization as the tagid.
+ 4321 (number)
+ Response 200 (application/json)
+ Attributes
+ success: true (boolean) - Was the request successful?
+ data (Device Tag)
### Remove Tag from Device [POST /api/1/devices/tags/{tagid}/unlink]
`POST https://dashboard.hologram.io/api/1/devices/tags/{tagid}/unlink`
Removes a device tag from specified device or devices.
+ Parameters
+ tagid: 1234 (number) - The ID of the tag
+ Request (application/json)
+ Attributes
+ deviceids (array) - List of device IDs to unlink from this tag
+ 4321 (number)
+ Response 200 (application/json)
+ Attributes
+ success: true (boolean) - Was the request successful?
+ data (Device Tag)
### Delete Device Tag [DELETE /api/1/devices/tags/{tagid}]
`DELETE https://dashboard.hologram.io/api/1/devices/tags/{tagid}`
Deletes a device tag. If the tag is associated with any devices, the tag is removed from those devices.
+ Parameters
+ tagid: 1234 (number) - The ID of the tag to delete
+ Response 200 (application/json)
+ Attributes
+ success: true (boolean) - Was the request successful?
## Group Cellular Links
A Cellular Link is the association between a Device and a cellular data plan and SIM. Typically, a device has exactly one Cellular Link. Using the /links/cellular endpoints, you can activate SIMs, change plans, update usage limits, and un/pause data.
### Activate Single SIM by ICCID [POST /api/1/links/cellular/sim_{ICCID}/claim]
`POST https://dashboard.hologram.io/api/1/links/cellular/sim_{ICCID}/claim`
Replace "ICCID" in request URL with ICCID of SIM to activate.
Activates single SIM on the cellular network. Once a SIM is activated, you can begin to pass data. Any monthly charges and data usage charges will take effect.
If you are activating a SIM on a plan that has a monthly fee, your account will be immediately charged the monthly fee for all devices you are activating. If your account does not have enough balance to cover these charges, the request will fail.
Activating a SIM creates a new device and corresponding cellular link.
+ Request (application/json)
+ Attributes
+ plan: 202 (number) - Device data plan. Look up plan IDs with
[List Data Plans](#reference/device-management/data-plans/list-data-plans).
+ zone: global (string) - The default value is 'global'. Reference /plans endpoint for valid zones available with each plan.
+ orgid: 100 (number) - Specify the organization to activate the plan on. Your API key must have activation role privileges on the target organization
+ tagid: 1 (number, optional) - Add a tag specified by the tag ID
+ overage_limit: 100000 (number, optional) - Amount of overage to consume before pausing, -1 for unlimited (default)
+ threshold: 100000 (number, optional) - Amount of data to consume before alerting, should be less than overage, -1 for unlimited (default)
+ smslimit: 10 (number, optional) - Amount of SMS to consume before pausing, -1 for unlimited (default)
+ Response 200 (application/json)
+ Attributes
+ success: true (boolean) - Was the request successful?
+ data (array)
+ (object)
+ device: 1234 (number) - Device ID of the new corresponding device
+ link: 3214 (number) - ID of the new cellular link
+ sim: 99990000000012345678 (string)
### Activate Multiple SIMs by ICCID [POST /api/1/links/cellular/bulkclaim]
`POST https://dashboard.hologram.io/api/1/links/cellular/bulkclaim`
Include all ICCIDs to be activated separated by commas in array.
Activates multiple SIMs on the cellular network. Once a SIM is activated, you can begin to pass data. Any monthly charges and data usage charges will take effect.
If you are activating SIMs on a plan that has a monthly fee, your account will be immediately charged the monthly fee for all devices you are activating. If your account does not have enough balance to cover these charges, the request will fail.
Activating SIMs creates new devices and corresponding cellular links.
+ Request (application/json)
+ Attributes
+ sims (array) - Array of SIM numbers to activate
+ 9999999999999 (string)
+ 1111111111111 (string)
+ plan: 202 (number) - Device data plan. Look up plan IDs with
[List Data Plans](#reference/device-management/data-plans/list-data-plans).
+ zone: global (string) - The default value is 'global'. Reference /plans endpoint for valid zones available with each plan.
+ orgid: 100 (number) - Specify the organization to activate the plan on. Your API key must have activation role privileges on the target organization
+ tagid: 1 (number, optional) - Add a tag specified by the tag ID
+ overage_limit: 100000 (number, optional) - Amount of overage to consume before pausing, -1 for unlimited (default)
+ threshold: 100000 (number, optional) - Amount of data to consume before alerting, should be less than overage, -1 for unlimited (default)
+ smslimit: 10 (number, optional) - Amount of SMS to consume before pausing, -1 for unlimited (default)
+ Response 200 (application/json)
+ Attributes
+ success: true (boolean) - Was the request successful?
+ data (array)
+ (object)
+ device: 1234 (number) - Device ID of the new corresponding device
+ link: 3214 (number) - ID of the new cellular link
+ sim: 99990000000012345678 (string)
### Activate SIMs by ICCID range [POST /api/1/links/cellular/bulkclaim]
`POST https://dashboard.hologram.io/api/1/links/cellular/bulkclaim`
Best used to activate 10, 100, or 1000 pack of SIMs ordered together. Include first and last ICCIDs to be activated (printed on SIM pack).
Activates SIMs within an ICCID range on the cellular network. Once a SIM is activated, you can begin to pass data. Any monthly charges and data usage charges will take effect.
If you are activating SIMs on a plan that has a monthly fee, your account will be immediately charged the monthly fee for all devices you are activating. If your account does not have enough balance to cover these charges, the request will fail.
Activating a SIM creates a new device and corresponding cellular link.
+ Request (application/json)
+ Attributes
+ simrange: `99990000000012345678-99990000000012345699` (string) - Range of SIM numbers to activate
+ plan: 202 (number) - Device data plan. Look up plan IDs with
[List Data Plans](#reference/device-management/data-plans/list-data-plans).
+ zone: global (string) - The default value is 'global'. Reference /plans endpoint for valid zones available with each plan.
+ orgid: 100 (number) - Specify the organization to activate the plan on. Your API key must have activation role privileges on the target organization
+ tagid: 1 (number, optional) - Add a tag specified by the tag ID
+ overage_limit: 100000 (number, optional) - Amount of overage to consume before pausing, -1 for unlimited (default)
+ threshold: 100000 (number, optional) - Amount of data to consume before alerting, should be less than overage, -1 for unlimited (default)
+ smslimit: 10 (number, optional) - Amount of SMS to consume before pausing, -1 for unlimited (default)
+ Response 200 (application/json)
+ Attributes
+ success: true (boolean) - Was the request successful?
+ data (array)
+ (object)
+ device: 1234 (number) - Device ID: ID of the new corresponding device
+ link: 3214 (number) - Link ID: ID of the new cellular link
+ sim: 99990000000012345678 (string)
### Retrieve a Cellular Link [GET /api/1/links/cellular/{linkid}?{witheuicc}]
`GET https://dashboard.hologram.io/api/1/links/cellular/{linkid}`
Retrieves the details of an existing cellular link. You need only supply the unique link identifier (link ID), which you can find on the Dashboard or in the response of a /devices request.
+ Parameters
+ linkid: 54321 (number) - Return the SIM with the given link ID
+ Request (application/json)
+ Attributes
+ witheuicc: 1 (number) - include the EUICC information for the SIM
+ Response 200 (application/json)
+ Attributes
+ success: true (boolean) - Was the request successful?
+ data (Cellular Link)
### List All Cellular Links [GET /api/1/links/cellular{?orgid,limit,showip,id,ids,sim,sims,simrange,msisdn,tunnelable,imsi,imsis,deviceid,deviceids,claimedafter,claimedbefore,tagid,tagids,tagname,carrierid,startafter}]
`GET https://dashboard.hologram.io/api/1/links/cellular`
Returns a list of your SIM cards. However, we recommend using the /devices endpoint instead, which returns the cellular link information for each device.
+ Parameters
+ orgid: 1234 (number, optional)
Only return results for the given organization ID
+ limit: 20 (string, optional)
Return a maximum of this many links.
+ id: 1 (number, optional)
Only return results for the given Link ID
+ ids: 1,2,3 (array, optional)
Only return results for the given Link IDs
+ sim: 9990001 (string, optional)
Only return results for the given SIM number/ICCID
+ sims: 9990001,9990002 (array, optional)
Only return results for the given SIMs/ICCIDs
+ simrange: 9990001-9990005 (string, optional)
Only return results for the given SIM/ICCID range
+ msisdn: 12345678 (string, optional)
Only return results for the given MSISDN
+ tunnelable: true (boolean, optional)
Return the devices that are/n't tunnelable through Spacebridge
+ imsi: 1234578 (number, optional)
Only return results for the given IMSI
+ imsis: 12,34 (array, optional)
Only return results for the given IMSIs
+ deviceid: 1 (number, optional)
Only return results for the given device ID
+ deviceids: 12,34 (array, optional)
Only return results for the given device IDs
+ claimedafter: 1480550400 (number, optional)
Only return results for the links claimed after the given time (Unix timestamp)
+ claimedbefore: 1480550400 (number, optional)
Only return results for the links claimed before the given time (Unix timestamp)
+ tagid: 45 (number, optional)
Only return devices with the given tag ID
+ tagids: 12,34 (array, optional)
Only return results for the given device IDs
+ tagname: sensors (string, optional)
Only return devices with the given tag name
+ startafter: 1 (number, optional)
Return the SIMs with link IDs that come after the given ID
+ Response 200 (application/json)
+ Attributes
+ success: true (boolean) - Was the request successful?
+ limit: 1 (number) - The query limit
+ size: 1 (number) - The number of values returned
+ continues: true (boolean) - Only shows when there are more values
+ links (array)
+ path: /api/1/links/cellular (string) - API endpoint specific base
+ base: dashboard.hologram.io (string) - API base URL
+ next: /api/1/links/cellular?limit=1&startafter=4 (string) - URL with query string to get the next results
+ data (array)
+ (Cellular Link)
### Pause or Unpause Specific Profile Data [POST /api/1/links/cellular/{linkid}/state]
`POST https://dashboard.hologram.io/api/1/links/cellular/{linkid}/state`
We recommend using the new [Pause or Unpause Device Data](#reference/devices/pause-or-unpause-device-data/pause-or-unpause-device-data) endpoint for support for both single and multi profile SIMs.
Pause or unpause a specific SIM profile on a device. Pausing the SIM profile will prevent this profile from from passing any data. Paused SIM profiles still incur any applicable monthly reactivation fees.
+ Parameters
+ linkid: 54321 (number) - Link ID of the link to modify
+ Request (application/json)
+ Attributes
+ state: pause (string) - New SIM state to set. Either `pause` or `live`.
+ Response 200 (application/json)
+ Attributes
+ success: true (boolean) - Was the request successful?
+ data (object)
+ newstate: PAUSED-PENDING-USER (string) - New state of the link.
May be a 'pending' state until the change is propagated to the cellular network.
### Retrieve SIM's State History [GET /api/1/links/cellular/{linkid}/history]
Retrieve a list of your SIM's state changes. This includes activations, Preflight activations, pauses, unpauses, and deactivations.
+ Parameters
+ linkid: 54321 (number) - Integer ID of the link to query
+ Response 200 (application/json)
+ Attributes
+ success: true (boolean) - Was the request successful?
+ data (array)
+ (Sim State History)
### Update SIM's Overage Limit [POST /api/1/links/cellular/{linkid}/limit/overage]
`POST https://dashboard.hologram.io/api/1/links/cellular/{linkid}/limit/overage`
Restrict the amount of data your device can use in a given billing period. Once your device reaches the data limit, the SIM will automatically pause. In order to unpause your device, you will need to increase the data limit.
+ Parameters
+ linkid: 54321 (number) - Integer ID of the link to change
+ Request (application/json)
+ Attributes
+ limit: 20000 (number) -
Number of bytes over the plan limit to allow. Set `-1` for no data limit. See the
[guide](https://hologram.io/docs/guide/connect/device-management#data-and-overage-limits) for details.
+ Response 200 (application/json)
+ Attributes
+ success: true (boolean) - Was the request successful?
+ data (Cellular Link)
### Update SIM's Data Threshold [POST /api/1/links/cellular/{linkid}/threshold]
`POST https://dashboard.hologram.io/api/1/links/cellular/{linkid}/threshold`
Set a threshold for your device before alerts are sent to your dashboard regarding usage
+ Parameters
+ linkid: 54321 (number) - Integer ID of the link to change
+ Request (application/json)
+ Attributes
+ limit: 20000 (number) -
Number of bytes over the plan limit to allow. Set `-1` for no data limit. See the
[guide](https://hologram.io/docs/guide/connect/device-management#data-and-overage-limits) for details.
+ Response 200 (application/json)
+ Attributes
+ success: true (boolean) - Was the request successful?
+ data (Cellular Link)
### Update SIM's SMS Limit [POST /api/1/links/cellular/{linkid}/limit/sms]
`POST https://dashboard.hologram.io/api/1/links/cellular/{linkid}/limit/sms`
Restrict the amount of SMS your device can use in a given billing period. Once your device reaches the SMS limit, the SIM will automatically pause. In order to unpause your device, you will need to increase the SMS limit.
+ Parameters
+ linkid: 54321 (number) - Integer ID of the link to change
+ Request (application/json)
+ Attributes
+ limit: 10 (number) - Number of SMS to allow. Set `-1` for no SMS limit.
+ Response 200 (application/json)
+ Attributes
+ success: true (boolean) - Was the request successful?
+ data (Cellular Link)
### Change a SIM's plan [POST /api/1/links/cellular/{linkid}/changeplan]
`POST https://dashboard.hologram.io/api/1/links/cellular/{linkid}/changeplan`
Change the plan for the given SIM
+ Parameters
+ linkid: 54321 (number) - Integer ID of the link to change
+ Request (application/json)
+ Attributes
+ planid: 1 (number) - Integer ID of the plan to change to
+ zone: global (string) - The availability zone of the plan
+ overage_limit: 100000 (number, optional) - Amount of overage to consume before pausing, -1 for unlimited (default)
+ threshold: 100000 (number, optional) - Amount of data to consume before alerting, should be less than overage, -1 for unlimited (default)
+ smslimit: 10 (number, optional) - Amount of SMS to consume before pausing, -1 for unlimited (default)
+ Response 200 (application/json)
+ Attributes
+ success: true (boolean) - Was the request successful?
+ data (Cellular Link)
### Update a SIM [PUT /api/1/links/cellular/{linkid}/]
`PUT https://dashboard.hologram.io/api/1/links/cellular/{linkid}/`
Update the data threshold or overage limit of your device.
+ Parameters
+ linkid: 4321 (number, required) - Unique link identifier or link ID
+ Request (application/json)
+ Attributes
+ datathreshold: 500 (number) - New data threshold in bytes
+ overagelimit: 500 (number) - Number of bytes over the plan limit to allow. Set `-1` for no data limit. See the
[guide](https://hologram.io/docs/guide/connect/device-management#data-and-overage-limits) for details
+ smslimit: 10 (number, optional) - Amount of SMS to consume before pausing, -1 for unlimited (default)
+ Response 200 (application/json)
+ Attributes
+ success: true (boolean) - Was the request successful?
+ data (Cellular Link)
## Group Bulk Cellular Links
Operations to perform on multiple SIMs
### Change plans [POST /api/1/links/cellular/changeplan]
`POST https://dashboard.hologram.io/api/1/links/cellular/changeplan`
Change the plan for the given SIM
+ Request (application/json)
+ Attributes
+ linkids (array) SIMs to change the plans for
+ 1 (number)
+ 2 (number)
+ planid: 1 (number) - Integer ID of the plan to change to
+ zone: global (string) - The availability zone of the plan
+ overage_limit: 100000 (number, optional) - Amount of overage to consume before pausing, -1 for unlimited (default)
+ threshold: 100000 (number, optional) - Amount of data to consume before alerting, should be less than overage, -1 for unlimited (default)
+ smslimit: 10 (number, optional) - Amount of SMS to consume before pausing, -1 for unlimited (default)
+ Response 200 (application/json)
+ Attributes
+ success: true (boolean) - Was the request successful?
+ data (array) - The order information
### Update Overage Limit [POST /api/1/links/cellular/limit/overage]
`POST https://dashboard.hologram.io/api/1/links/cellular/limit/overage`
Restrict the amount of data your device can use in a given billing period. Once your device reaches the data limit, the SIM will automatically pause. In order to unpause your device, you will need to increase the data limit.
+ Request (application/json)
+ Attributes
+ linkids (array) SIMs to change the overage limit for
+ 1 (number)
+ 2 (number)
+ limit: 20000 (number) -
Number of bytes over the plan limit to allow. Set `-1` for no data limit. See the
[guide](https://hologram.io/docs/guide/connect/device-management#data-and-overage-limits) for details.
+ Response 200 (application/json)
+ Attributes
+ success: true (boolean) - Was the request successful?
+ data (array) - Updated SIMs
+ (Cellular Link)
### Update Data Threshold - Closed Beta [POST /api/1/links/cellular/threshold]
`POST https://dashboard.hologram.io/api/1/links/cellular/threshold`
Set a threshold for your device before alerts are sent to your dashboard regarding usage
+ Request (application/json)
+ Attributes
+ linkids (array) SIMs to change the overage limit for
+ 1 (number)
+ 2 (number)
+ threshold: 20000 (number) -
Number of bytes before an alert is sent to the dashboard to warn
+ Response 200 (application/json)
+ Attributes
+ success: true (boolean) - Was the request successful?
+ data (array) - Updated SIMs
+ (Cellular Link)
### Update SMS Limit [POST /api/1/links/cellular/limit/sms]
`POST https://dashboard.hologram.io/api/1/links/cellular/limit/sms`
Restrict the amount of SMS your device can use in a given billing period. Once your device reaches the SMS limit, the SIM will automatically pause. In order to unpause your device, you will need to increase the SMS limit.
+ Request (application/json)
+ Attributes
+ linkids (array) SIMs to change the overage limit for
+ 1 (number)
+ 2 (number)
+ limit: 10 (number) - Number of SMS to allow. Set `-1` for no SMS limit.
+ Response 200 (application/json)
+ Attributes
+ success: true (boolean) - Was the request successful?
+ data (array) - Updated SIMs
+ (Cellular Link)
## Group Alerts - Closed Beta
The `alerts` endpoints return alert information related to usage data or device status.
Please note that these endpoints are only available to organizations currently included in the Closed Beta. If you are interested in using these endpoints, please contact [[email protected]](mailto:[email protected]).
### List All alerts [GET /api/1/alerts{?orgid,limit,startafter}]
List all alerts.
`GET https://dashboard.hologram.io/api/1/alerts`
Returns all alerts for a given organization, organized by deviceid.
+ Parameters
+ orgid: 1234 (number, optional) - Only return alerts that are usable for the given organization ID
+ limit: 20 (string, optional) - Return a maximum of this many alerts.
+ startafter: 1 (number, optional) - Return the alerts whose IDs come after the given ID
+ Response 200 (application/json)
+ Attributes
+ success: true (boolean) - Was the request successful?
+ limit: 20 (number) - The query limit
+ size: 20 (number) - The number of values returned
+ continues: true (boolean) - Only shows when there are more values
+ lastid: 1254 (number) - Id for the last alert retrieved
+ data (array)
+ (object)
### List All TAC change alerts [GET /api/1/alerts/tac_changes{?orgid,limit,startafter}]
List all TAC change alerts.
`GET https://dashboard.hologram.io/api/1/alerts/tac_changes`
Returns all TAC change alerts for a given organization, organized by deviceid.
Alert data lists old TAC and new TAC for each deviceid returned in the list.
+ Parameters
+ orgid: 1234 (number, optional)
Only return alerts that are usable for the given organization ID
+ limit: 20 (string, optional)
Return a maximum of this many alerts.
+ startafter: 1 (number, optional)
Return the alerts whose IDs come after the given ID
+ Response 200 (application/json)
+ Attributes
+ success: true (boolean) - Was the request successful?
+ limit: 1 (number) - The query limit
+ size: 1 (number) - The number of values returned
+ continues: true (boolean) - Only shows when there are more values
+ lastid: 1254 (number) - Id for the last alert retrieved
+ data (array)
+ (object)
### List All Usage alerts [GET /api/1/alerts/usage{?orgid,limit,startafter}]
List all alerts related to usage.
`GET https://dashboard.hologram.io/api/1/alerts/usage`
Returns all usage alerts for a given organization, organized by deviceid.
Alerts are created when a given device exceeds a pre-selected threshold of data usage for a billing period.
+ Parameters
+ orgid: 1234 (number, optional)
Only return alerts that are usable for the given organization ID
+ limit: 20 (string, optional)
Return a maximum of this many alerts.
+ startafter: 1 (number, optional)
Return the alerts whose IDs come after the given ID
+ Response 200 (application/json)
+ Attributes
+ success: true (boolean) - Was the request successful?
+ limit: 1 (number) - The query limit
+ size: 1 (number) - The number of values returned
+ continues: true (boolean) - Only shows when there are more values
+ lastid: 1254 (number) - Id for the last alert retrieved
+ data (array)
+ (object)
### List All Custom alerts [GET /api/1/alerts/custom{?orgid,limit,startafter}]
Return any custom alerts created for an organization's devices
`GET https://dashboard.hologram.io/api/1/alerts/custom`
+ Parameters
+ orgid: 1234 (number, optional)
Only return alerts that are usable for the given organization ID
+ limit: 20 (string, optional)
Return a maximum of this many alerts.
+ startafter: 1 (number, optional)
Return the alerts whose IDs come after the given ID
+ Response 200 (application/json)
+ Attributes
+ success: true (boolean) - Was the request successful?
+ limit: 1 (number) - The query limit
+ size: 1 (number) - The number of values returned
+ continues: true (boolean) - Only shows when there are more values
+ lastid: 1254 (number) - Id for the last alert retrieved
+ data (array)
+ (object)
### List All Device Data Limit alerts [GET /api/1/alerts/device_data_limit{?orgid,limit,startafter}]
List alerts created by devices reaching a limit of data usage.
`GET https://dashboard.hologram.io/api/1/alerts/device_data_limit`
+ Parameters
+ orgid: 1234 (number, optional)
Only return alerts that are usable for the given organization ID
+ limit: 20 (string, optional)
Return a maximum of this many alerts.
+ startafter: 1 (number, optional)
Return the alerts whose IDs come after the given ID
+ Response 200 (application/json)
+ Attributes
+ success: true (boolean) - Was the request successful?
+ limit: 1 (number) - The query limit
+ size: 1 (number) - The number of values returned
+ continues: true (boolean) - Only shows when there are more values
+ lastid: 1254 (number) - Id for the last alert retrieved
+ data (array)
+ (object)
### Get Alert Count by Type [GET /api/1/alerts/count{?orgid,type}]
Get alert count by type.
`GET https://dashboard.hologram.io/api/1/alerts/count`
Returns the number of alerts by type.
+ Parameters
+ orgid: 1234 (number, required)
Only returns alert count that are usable for the given organization ID
+ type: TAC_CHANGE (string, required)
Type of alert to get the count of
+ Response 200 (application/json)
+ Attributes
+ success: true (boolean) - Was the request successful?
+ data: 275 (number) - Number of alerts for given alert type
### Acknowledge Alert by Alert id [PUT /api/1/alerts/{id}/acknowledge{?orgid}]
Acknowledge alert by alert id.
`PUT https://dashboard.hologram.io/api/1/alerts/{id}/acknowledge`
+ Parameters
+ orgid: 1234 (number, required)
Only acknowledges alert that are usable for the given organization ID
+ id: 1 (number, required)
Id for the alert being acknowledged
+ Response 200 (application/json)
+ Attributes
+ success: true (boolean) - Was the request successful?
### Unacknowledge Alert by Alert id [PUT /api/1/alerts/{id}/unacknowledge{?orgid}]
Unacknowledge alert by alert id.
`PUT https://dashboard.hologram.io/api/1/alerts/{id}/unacknowledge`
+ Parameters
+ orgid: 1234 (number, required)
Only unacknowledges alert that are usable for the given organization ID
+ id: 1 (number, required)
Id for the alert being unacknowledged
+ Response 200 (application/json)
+ Attributes