-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathRemoteit_Prod.postman_collection.json
More file actions
2339 lines (2339 loc) · 82.3 KB
/
Remoteit_Prod.postman_collection.json
File metadata and controls
2339 lines (2339 loc) · 82.3 KB
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
{
"info": {
"_postman_id": "e39d66ec-18ea-4a61-b8fa-3c19f5650981",
"name": "Remoteit_Prod",
"description": "remote.it is powered by a robust set of APIs that allow you to do anything via an API that you can do with our web portal, desktop or mobile applications.\n\n## Authentication\n\nRequest signing is done for each request independently and is sensitive to clock drift based on the system time of the machine making the API call.\n\nBest practice is to use **UTC or GMT** when using the signature methods to avoid ambiguous time zones when dates are generated by your code.\n\nTo authenticate an API request, the client must generate a signature using the previously created key and secret.\n\nThe GraphQL API requires authentication for requests. Remote.It authentication uses HTTP Request Signature. The advantages of this method are:\n\n- Keys do not expire\n \n- Keys can be disabled and revoked (deleted) by the user at any time\n \n- Keys are not dependent on password\n \n- Keys are more secure (the secret is never transmitted because the request is signed)\n \n\n## Key Management\n\nYou can generate, enable, disable and delete keys in the Account section of the web portal here [https://app.remote.it/#/account/accessKey](https://app.remote.it/#/account/accessKey). \nPlease note: Generation of keys is crypto-random and the secret is only available immediately after creation by clicking the “Show secret access key” link or downloading the key as a CSV file (containing the Access Key ID and Secret Access Key) \nYou are limited to 2 active access keys. The account page will also show when the key was created and last used for authentication. If you suspect your key has been compromised, generate a new one, replace it in your code and disable it. If desired you can delete the compromised key after disabling it. \nIn addition, if you will be using the REST-API you will also need to retrieve your Developer API Key. This can also be found in the Account section of the web portal.\n\n### Authentication error response\n\nIf an API key is missing, malformed, or invalid, you will receive an HTTP 401 Unauthorized response code.\n\n## Integration\n\nIf you want to start using the API requests in your code, you cannot use the generated code out of any tool as the generated signature is only good for that specific request. You will need to use the http request signing methodology. Some examples can be found on the [authentication page](https://docs.remote.it/developer-tools/authentication#examples).\n\n### **Schema Definitions**\n\nGraphQL endpoint supports introspection queries via the __schema query**.** There is also a visual version of the schema available at [https://api.remote.it/v1/graphql/doc](https://api.remote.it/v1/graphql/doc)\n\n#### We recommend using a GraphQL client (Developer Tools) to introspect and explore the schema.\n\nConfigure your GraphQL client to use the API endpoint:\n\n`https://api.remote.it/graphql/v1`\n\nSchema convention is to use upper camel case for object types and lower camel case for property names.\n\nNote that these objects and parameters are continually enhanced. Please use your IDE for the most up to date schema. The changes are designed to be non-breaking by adding rather than deleting or changing existing definitions.\n\nBasic types are:\n\n- ID (similar to the string type but used for object IDs)\n \n- String\n \n- Int\n \n- Float\n \n- Boolean\n \n- DateTime (ISO 8601 format Date String)\n \n\n## Queries\n\nQueries are requests which read the data and will not change the data. All queries will be in context of the user associated with the access key and secret. The usage examples include a variable section which will need to accompany the query or alternatively, you can put the values inline.\n\n### Fetching Updates\n\nIf you're working on building an application which display data and you want the status information to update (near) realtime, use the [webhook](https://docs.remote.it/developer-tools/webhooks). To prevent excessive usage of our API, we recommend that you be mindful about your implementation.\n\n**Do's:**\n\n- Register a programmatic [webhook](https://docs.remote.it/developer-tools/webhooks) and get updates for status changes on your devices. When you detect changes, update the device information\n \n\n**Dont's:**\n\n- Poll updates for each device. There should never be a reason to do this, unless in small cases and your application might get rate limited. See above tactics to implement this better.\n \n\n## Mutations\n\nMutations are requests which update data. All mutations are in context of the user associated with the access key and secret.\n\nIn the case where we do not have the functionality supported, the REST-API examples are provided. These will be updated from time to time as remote.it migrates to support graphQL only.\n\n## Pagination\n\nThe list responses from the devices and event log queries return paginated results. We implement a pagination model with `from`/`after` and `size` pagination arguments. Responses can return `hasMore`, `last` and `total` . If the `hasMore` response returns true, this indicates do another fetch. In this case, the `from` will increment to 1001 to fetch the next set. You could also determine this by iteration until you get to the `total`. Size is limited to 1000 max in each return.\n\n### **Need some help?**\n\nUse our community at forum.remote.it",
"schema": "https://schema.getpostman.com/json/collection/v2.0.0/collection.json",
"_exporter_id": "5451357",
"_collection_link": "https://www.postman.com/remoteit/workspace/remote-it-graphql/collection/5451357-e39d66ec-18ea-4a61-b8fa-3c19f5650981?action=share&source=collection_link&creator=5451357"
},
"item": [
{
"name": "Scripting",
"item": [
{
"name": "Upload File",
"event": [
{
"listen": "test",
"script": {
"exec": [
""
],
"type": "text/javascript",
"packages": {}
}
}
],
"protocolProfileBehavior": {
"followRedirects": true,
"disableUrlEncoding": false,
"disableCookies": false
},
"request": {
"method": "POST",
"header": [
{
"key": "Content-Type",
"value": "multipart/form-data"
},
{
"key": "User-Agent",
"value": "insomnia/8.5.1"
}
],
"body": {
"mode": "formdata",
"formdata": [
{
"key": "filename.sh",
"type": "file",
"src": "/Users/bstrech/Desktop/Get-Device-Status (1).sh"
},
{
"key": "executable",
"value": "true"
},
{
"key": "shortDesc",
"value": "Update Status Columns of Device"
},
{
"key": "longDesc",
"value": "Updates Device Status Columns with some information about the device"
}
]
},
"url": "{{_.base_url }}/file/upload"
},
"response": []
},
{
"name": "Query: Get List of Files",
"event": [
{
"listen": "test",
"script": {
"exec": [
""
],
"type": "text/javascript",
"packages": {}
}
}
],
"protocolProfileBehavior": {
"followRedirects": true,
"disableUrlEncoding": false,
"disableCookies": false
},
"request": {
"method": "POST",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"body": {
"mode": "graphql",
"graphql": {
"query": "query GetFiles {\nlogin {\n# Add the following line if you need to do this in Org context.\n# The ID is the Org ID\n #account(id:\"XXXXXX-XXXX-XXXXXX-XXXXX\") {\n files {\n owner {\n email\n id\n }\n id\n name \n shortDesc\n longDesc\n executable\n created\n updated\n versions {\n id\n created\n version\n arguments {\n name\n order\n options\n argumentType\n }\n }\n lastVersion {\n id\n created\n version\n arguments {\n name\n order\n options\n argumentType \n }\n }\n }\n #} end of org context\n}\n}"
}
},
"url": "{{ _.base_url }}"
},
"response": []
},
{
"name": "Mutation: Delete File",
"event": [
{
"listen": "test",
"script": {
"exec": [
""
],
"type": "text/javascript",
"packages": {}
}
}
],
"protocolProfileBehavior": {
"followRedirects": true,
"disableUrlEncoding": false,
"disableCookies": false
},
"request": {
"method": "POST",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"body": {
"mode": "graphql",
"graphql": {
"query": "mutation deleteFile {\n deleteFile(fileId: \"881189d3-59b8-48d7-84fe-3199bdfbc40a\")\n}"
}
},
"url": "{{ _.base_url }}"
},
"response": []
},
{
"name": "Mutation: Delete File Version",
"event": [
{
"listen": "test",
"script": {
"exec": [
""
],
"type": "text/javascript",
"packages": {}
}
}
],
"protocolProfileBehavior": {
"followRedirects": true,
"disableUrlEncoding": false,
"disableCookies": false
},
"request": {
"method": "POST",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"body": {
"mode": "graphql",
"graphql": {
"query": "mutation deleteFileVersion {\n deleteFileVersion(fileVersionId: \"d3449672-74e6-4745-8c25-2ffd79e6be36\")\n}"
}
},
"url": "{{ _.base_url }}"
},
"response": []
},
{
"name": "Mutation: Start a Scripting Job",
"event": [
{
"listen": "test",
"script": {
"exec": [
""
],
"type": "text/javascript",
"packages": {}
}
}
],
"protocolProfileBehavior": {
"followRedirects": true,
"disableUrlEncoding": false,
"disableCookies": false
},
"request": {
"method": "POST",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"body": {
"mode": "graphql",
"graphql": {
"query": "mutation execute {\n startJob(\n fileId: \"881189d3-59b8-48d7-84fe-3199bdfbc40a\",\n #Device IDs OR Tags are used to identify the devices for the job. If both device IDs and tags are passed, device Ids will be used.\n deviceIds: [\"80:00:00:00:01:22:37:AE\"],\n #optional device tags (can be used to run a group of scripts against a set of devices with these tags at time of execution)\n\t\t#ANY/ALL (i.e. or/and), when tags are used, operator should accompany\n tagFilter: {operator: ANY, values:[\"reboot\"]},\n arguments: [\n {\n name: \"url\"\n value: \"https://remote.it\"\n },\n {\n name: \"imageFile\"\n value: \"3f5f04d4-23f4-4cd8-a9ba-70814952dff7\"\n },\n {\n name: \"bookmarkName\"\n value: \"RemoteIt\"\n },\n {\n name: \"action\"\n value: \"Add\"\n }\n ]\n )\n}"
}
},
"url": "{{ _.base_url }}"
},
"response": []
},
{
"name": "Mutation: Cancel a Scripting Job",
"event": [
{
"listen": "test",
"script": {
"exec": [
""
],
"type": "text/javascript",
"packages": {}
}
}
],
"protocolProfileBehavior": {
"followRedirects": true,
"disableUrlEncoding": false,
"disableCookies": false
},
"request": {
"method": "POST",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"body": {
"mode": "graphql",
"graphql": {
"query": "# Cancel Job requires the job ID and will cancel the job that is in progress but cannot revert any scripts that have already executed. Any currently executing script will no longer update the Remote.It backend for updating attributes or legacy task notifier, but the script will finish running. Any scripts not yet received by devices will be cancelled.\nmutation cancelJob {\n cancelJob(jobId: \"41fc0cec-4efd-40ef-8e48-1aa109019f1c\")\n}"
}
},
"url": "{{ _.base_url }}"
},
"response": []
},
{
"name": "Query: Get Scripting Jobs",
"event": [
{
"listen": "test",
"script": {
"exec": [
""
],
"type": "text/javascript",
"packages": {}
}
}
],
"protocolProfileBehavior": {
"followRedirects": true,
"disableUrlEncoding": false,
"disableCookies": false
},
"request": {
"method": "POST",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"body": {
"mode": "graphql",
"graphql": {
"query": "query GetJobs {\n login {\n # Add the following line if you need to do this in Org context.\n # The ID is the Org ID\n #account(id:\"XXXXXX-XXXX-XXXXXX-XXXXX\") {\n #see documentation on paginated responses for iteration\n #examples of filtering below\n jobs(ids: [\"41fc0cec-4efd-40ef-8e48-1aa109019f1c\",\"41fc0cec-4efd-40ef-8e48-xxxxx\"], statuses:[FAILED,WAITING,RUNNING,SUCCESS,CANCELLED],size: 1000)\n {\n\t\t\t\thasMore\n\t\t\t\ttotal\n\t\t\t\tlast\n\t\t\t\titems {\n\t\t\t\t\tid\n \towner {\n \temail\n \t}\n\t\t\t\t\tuser {\n\t \t\t\t\temail\n\t\t\t\t\t}\n\t\t\t\t\tcreated\n\t\t\t\t\tupdated\n\t\t\t\t\t# One of the following FAILED,WAITING,RUNNING,SUCCESS,CANCELLED\n\t\t\t\t\tstatus\n\t\t\t\t\t#tags associated with job\n\t\t\t\t\ttags {\n\t\t\t\t\t\tname\n\t\t\t\t\t}\n\t\t\t\t\t#ANY/ALL (i.e. or/and)\n\t\t\t\t\ttagOperator,\n\t\t\t\t\tfileVersion {\n\t \t\t\t\tid\n\t\t\t\t\t\tfile {\n\t\t\t\t\t\t\tname\n\t\t\t\t \t }\n\t\t\t\t\t}\n\t\t\t\t\tjobDevices {\n\t \t\t\tid\n\t \t\t\tdevice {\n\t\t\t\t\t\t\tid\n\t \t\t\t}\n\t\t\t\t\t\t#attributes associated with the job.\n\t\t\t\t\t\tattributes {\n\t\t\t\t\t\t\t created\n\t\t\t\t\t\t\t id\n\t\t\t\t\t\t\t key\n\t\t\t\t\t\t\t value\n\t\t\t\t\t\t}\n\t\t\t\t\t\t#one of the following: FAILED,WAITING,RUNNING,SUCCESS,CANCELLED\n\t\t\t\t\t\tstatus\n\t\t\t\t\t}\n\t\t\t\t\targuments {\n\t \t\t\tid\n\t \t\t\tfileArgument {\n\t\t\t\t\t\t\tid\n\t\t\t\t\t\t\tname\n\t\t\t\t\t\t\tdesc\n\t\t\t\t\t\t\torder\n\t\t\t\t\t\t\toptions\n\t\t\t\t\t\t\targumentType\n\t\t\t\t\t\t\tcreated\n\t \t\t\t}\n\t\t\t\t\tname\n\t\t\t\t\tdesc\n\t\t\t\t\torder\n\t\t\t\t\targumentType\n\t\t\t\t\tvalue\n }\n }\n }\n }\n}"
}
},
"url": "{{ _.base_url }}"
},
"response": []
}
]
},
{
"name": "Organizations",
"item": [
{
"name": "Query: Get Organization As Owner of Organization",
"event": [
{
"listen": "test",
"script": {
"exec": [
""
],
"type": "text/javascript",
"packages": {}
}
}
],
"protocolProfileBehavior": {
"followRedirects": true,
"disableUrlEncoding": false,
"disableCookies": false
},
"request": {
"method": "POST",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"body": {
"mode": "graphql",
"graphql": {
"query": "#Query the organization and its members\n#Returns ID that can be used in subsequent queries\n#and each members role\n\nquery {\n\tlogin {\n\t\torganization {\n\t\t\t# this is your organization, not any that your belong to as a member\n\t\t\tid\n\t\t\tname\n\t\t\tcreated\n\t\t\troles {\n\t\t\t\tid\n\t\t\t\tname\n\t\t\t\tpermissions\n\t\t\t}\n\t\t\tmembers {\n\t\t\t\tuser {\n\t\t\t\t\temail\n\t\t\t\t}\n\t\t\t\tcustomRole {\n\t\t\t\t\tname\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n"
}
},
"url": "{{ _.base_url }}"
},
"response": []
},
{
"name": "Query: Get Organization As Member Of Organization",
"event": [
{
"listen": "test",
"script": {
"exec": [
""
],
"type": "text/javascript",
"packages": {}
}
}
],
"protocolProfileBehavior": {
"followRedirects": true,
"disableUrlEncoding": false,
"disableCookies": false
},
"request": {
"method": "POST",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"body": {
"mode": "graphql",
"graphql": {
"query": "#Retrieves all organizations and roles a user is a member of\n\nquery {\n\tlogin {\n\t\tmembership {\n\t\t\t# This is your role and permissions\n\t\t\tcustomRole {\n\t\t\t\tid\n\t\t\t\tname\n\t\t\t\tpermissions\n\t\t\t}\n\t\t\torganization {\n\t\t\t\tid\n\t\t\t\tname\n\t\t\t\taccount {\n\t\t\t\t\tid\n\t\t\t\t\temail\n\t\t\t\t}\n\t\t\t\tcreated\n\t\t\t}\n\t\t}\n\t}\n}\n"
}
},
"url": "{{ _.base_url }}"
},
"response": []
},
{
"name": "Mutation: Remove Member from Org",
"event": [
{
"listen": "test",
"script": {
"exec": [
""
],
"type": "text/javascript",
"packages": {}
}
}
],
"protocolProfileBehavior": {
"followRedirects": true,
"disableUrlEncoding": false,
"disableCookies": false
},
"request": {
"method": "POST",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"body": {
"mode": "graphql",
"graphql": {
"query": "# The access key token must belong to a user with appropriate permissions. The user must either be the owner OR have a custom role with the administer (manage organization user) permission. \n\n\n# accountId is the org id.\n\nmutation {\n\tremoveMember(\n\t\taccountId: \"XX:XX\"\n\t\temail: \"[email protected]\"\n\t)\n}"
}
},
"url": "{{ _.base_url }}"
},
"response": []
},
{
"name": "Mutation: Add or Change Org Member",
"event": [
{
"listen": "test",
"script": {
"exec": [
""
],
"type": "text/javascript",
"packages": {}
}
}
],
"protocolProfileBehavior": {
"followRedirects": true,
"disableUrlEncoding": false,
"disableCookies": false
},
"request": {
"method": "POST",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"body": {
"mode": "graphql",
"graphql": {
"query": "# The access key token must belong to a user with appropriate permissions. The user must either be the owner OR have a custom role with the administer (manage organization user) permission. \n\n\n# accountId is the org id.\n#\n# role can be either MEMBER or ADMIN\n# roleId is the customRole ID\n\nmutation {\n\tsetMember(\n\t\taccountId: \"XX:XX\"\n\t\temail: [\"[email protected]\"]\n\t\t# Do not use role and roleId together.\n\t\t# role can be used when there are no custom roles. Values are MEMBER or ADMIN\n\t\trole: MEMBER\n\t\t# roleId is used when it is a custom role. See Query: Get Organization As Owner of Organization for fetching roles. Note if you are not the organization owner, you will need to combine it with Query: Organization General Query Example.\n\t\troleId: 225\n\t)\n}"
}
},
"url": "{{ _.base_url }}"
},
"response": []
},
{
"name": "Query: Organization General Query Example",
"event": [
{
"listen": "test",
"script": {
"exec": [
""
],
"type": "text/javascript",
"packages": {}
}
}
],
"protocolProfileBehavior": {
"followRedirects": true,
"disableUrlEncoding": false,
"disableCookies": false
},
"request": {
"method": "POST",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"body": {
"mode": "graphql",
"graphql": {
"query": "# Use this example as a template for modifying the other examples. You will need to have the appropriate permissions for the requested information. \n# At this moment mutations must be done as the owner of the organization unless specified here or in the schema documentation.\n\nquery {\n\tlogin {\n\t\t#account ID is the organization id. \n\t\taccount(id: \"xx:xx\") {\n\t\t\t#rest of the query for example...\n\t\t\tdevices (size:1000, from:0) {\n\t\t\t\thasMore\n\t\t\t\titems {\n\t\t\t\t\tid\n\t\t\t\t}\n\t\t\t}\n\t\t\t#end of nested part of the query.\n\t\t}\n\t}\n}\n"
}
},
"url": "{{ _.base_url }}"
},
"response": []
},
{
"name": "Query: Organization Get Devices and Services with Shares",
"event": [
{
"listen": "test",
"script": {
"exec": [
""
],
"type": "text/javascript",
"packages": {}
}
}
],
"protocolProfileBehavior": {
"followRedirects": true,
"disableUrlEncoding": false,
"disableCookies": false
},
"request": {
"method": "POST",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"body": {
"mode": "graphql",
"graphql": {
"query": "#Gets the list of devices limited to the first 1000\n#hasMore - if there are more devices in the account than requested\n#total - total number of devices based on query filter and account\n# Iteration should be used if hasMore is true and then increment the from to the next set. For example if the first query is size 1000 and hasMore is true, then the next query should set from to 1001.\n#Retrieves details of each devices such as\n# id, name and access. Access sharing at the device level indicates that at least one service is shared. Scripting indicates that they have scripting access in legacy portal. \n# Services lists the individual services of the device. with the id, name and access to the individual service.\n# Sharing can be removed via Mutation: Remove Device Share. You will need the user email, device ID or the individual service you want to remove sharing. If you pass device ID in remove, it will remove all sharing for that user including scripting.\n\nquery {\n\tlogin {\n\t\t#account ID is the organization id. You will need to have the appropriate permissions for the requested information.\n\t\taccount(id: \"xxxx-xxxx\") {\n\t\t\tdevices (size:1000, from:0) {\n\t\t\t\thasMore\n\t\t\t\ttotal\n\t\t\t\titems {\n\t\t\t\t\tid\n\t\t\t\t\tname\n\t\t\t\t\taccess {\n\t\t\t\t\t\tuser {\n\t\t\t\t\t\t\temail\n\t\t\t\t\t\t}\n\t\t\t\t\t\tscripting\n\t\t\t\t\t}\n\t\t\t\t\t# omit this node if do not need the individual service information\n\t\t\t\t\tservices {\n\t\t\t\t\t\tid\n\t\t\t\t\t\tname\n\t\t\t\t\t\taccess {\n\t\t\t\t\t\t\tuser {\n\t\t\t\t\t\t\t\temail\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n"
}
},
"url": "{{ _.base_url }}"
},
"response": []
},
{
"name": "Query: Organization Get Devices and Services with Shares",
"event": [
{
"listen": "test",
"script": {
"exec": [
""
],
"type": "text/javascript",
"packages": {}
}
}
],
"protocolProfileBehavior": {
"followRedirects": true,
"disableUrlEncoding": false,
"disableCookies": false
},
"request": {
"method": "POST",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"body": {
"mode": "graphql",
"graphql": {
"query": "#Gets the list of devices limited to the first 1000\n#hasMore - if there are more devices in the account than requested\n#total - total number of devices based on query filter and account\n# Iteration should be used if hasMore is true and then increment the from to the next set. For example if the first query is size 1000 and hasMore is true, then the next query should set from to 1001.\n#Retrieves details of each devices such as\n# id, name and access. Access sharing at the device level indicates that at least one service is shared. Scripting indicates that they have scripting access in legacy portal. \n# Services lists the individual services of the device. with the id, name and access to the individual service.\n# Sharing can be removed via Mutation: Remove Device Share. You will need the user email, device ID or the individual service you want to remove sharing. If you pass device ID in remove, it will remove all sharing for that user including scripting.\n\nquery {\n\tlogin {\n\t\t#account ID is the organization id. You will need to have the appropriate permissions for the requested information.\n\t\taccount(id: \"935C32DA-FD80-46DA-986E-50AA9FAB1BFB\") {\n\t\t\tfiles {\n\t\t\t\tname\n\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n"
}
},
"url": "{{ _.base_url }}"
},
"response": []
},
{
"name": "Mutation: Device and Shares",
"event": [
{
"listen": "test",
"script": {
"exec": [
""
],
"type": "text/javascript",
"packages": {}
}
}
],
"protocolProfileBehavior": {
"followRedirects": true,
"disableUrlEncoding": false,
"disableCookies": false
},
"request": {
"method": "POST",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"body": {
"mode": "graphql",
"graphql": {
"query": "# Device and share mutations can just be executed without the org context since a device/service id is associated with a specific account. See mutations in other sections.\n# The access key token must belong to a user with appropriate permissions. For example a user with only member priviledges will not be able to change sharing or update a device. \n\n\n# Example: Mutation to remove a share of device and all services where deviceId is the device ID. If a specific service is to be removed, use the service ID. This is not org membership, but individual sharing.\n\nmutation {\n\tshare(\n\t\tdeviceId: \"80:00:00:00:12:34:56:78\"\n\t\temail: \"[email protected]\"\n\t\tnotify: true\n\t\taction: REMOVE\n\t)\n}"
}
},
"url": "{{ _.base_url }}"
},
"response": []
}
]
},
{
"name": "Account",
"item": [
{
"name": "Query: Get Account ID of User",
"event": [
{
"listen": "test",
"script": {
"exec": [
""
],
"type": "text/javascript",
"packages": {}
}
}
],
"protocolProfileBehavior": {
"followRedirects": true,
"disableUrlEncoding": false,
"disableCookies": false
},
"request": {
"method": "POST",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"body": {
"mode": "graphql",
"graphql": {
"query": "#Query the organization and its members\n#Returns ID that can be used in subsequent queries\n#and each members role\n\nquery {\n\tlogin {\n\t\taccount {\n\t\t\tid\n\t\t}\n\t}\n}\n"
}
},
"url": "{{ _.base_url }}"
},
"response": []
},
{
"name": "Query: Retrieve Access Keys",
"event": [
{
"listen": "test",
"script": {
"exec": [
""
],
"type": "text/javascript",
"packages": {}
}
}
],
"protocolProfileBehavior": {
"followRedirects": true,
"disableUrlEncoding": false,
"disableCookies": false
},
"request": {
"method": "POST",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"body": {
"mode": "graphql",
"graphql": {
"query": "#For API Authentication:\n#only the Key is returned.\n#Secret is only retrievable once upon creation\n\nquery {\n\tlogin {\n\t\taccessKeys {\n\t\t\tcreated\n\t\t\tenabled\n\t\t\tkey\n\t\t\tlastUsed\n\t\t\t__typename\n\t\t}\n\t}\n}\n"
}
},
"url": "{{ _.base_url }}"
},
"response": []
},
{
"name": "Query: Application Types",
"event": [
{
"listen": "test",
"script": {
"exec": [
""
],
"type": "text/javascript",
"packages": {}
}
}
],
"protocolProfileBehavior": {
"followRedirects": true,
"disableUrlEncoding": false,
"disableCookies": false
},
"request": {
"method": "POST",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"body": {
"mode": "graphql",
"graphql": {
"query": "#List of supported application types and their default port for\n#for service creation\n\nquery {\n\tapplicationTypes {\n\t\tid\n\t\tname\n\t\tdescription\n\t\tport\n\t}\n}\n"
}
},
"url": "{{ _.base_url }}"
},
"response": []
},
{
"name": "Query: Retrieve Notification Settings",
"event": [
{
"listen": "test",
"script": {
"exec": [
""
],
"type": "text/javascript",
"packages": {}
}
}
],
"protocolProfileBehavior": {
"followRedirects": true,
"disableUrlEncoding": false,
"disableCookies": false
},
"request": {
"method": "POST",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"body": {
"mode": "graphql",
"graphql": {
"query": "#Gets the current notification settings on users account\n#Notifications are used to deliver device and service online/offline events\n\nquery {\n\tlogin {\n\t\tnotificationSettings {\n\t\t\temailNotifications\n\t\t\tdesktopNotifications\n\t\t\turlNotifications\n\t\t\tnotificationEmail\n\t\t\tnotificationUrl\n\t\t}\n\t}\n}\n"
}
},
"url": "{{ _.base_url }}"
},
"response": []
},
{
"name": "Mutation: Create New Access Keys",
"event": [
{
"listen": "test",
"script": {
"exec": [
""
],
"type": "text/javascript",
"packages": {}
}
}
],
"protocolProfileBehavior": {
"followRedirects": true,
"disableUrlEncoding": false,
"disableCookies": false
},
"request": {
"method": "POST",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"body": {
"mode": "graphql",
"graphql": {
"query": "#Access keys are used to authenticate you with our API.\n#You can create a new key or delete an existing key at any time.\n#You can also temporarily disable a key.\n#If you lose or forget your secret key, you cannot retrieve it.\n#There is a limit of #2 access keys.\n#No variables are required to be passed in\n\nmutation {\n\tcreateAccessKey {\n\t\tkey\n\t\tsecret\n\t\t__typename\n\t}\n}\n"
}
},
"url": "{{ _.base_url }}"
},
"response": []
},
{
"name": "Mutation: Enable/Disable Access Keys",
"event": [
{
"listen": "test",
"script": {
"exec": [
""
],
"type": "text/javascript",
"packages": {}
}
}
],
"protocolProfileBehavior": {
"followRedirects": true,
"disableUrlEncoding": false,
"disableCookies": false
},
"request": {
"method": "POST",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"body": {
"mode": "graphql",
"graphql": {
"query": "#Access keys are used to authenticate you with our API.\n#You can enable or disable keys at any time.\n\n#This example shows how to provide operation names for mutations\n#and pass in query variables\n\nmutation changeAccessKey($key: String!, $enable: Boolean!) {\n\tupdateAccessKey(key: $key, enabled: $enable) {\n\t\tcreated\n\t\tkey\n\t\tenabled\n\t\tlastUsed\n\t}\n}\n",
"variables": "{\"key\":\"2873\",\"enable\":true}"
}
},
"url": "{{ _.base_url }}"
},
"response": []
},
{
"name": "Mutation: Delete Access Keys",
"event": [
{
"listen": "test",
"script": {
"exec": [
""
],
"type": "text/javascript",
"packages": {}
}
}
],
"protocolProfileBehavior": {
"followRedirects": true,
"disableUrlEncoding": false,
"disableCookies": false
},
"request": {
"method": "POST",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"body": {
"mode": "graphql",
"graphql": {
"query": "#Access keys are used to authenticate you with our API.\n#You can create a new key or delete an existing key at any time.\n\n#You must pass the key to delete from the account\n#Keys are not recoverable once deleted\n\nmutation {\n\tdeleteAccessKey(key: \"\")\n}\n"
}
},
"url": "{{ _.base_url }}"
},
"response": []
}
]
},
{
"name": "Custom Attributes and Tagging",
"item": [
{
"name": "Query: Get User, Device, Service Attributes",
"event": [
{
"listen": "test",
"script": {
"exec": [
""
],
"type": "text/javascript",
"packages": {}
}
}
],
"protocolProfileBehavior": {
"followRedirects": true,
"disableUrlEncoding": false,
"disableCookies": false
},
"request": {
"method": "POST",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"body": {
"mode": "graphql",
"graphql": {
"query": "#Returns any custom attributes added to the User, Device or Service\n\nquery {\n\tlogin {\n\t\tattributes\n\t\tdevices {\n\t\t\thasMore\n\t\t\ttotal\n\t\t\titems {\n\t\t\t\tattributes\n\t\t\t\tservices {\n\t\t\t\t\tattributes\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n"
}
},
"url": "{{ _.base_url }}"
},
"response": []
},
{
"name": "Mutation: Set Single Attribute",
"event": [
{
"listen": "test",
"script": {
"exec": [
""
],
"type": "text/javascript",
"packages": {}
}
}
],
"protocolProfileBehavior": {
"followRedirects": true,
"disableUrlEncoding": false,
"disableCookies": false
},
"request": {
"method": "POST",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"body": {
"mode": "graphql",
"graphql": {
"query": "#This mutation sets a custom attribute of given value to\n#a User, Device or Service. \n#User is ID in {login{account{id}}}\n\n\nmutation {\n setAttribute(\n name: \"CustomAttribute\",\n value: \"ValueOfAttribute\",\n serviceId: \"2AEA1ECC-0E684D40\"\n )\n}"
}
},
"url": "{{ _.base_url }}"
},
"response": []
},
{
"name": "Mutation: Set Remote.it Category",
"event": [
{
"listen": "test",
"script": {
"exec": [
""
],
"type": "text/javascript",
"packages": {}
}
}
],
"protocolProfileBehavior": {
"followRedirects": true,
"disableUrlEncoding": false,
"disableCookies": false
},
"request": {
"method": "POST",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"body": {
"mode": "graphql",
"graphql": {
"query": "#This mutation updates the category A on a Device.\n#Attributes can be applied to User, Device or Service.\n\nmutation {\n\tsetAttribute(\n\t\tname: \"$remoteit.categoryA\"\n\t\tvalue: \"my category A value\"\n\t\tserviceId: \"80:00:00:00:12:34:56:78\"\n\t)\n}\n"
}
},
"url": "{{ _.base_url }}"
},
"response": []
},
{
"name": "Mutation: Set Multiple Attributes",
"event": [
{
"listen": "test",
"script": {
"exec": [
""
],
"type": "text/javascript",
"packages": {}
}
}
],
"protocolProfileBehavior": {
"followRedirects": true,
"disableUrlEncoding": false,
"disableCookies": false
},
"request": {
"method": "POST",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}