-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathswagger.json
4208 lines (4208 loc) · 120 KB
/
swagger.json
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
{
"openapi": "3.0.0",
"info": {
"version": "1.5.0",
"title": "Econic ID API Reference",
"termsOfService": "https://www.econicapp.com/terms",
"contact": {
"email": "[email protected]",
"url": "http://www.econicapp.com"
},
"license": {
"name": "Apache 2.0",
"url": "http://www.apache.org/licenses/LICENSE-2.0.html"
},
"x-logo": {
"url": "https://storage.googleapis.com/econic-assets/econicid_logo_white.png"
},
"description": "# Introduction\nEconic ID is an *authentication* and *authorization* system which at its core it allows users to manage their digital identities, \nby allowing them to upload proofs, such as government issued IDs, that prove beyond doubt that they are the person who they claim to be;\nsharing those proofs with third parties; and creating digital credentials. \n\nThe Econic ID API implements the OAuth 2 protocol and is built on HTTP around REST and resource oriented URLs. \nIt accepts requests bodies and returns responses encoded in JSON. Standard HTTP response codes and verbs are used. \n\n# Enviroments\nAll the Econic products have a public sandbox environment, known as testnet, for demo and testing purposes. Each environment has \nits own accounts and objects, so you will need to create a separate Econic ID account for the testnet environment.\n\n# Authentication\nEconic ID implements the OAuth 2.0 protocol, and thus supports two forms of authentication\n- OAuth2 tokens \n- API Keys\n\nOAuth2 tokens are obtained after creating an account, or loging in though our OAuth2 form with your user credentials.\nFor security reasons, these tokens expire every 1 hour. API Keys are created and managed though this API, while using an OAuth token as authentication.\n\nOnce a user has created a Econic ID account it is recommended that he creates an API key to allow him access without the need for his credentials. \nAs a general rule, you should only use OAuth2 tokens when creating an account, or if your integration doesn't allow secure storage of the API Keys. \n\n# Getting Started\nWe recomend you use [Postman](https://www.postman.com/) while getting familiar with the API. Once you have requested access, you will be provided with \nan OAuth2 client credentials, so you can create your Econic ID account though Postman or a OAuth2 library. \n\nThe first thing you want to do after creating your account, is to create a pair of API Keys. This is done though a `Create Key` action in the `Keys` resource.\nAfter creating the resource, the server will return to you the `Public Key`, the `Private Key` and the `Transaction Key` of your newly created `API Keys`. \nIt is very important you save the `Private Key` as this is only returned during the key creating and can't be recovered. If you lose it, you will need to\ncreate new `Keys`. \n\nOnce you have created your API Key, you can sign future requests using the `Private Key` you saved previously. While signatures can be created in any programming language,\nfor convinience we recommend you use our [developer toolkit](https://github.com/TecnologiaDeBloques/node-developer-toolkit). This will generate the signature, and if you\nare using Postman it will automatically add it to the request header.\n\nAfter this, you are free to explore the API and its different resources.\n"
},
"tags": [
{
"name": "Profile",
"description": "Defined as an actor in the system, there can be two types of profiles: Personal (representing a human) and business (representing an organization).\n\nWhen you create an Econic ID account, you create a `user` which is an internal resource of the system that is associated with your login credentials,\nand a personal `profile`. This personal `profile` represents you as an individual, but since you may want to act as an organization you can create a \nseparate `profile` know as a business `profile`.\n\nMost resources are owned by `profiles` instead of `users`, so this way you can separate your personal account from your business account while not having to \ncreate multiple Econic ID accounts and to manage multiple credentials.\n\nA `user` can only have a single personal `profile`, which as mentioned before is automatically created.\n\n<SchemaDefinition schemaRef=\"#/components/schemas/Profile\" />\n"
},
{
"name": "Key",
"description": "API Keys comprised of a ED25519 Key Pair and a secret known as Transaction Key. \n\n`Keys` allow `users` to authenticate and to authorize requests in all Econic systems. The ED25519 key pair its utilized for signing requests, while the Transaction Key must be \nadded as well when authorizing transactions. After creation, the Ed25519 Public Key is stored in our server, and the Private Key is sent alongside the Transaction Key back the client. \n\nYou must save the Private Key and the Transaction Key after creation, as both are unrecoverable and only sent as a response during the key creation. \nIt will be needed to create a new Key if you lose any of these secrets.\n\n<SchemaDefinition schemaRef=\"#/components/schemas/Key\" />\n"
},
{
"name": "Device",
"description": "`Key` paired to a physical device which can receive push notifications.\n\nA `Device` is comprised of a `Key` and serves the same functions as a `Key`, but also allows for the reception of push notifications.\n<SchemaDefinition schemaRef=\"#/components/schemas/Device\" />\n"
},
{
"name": "File",
"description": "An uploaded file that can be used to create other resources such as proofs and documents.\n<SchemaDefinition schemaRef=\"#/components/schemas/File\" />\n"
},
{
"name": "Document",
"description": "A document that is represented by a file that can be signed by other users with digital signatures.\n<SchemaDefinition schemaRef=\"#/components/schemas/Document\" />\n"
},
{
"name": "Proof",
"description": "Evidence provided by the `profile` which \"provees\" the identity of the legal person it represents.\n\nIdentity Proofs are as the name suggest, allow the `profile` to build a digital identity by registering things such as a government issued ID, or a address proof.\n<SchemaDefinition schemaRef=\"#/components/schemas/Proof\" />\n"
},
{
"name": "Proof Type",
"description": "The name and description of the proofs that will be uploaded, can be thought of as a category. Example of proof types: Passports, Credentials, Medical exams, etc.\n<SchemaDefinition schemaRef=\"#/components/schemas/ProofType\" />\n"
},
{
"name": "Certificate",
"description": "Object that is attesting a certain fact.\n<SchemaDefinition schemaRef=\"#/components/schemas/Certificate\" />\n"
},
{
"name": "Certificate Type",
"description": "The name and description of the certificates, can be thought of as a category of certificates. Example of certificate types: birthdate, norm compliance, health.\n<SchemaDefinition schemaRef=\"#/components/schemas/CertificateType\" />\n"
},
{
"name": "Credential",
"description": "Object that proves a person's identity\n<SchemaDefinition schemaRef=\"#/components/schemas/Credential\" />\n"
},
{
"name": "Credential Type",
"description": "The name and description of the credentials, can be thought of as a category of credentials. Example of credential types: school, work, gym.\n<SchemaDefinition schemaRef=\"#/components/schemas/CredentialType\" />\n"
},
{
"name": "Signature",
"description": "A cryptographic signature generated by the profile private key that can be verified. Signatures are use the ED25519 public-key signature system. \n<SchemaDefinition schemaRef=\"#/components/schemas/Signature\" />\n"
}
],
"x-tagGroups": [
{
"name": "Core Resources",
"tags": [
"Profile",
"Key",
"Device",
"File",
"Document",
"Proof Type",
"Proof",
"Certificate Type",
"Certificate",
"Credential Type",
"Credential",
"Signature"
]
},
{
"name": "User Owned Resources",
"tags": [
"Profiles",
"Keys",
"Devices"
]
},
{
"name": "Profile Owned Resources",
"tags": [
"Certificate Types",
"Certificates",
"Credential Types",
"Credentials",
"Proof Types",
"Proofs",
"Documents",
"Signatures"
]
},
{
"name": "Files",
"tags": [
"Files"
]
}
],
"security": [
{
"oAuth": []
},
{
"APIKey": []
}
],
"servers": [
{
"url": "https://testnet.econicid.com",
"description": "Testing environment"
},
{
"url": "https://www.econicid.com",
"description": "Production environment"
}
],
"paths": {
"/certificate_types": {
"get": {
"tags": [
"Certificate Types"
],
"summary": "List Certificate Types",
"description": "Returns a list of the existing proof types.",
"operationId": "listCertificateTypes",
"parameters": [
{
"$ref": "#/components/parameters/limit"
},
{
"$ref": "#/components/parameters/offset"
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/CertificateType"
}
}
}
}
},
"400": {
"$ref": "#/components/responses/BadRequest"
},
"401": {
"$ref": "#/components/responses/Unauthorized"
},
"402": {
"$ref": "#/components/responses/RequestFailed"
},
"429": {
"$ref": "#/components/responses/TooManyRequests"
},
"500": {
"$ref": "#/components/responses/ServerError"
}
}
},
"post": {
"tags": [
"Certificate Types"
],
"summary": "Create a Certificate Type",
"description": "Creates a new Certificate Type",
"operationId": "createCertificateType",
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Create"
}
}
},
"required": true
},
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/CertificateType"
}
}
}
},
"400": {
"$ref": "#/components/responses/BadRequest"
},
"401": {
"$ref": "#/components/responses/Unauthorized"
},
"402": {
"$ref": "#/components/responses/RequestFailed"
},
"429": {
"$ref": "#/components/responses/TooManyRequests"
},
"500": {
"$ref": "#/components/responses/ServerError"
}
}
}
},
"/certificate_types/{certificate_type_id}": {
"parameters": [
{
"$ref": "#/components/parameters/CertificateType"
}
],
"get": {
"tags": [
"Certificate Types"
],
"summary": "Get a Certificate Type",
"description": "Retrieve an existing Certificate Type",
"operationId": "getCertificateType",
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/CertificateType"
}
}
}
},
"400": {
"$ref": "#/components/responses/BadRequest"
},
"401": {
"$ref": "#/components/responses/Unauthorized"
},
"402": {
"$ref": "#/components/responses/RequestFailed"
},
"404": {
"$ref": "#/components/responses/NotFound"
},
"429": {
"$ref": "#/components/responses/TooManyRequests"
},
"500": {
"$ref": "#/components/responses/ServerError"
}
}
},
"put": {
"tags": [
"Certificate Types"
],
"summary": "Update a Certificate Type",
"description": "Update an existing Certificate Type",
"operationId": "updateCertificateType",
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Update"
}
}
},
"required": true
},
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/CertificateType"
}
}
}
},
"400": {
"$ref": "#/components/responses/BadRequest"
},
"401": {
"$ref": "#/components/responses/Unauthorized"
},
"402": {
"$ref": "#/components/responses/RequestFailed"
},
"404": {
"$ref": "#/components/responses/NotFound"
},
"409": {
"$ref": "#/components/responses/Conflict"
},
"429": {
"$ref": "#/components/responses/TooManyRequests"
},
"500": {
"$ref": "#/components/responses/ServerError"
}
}
},
"delete": {
"tags": [
"Certificate Types"
],
"summary": "Delete a Certificate Type",
"description": "Delete a Certificate Type",
"operationId": "deleteCertificateType",
"responses": {
"200": {
"description": "OK"
},
"400": {
"$ref": "#/components/responses/BadRequest"
},
"401": {
"$ref": "#/components/responses/Unauthorized"
},
"402": {
"$ref": "#/components/responses/RequestFailed"
},
"404": {
"$ref": "#/components/responses/NotFound"
},
"409": {
"$ref": "#/components/responses/Conflict"
},
"429": {
"$ref": "#/components/responses/TooManyRequests"
},
"500": {
"$ref": "#/components/responses/ServerError"
}
}
}
},
"/certificates": {
"get": {
"tags": [
"Certificates"
],
"summary": "List Certificates",
"description": "Returns a list of all the existing Certificates",
"operationId": "listCertificates",
"parameters": [
{
"$ref": "#/components/parameters/limit"
},
{
"$ref": "#/components/parameters/offset"
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Certificate-2"
}
}
}
}
},
"400": {
"$ref": "#/components/responses/BadRequest"
},
"401": {
"$ref": "#/components/responses/Unauthorized"
},
"402": {
"$ref": "#/components/responses/RequestFailed"
},
"429": {
"$ref": "#/components/responses/TooManyRequests"
},
"500": {
"$ref": "#/components/responses/ServerError"
}
}
},
"post": {
"tags": [
"Certificates"
],
"summary": "Emit a Certificate",
"description": "Emits a new Certificate",
"operationId": "emitCertificate",
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Emit"
}
}
},
"required": true
},
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Certificate-2"
}
}
}
},
"400": {
"$ref": "#/components/responses/BadRequest"
},
"401": {
"$ref": "#/components/responses/Unauthorized"
},
"402": {
"$ref": "#/components/responses/RequestFailed"
},
"429": {
"$ref": "#/components/responses/TooManyRequests"
},
"500": {
"$ref": "#/components/responses/ServerError"
}
}
}
},
"/certificates/{certificate_id}": {
"parameters": [
{
"$ref": "#/components/parameters/Certificate"
}
],
"get": {
"tags": [
"Certificates"
],
"summary": "Get a Certificate",
"description": "Retrieve an existing Certificate.",
"operationId": "getCertificate",
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Certificate-2"
}
}
}
},
"400": {
"$ref": "#/components/responses/BadRequest"
},
"401": {
"$ref": "#/components/responses/Unauthorized"
},
"402": {
"$ref": "#/components/responses/RequestFailed"
},
"404": {
"$ref": "#/components/responses/NotFound"
},
"429": {
"$ref": "#/components/responses/TooManyRequests"
},
"500": {
"$ref": "#/components/responses/ServerError"
}
}
}
},
"/certificates/{certificate_id}/revoke": {
"parameters": [
{
"$ref": "#/components/parameters/Certificate"
}
],
"post": {
"tags": [
"Certificates"
],
"summary": "Revoke a Certificate",
"description": "Revoke a Certificate which will render it invalid",
"operationId": "revokeCertificate",
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/CertificateRevoked"
}
}
}
},
"400": {
"$ref": "#/components/responses/BadRequest"
},
"401": {
"$ref": "#/components/responses/Unauthorized"
},
"402": {
"$ref": "#/components/responses/RequestFailed"
},
"429": {
"$ref": "#/components/responses/TooManyRequests"
},
"500": {
"$ref": "#/components/responses/ServerError"
}
}
}
},
"/credential_types": {
"get": {
"tags": [
"Credential Types"
],
"summary": "List Credential Types",
"description": "Returns a list of the existing proof types.",
"operationId": "listCredentialTypes",
"parameters": [
{
"$ref": "#/components/parameters/limit"
},
{
"$ref": "#/components/parameters/offset"
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/CredentialType"
}
}
}
}
},
"400": {
"$ref": "#/components/responses/BadRequest"
},
"401": {
"$ref": "#/components/responses/Unauthorized"
},
"402": {
"$ref": "#/components/responses/RequestFailed"
},
"429": {
"$ref": "#/components/responses/TooManyRequests"
},
"500": {
"$ref": "#/components/responses/ServerError"
}
}
},
"post": {
"tags": [
"Credential Types"
],
"summary": "Create a Credential Type",
"description": "Creates a new Credential Type",
"operationId": "createCredentialType",
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Create-2"
}
}
},
"required": true
},
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/CredentialType"
}
}
}
},
"400": {
"$ref": "#/components/responses/BadRequest"
},
"401": {
"$ref": "#/components/responses/Unauthorized"
},
"402": {
"$ref": "#/components/responses/RequestFailed"
},
"429": {
"$ref": "#/components/responses/TooManyRequests"
},
"500": {
"$ref": "#/components/responses/ServerError"
}
}
}
},
"/credential_types/{credential_type_id}": {
"parameters": [
{
"$ref": "#/components/parameters/CredentialType"
}
],
"get": {
"tags": [
"Credential Types"
],
"summary": "Get a Credential Type",
"description": "Retrieve an existing Credential Type",
"operationId": "getCredentialType",
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/CredentialType"
}
}
}
},
"400": {
"$ref": "#/components/responses/BadRequest"
},
"401": {
"$ref": "#/components/responses/Unauthorized"
},
"402": {
"$ref": "#/components/responses/RequestFailed"
},
"404": {
"$ref": "#/components/responses/NotFound"
},
"429": {
"$ref": "#/components/responses/TooManyRequests"
},
"500": {
"$ref": "#/components/responses/ServerError"
}
}
},
"put": {
"tags": [
"Credential Types"
],
"summary": "Update a Credential Type",
"description": "Update an existing Credential Type",
"operationId": "updateCredentialType",
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Update-2"
}
}
},
"required": true
},
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/CredentialType"
}
}
}
},
"400": {
"$ref": "#/components/responses/BadRequest"
},
"401": {
"$ref": "#/components/responses/Unauthorized"
},
"402": {
"$ref": "#/components/responses/RequestFailed"
},
"404": {
"$ref": "#/components/responses/NotFound"
},
"409": {
"$ref": "#/components/responses/Conflict"
},
"429": {
"$ref": "#/components/responses/TooManyRequests"
},
"500": {
"$ref": "#/components/responses/ServerError"
}
}
},
"delete": {
"tags": [
"Credential Types"
],
"summary": "Delete a Credential Type",
"description": "Delete a Credential Type",
"operationId": "deleteCredentialType",
"responses": {
"200": {
"description": "OK"
},
"400": {
"$ref": "#/components/responses/BadRequest"
},
"401": {
"$ref": "#/components/responses/Unauthorized"
},
"402": {
"$ref": "#/components/responses/RequestFailed"
},
"404": {
"$ref": "#/components/responses/NotFound"
},
"409": {
"$ref": "#/components/responses/Conflict"
},
"429": {
"$ref": "#/components/responses/TooManyRequests"
},
"500": {
"$ref": "#/components/responses/ServerError"
}
}
}
},
"/credentials": {
"get": {
"tags": [
"Credentials"
],
"summary": "List Credentials",
"description": "Returns a list of all the existing Credentials",
"operationId": "listCredentials",
"parameters": [
{
"$ref": "#/components/parameters/limit"
},
{
"$ref": "#/components/parameters/offset"
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Credential"
}
}
}
}
},
"400": {
"$ref": "#/components/responses/BadRequest"
},
"401": {
"$ref": "#/components/responses/Unauthorized"
},
"402": {
"$ref": "#/components/responses/RequestFailed"
},
"429": {
"$ref": "#/components/responses/TooManyRequests"
},
"500": {
"$ref": "#/components/responses/ServerError"
}
}
},
"post": {
"tags": [
"Credentials"
],
"summary": "Emit a Credential",
"description": "Emits a new Credential",
"operationId": "emitCredential",
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Emit-2"
}
}
},
"required": true
},
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Credential"
}
}
}
},
"400": {
"$ref": "#/components/responses/BadRequest"
},
"401": {
"$ref": "#/components/responses/Unauthorized"
},
"402": {
"$ref": "#/components/responses/RequestFailed"
},
"429": {
"$ref": "#/components/responses/TooManyRequests"
},
"500": {
"$ref": "#/components/responses/ServerError"
}
}
}
},
"/credentials/{credential_id}": {
"parameters": [
{
"$ref": "#/components/parameters/Credential"
}
],
"get": {
"tags": [
"Credentials"
],
"summary": "Get a Credential",
"description": "Retrieve an existing Credential.",
"operationId": "getCredential",
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Credential"
}
}
}
},
"400": {
"$ref": "#/components/responses/BadRequest"
},
"401": {
"$ref": "#/components/responses/Unauthorized"
},
"402": {
"$ref": "#/components/responses/RequestFailed"
},
"404": {
"$ref": "#/components/responses/NotFound"
},
"429": {
"$ref": "#/components/responses/TooManyRequests"
},
"500": {
"$ref": "#/components/responses/ServerError"
}
}
}
},
"/credentials/{credential_id}/revoke": {
"parameters": [
{
"$ref": "#/components/parameters/Credential"
}
],
"post": {
"tags": [
"Credentials"
],
"summary": "Revoke a Credential",
"description": "Revoke a Certificate which will render it invalid",
"operationId": "revokeCredential",
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/CredentialRevoked"
}
}
}
},
"400": {
"$ref": "#/components/responses/BadRequest"
},
"401": {
"$ref": "#/components/responses/Unauthorized"
},
"402": {
"$ref": "#/components/responses/RequestFailed"
},
"429": {
"$ref": "#/components/responses/TooManyRequests"
},
"500": {
"$ref": "#/components/responses/ServerError"
}
}
}
},
"/devices": {
"get": {
"tags": [
"Devices"
],
"summary": "List Devices",
"description": "Returns a list of all your devices sorted chronologicaly by creation date.",
"operationId": "listDevices",
"parameters": [
{
"$ref": "#/components/parameters/limit"
},
{
"$ref": "#/components/parameters/offset"
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Device"
}
}
}
}
},
"400": {
"$ref": "#/components/responses/BadRequest"
},
"401": {
"$ref": "#/components/responses/Unauthorized"
},
"402": {
"$ref": "#/components/responses/RequestFailed"
},
"429": {
"$ref": "#/components/responses/TooManyRequests"
},
"500": {
"$ref": "#/components/responses/ServerError"
}
}
},
"post": {
"tags": [
"Devices"
],
"summary": "Create a device",
"description": "Creates a new device",
"operationId": "createDevice",
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Create-3"
}