@@ -2,7 +2,7 @@ openapi: 3.0.0
2
2
info :
3
3
title : Treetracker Wallet API
4
4
contact : {}
5
- version : ' 1.27.4 '
5
+ version : ' 1.28.0 '
6
6
servers :
7
7
- url : https://{environment}-k8s.treetracker.org/wallet/v2
8
8
variables :
@@ -118,8 +118,6 @@ paths:
118
118
$ref : ' #/components/schemas/tokens'
119
119
' 401 ' :
120
120
$ref : ' #/components/responses/UnauthorizedError'
121
- ' 403 ' :
122
- $ref : ' #/components/responses/ForbiddenError'
123
121
' 422 ' :
124
122
description : ' Invalid or missing request parameters'
125
123
content :
@@ -155,8 +153,6 @@ paths:
155
153
$ref : ' #/components/schemas/tokenItem'
156
154
' 401 ' :
157
155
$ref : ' #/components/responses/UnauthorizedError'
158
- ' 403 ' :
159
- $ref : ' #/components/responses/ForbiddenError'
160
156
' 404 ' :
161
157
description : ' No token found matching token_uuid'
162
158
content :
@@ -221,8 +217,6 @@ paths:
221
217
$ref : ' #/components/schemas/historyResponse'
222
218
' 401 ' :
223
219
$ref : ' #/components/responses/UnauthorizedError'
224
- ' 403 ' :
225
- $ref : ' #/components/responses/ForbiddenError'
226
220
' 404 ' :
227
221
description : ' No token found matching token_uuid'
228
222
content :
@@ -280,8 +274,6 @@ paths:
280
274
$ref : ' #/components/schemas/walletsResponse'
281
275
' 401 ' :
282
276
$ref : ' #/components/responses/UnauthorizedError'
283
- ' 403 ' :
284
- $ref : ' #/components/responses/ForbiddenError'
285
277
' 422 ' :
286
278
description : ' Invalid query parameters'
287
279
content :
@@ -324,8 +316,15 @@ paths:
324
316
example : new_wallet
325
317
' 401 ' :
326
318
$ref : ' #/components/responses/UnauthorizedError'
327
- ' 403 ' :
328
- $ref : ' #/components/responses/ForbiddenError'
319
+ ' 409 ' :
320
+ description : ' The wallet to be created already exists'
321
+ content :
322
+ application/json :
323
+ schema :
324
+ $ref : ' #/components/schemas/errorResponse'
325
+ example :
326
+ code : 409
327
+ message : ' The wallet "walletX" already exists'
329
328
' 415 ' :
330
329
$ref : ' #/components/responses/UnsupportedMediaTypeError'
331
330
' 422 ' :
@@ -379,8 +378,6 @@ paths:
379
378
example : 12
380
379
' 401 ' :
381
380
$ref : ' #/components/responses/UnauthorizedError'
382
- ' 403 ' :
383
- $ref : ' #/components/responses/ForbiddenError'
384
381
' 404 ' :
385
382
$ref : ' #/components/responses/walletNotFound'
386
383
' 422 ' :
@@ -417,8 +414,6 @@ paths:
417
414
$ref : ' #/components/schemas/trustRelationshipsResponse'
418
415
' 401 ' :
419
416
$ref : ' #/components/responses/UnauthorizedError'
420
- ' 403 ' :
421
- $ref : ' #/components/responses/ForbiddenError'
422
417
' 404 ' :
423
418
$ref : ' #/components/responses/walletNotFound'
424
419
' 422 ' :
@@ -459,7 +454,14 @@ paths:
459
454
' 401 ' :
460
455
$ref : ' #/components/responses/UnauthorizedError'
461
456
' 403 ' :
462
- $ref : ' #/components/responses/ForbiddenError'
457
+ description : ' Lacking permission to transfer the tokens'
458
+ content :
459
+ application/json :
460
+ schema :
461
+ $ref : ' #/components/schemas/errorResponse'
462
+ example :
463
+ code : 403
464
+ message : ' The token 89b071ee-c49d-420c-b43d-0d3dfe323962 does not belong to the sender wallet'
463
465
' 404 ' :
464
466
description : ' No wallet or token found matching the corresponding parameters'
465
467
content :
@@ -469,6 +471,15 @@ paths:
469
471
example :
470
472
code : 404
471
473
message : ' Could not find entity by wallet name: testwalletxyz'
474
+ ' 409 ' :
475
+ description : ' The transfer cannot be processed due to some conflict'
476
+ content :
477
+ application/json :
478
+ schema :
479
+ $ref : ' #/components/schemas/errorResponse'
480
+ example :
481
+ code : 409
482
+ message : ' The token 89b071ee-c49d-420c-b43d-0d3dfe32396 is claimed, cannot be transfered'
472
483
' 415 ' :
473
484
$ref : ' #/components/responses/UnsupportedMediaTypeError'
474
485
' 422 ' :
@@ -567,8 +578,6 @@ paths:
567
578
example : 1
568
579
' 401 ' :
569
580
$ref : ' #/components/responses/UnauthorizedError'
570
- ' 403 ' :
571
- $ref : ' #/components/responses/ForbiddenError'
572
581
' 422 ' :
573
582
description : ' Invalid query parameters'
574
583
content :
@@ -600,8 +609,6 @@ paths:
600
609
$ref : ' #/components/schemas/transferItem'
601
610
' 401 ' :
602
611
$ref : ' #/components/responses/UnauthorizedError'
603
- ' 403 ' :
604
- $ref : ' #/components/responses/ForbiddenError'
605
612
' 404 ' :
606
613
description : ' No transfer found matching the transfer_id or the transfer is not associated with the logged in wallet'
607
614
content :
@@ -623,8 +630,8 @@ paths:
623
630
delete :
624
631
tags :
625
632
- Transfers
626
- summary : Cancel a pending or requested transfer that has not closed
627
- description : Cancel a pending (untrusted) or requested transfer. The executor can delete the pending/requested transfer before it is executed. Transfer is marked canceled by this command.
633
+ summary : ' Cancel a pending or requested transfer that has not closed'
634
+ description : ' Cancel a pending (untrusted) or requested transfer. The executor can delete the pending/requested transfer before it is executed. Transfer is marked canceled by this command.'
628
635
parameters :
629
636
- $ref : ' #/components/parameters/treetrackerApiKeyParam'
630
637
- name : transfer_id
@@ -638,8 +645,6 @@ paths:
638
645
$ref : ' #/components/responses/transferCancelledResponse'
639
646
' 401 ' :
640
647
$ref : ' #/components/responses/UnauthorizedError'
641
- ' 403 ' :
642
- $ref : ' #/components/responses/ForbiddenError'
643
648
' 404 ' :
644
649
description : ' No transfer found matching the transfer_id or the transfer is not associated with the logged in wallet'
645
650
content :
@@ -649,8 +654,15 @@ paths:
649
654
example :
650
655
code : 404
651
656
message : ' Can not found transfer by id:03537683-5356-42f4-97b2-95ba287a453b'
652
- ' 406 ' :
653
- description : ' Transfer with this id is not in requested or pending state'
657
+ ' 409 ' :
658
+ description : ' Transfer could not be cancelled due to some conflict'
659
+ content :
660
+ application/json :
661
+ schema :
662
+ $ref : ' #/components/schemas/errorResponse'
663
+ example :
664
+ code : 409
665
+ message : ' The transfer state is neither pending nor requested'
654
666
' /transfers/{transfer_id}/tokens ' :
655
667
get :
656
668
tags :
@@ -699,8 +711,6 @@ paths:
699
711
$ref : ' #/components/schemas/transferTokenItem'
700
712
' 401 ' :
701
713
$ref : ' #/components/responses/UnauthorizedError'
702
- ' 403 ' :
703
- $ref : ' #/components/responses/ForbiddenError'
704
714
' 404 ' :
705
715
description : ' No transfer found matching the transfer_id or the transfer is not associated with the logged in wallet'
706
716
content :
@@ -739,7 +749,14 @@ paths:
739
749
' 401 ' :
740
750
$ref : ' #/components/responses/UnauthorizedError'
741
751
' 403 ' :
742
- $ref : ' #/components/responses/ForbiddenError'
752
+ description : ' Lacking permission to accept the transfer'
753
+ content :
754
+ application/json :
755
+ schema :
756
+ $ref : ' #/components/schemas/errorResponse'
757
+ example :
758
+ code : 403
759
+ message : ' Current account has no permission to accept this transfer'
743
760
' 404 ' :
744
761
description : ' No transfer found matching the transfer_id or the transfer is not associated with the logged in wallet'
745
762
content :
@@ -749,6 +766,15 @@ paths:
749
766
example :
750
767
code : 404
751
768
message : ' Can not found transfer by id:df80b648-4fef-4ca6-b704-9e7e1c77d1ef'
769
+ ' 409 ' :
770
+ description : ' Transfer could not be processed due to some conflict'
771
+ content :
772
+ application/json :
773
+ schema :
774
+ $ref : ' #/components/schemas/errorResponse'
775
+ example :
776
+ code : 409
777
+ message : ' Do not have enough tokens'
752
778
' 415 ' :
753
779
$ref : ' #/components/responses/UnsupportedMediaTypeError'
754
780
' 422 ' :
@@ -780,7 +806,14 @@ paths:
780
806
' 401 ' :
781
807
$ref : ' #/components/responses/UnauthorizedError'
782
808
' 403 ' :
783
- $ref : ' #/components/responses/ForbiddenError'
809
+ description : ' Lacking permission to decline the transfer'
810
+ content :
811
+ application/json :
812
+ schema :
813
+ $ref : ' #/components/schemas/errorResponse'
814
+ example :
815
+ code : 403
816
+ message : ' Current account has no permission to decline this transfer'
784
817
' 404 ' :
785
818
description : ' No transfer found matching the transfer_id or the transfer is not associated with the logged in wallet'
786
819
content :
@@ -790,6 +823,15 @@ paths:
790
823
example :
791
824
code : 404
792
825
message : ' Can not found transfer by id:df80b648-4fef-4ca6-b704-9e7e1c77d1ef'
826
+ ' 409 ' :
827
+ description : ' Transfer could not be processed due to some conflict'
828
+ content :
829
+ application/json :
830
+ schema :
831
+ $ref : ' #/components/schemas/errorResponse'
832
+ example :
833
+ code : 409
834
+ message : ' The transfer state is neither pending nor requested'
793
835
' 415 ' :
794
836
$ref : ' #/components/responses/UnsupportedMediaTypeError'
795
837
' 422 ' :
@@ -828,7 +870,14 @@ paths:
828
870
' 401 ' :
829
871
$ref : ' #/components/responses/UnauthorizedError'
830
872
' 403 ' :
831
- $ref : ' #/components/responses/ForbiddenError'
873
+ description : ' Lacking permission to fulfill the transfer'
874
+ content :
875
+ application/json :
876
+ schema :
877
+ $ref : ' #/components/schemas/errorResponse'
878
+ example :
879
+ code : 403
880
+ message : ' Current account has no permission to decline this transfer'
832
881
' 404 ' :
833
882
description : ' No transfer found matching the transfer_id or the transfer is not associated with the logged in wallet'
834
883
content :
@@ -838,6 +887,15 @@ paths:
838
887
example :
839
888
code : 404
840
889
message : ' Can not found transfer by id:df80b648-4fef-4ca6-b704-9e7e1c77d1ef'
890
+ ' 409 ' :
891
+ description : ' Transfer could not be processed due to some conflict'
892
+ content :
893
+ application/json :
894
+ schema :
895
+ $ref : ' #/components/schemas/errorResponse'
896
+ example :
897
+ code : 409
898
+ message : ' Operation forbidden, the transfer state is wron'
841
899
' 415 ' :
842
900
$ref : ' #/components/responses/UnsupportedMediaTypeError'
843
901
' 422 ' :
@@ -907,8 +965,6 @@ paths:
907
965
$ref : ' #/components/schemas/trustRelationshipsResponse'
908
966
' 401 ' :
909
967
$ref : ' #/components/responses/UnauthorizedError'
910
- ' 403 ' :
911
- $ref : ' #/components/responses/ForbiddenError'
912
968
' 422 ' :
913
969
description : ' Invalid query parameters'
914
970
content :
@@ -940,7 +996,14 @@ paths:
940
996
' 401 ' :
941
997
$ref : ' #/components/responses/UnauthorizedError'
942
998
' 403 ' :
943
- $ref : ' #/components/responses/ForbiddenError'
999
+ description : ' Lacking permission to create the trust relationship'
1000
+ content :
1001
+ application/json :
1002
+ schema :
1003
+ $ref : ' #/components/schemas/errorResponse'
1004
+ example :
1005
+ code : 403
1006
+ message : ' Have no permission to deal with this actor'
944
1007
' 415 ' :
945
1008
$ref : ' #/components/responses/UnsupportedMediaTypeError'
946
1009
' 422 ' :
@@ -975,8 +1038,6 @@ paths:
975
1038
$ref : ' #/components/schemas/trustRelationshipItem'
976
1039
' 401 ' :
977
1040
$ref : ' #/components/responses/UnauthorizedError'
978
- ' 403 ' :
979
- $ref : ' #/components/responses/ForbiddenError'
980
1041
' 404 ' :
981
1042
$ref : ' #/components/responses/trustRelationshipNotFound'
982
1043
' 422 ' :
@@ -1027,7 +1088,14 @@ paths:
1027
1088
' 401 ' :
1028
1089
$ref : ' #/components/responses/UnauthorizedError'
1029
1090
' 403 ' :
1030
- $ref : ' #/components/responses/ForbiddenError'
1091
+ description : ' Lacking permission to cancel the trust relationship'
1092
+ content :
1093
+ application/json :
1094
+ schema :
1095
+ $ref : ' #/components/schemas/errorResponse'
1096
+ example :
1097
+ code : 403
1098
+ message : ' Have no permission to cancel this relationship'
1031
1099
' 404 ' :
1032
1100
$ref : ' #/components/responses/trustRelationshipNotFound'
1033
1101
' 422 ' :
@@ -1077,8 +1145,6 @@ paths:
1077
1145
target_wallet : testWallet11
1078
1146
' 401 ' :
1079
1147
$ref : ' #/components/responses/UnauthorizedError'
1080
- ' 403 ' :
1081
- $ref : ' #/components/responses/ForbiddenError'
1082
1148
' 404 ' :
1083
1149
$ref : ' #/components/responses/trustRelationshipNotFound'
1084
1150
' 415 ' :
@@ -1130,8 +1196,6 @@ paths:
1130
1196
target_wallet : testWallet11
1131
1197
' 401 ' :
1132
1198
$ref : ' #/components/responses/UnauthorizedError'
1133
- ' 403 ' :
1134
- $ref : ' #/components/responses/ForbiddenError'
1135
1199
' 404 ' :
1136
1200
$ref : ' #/components/responses/trustRelationshipNotFound'
1137
1201
' 415 ' :
@@ -1683,23 +1747,20 @@ components:
1683
1747
type : string
1684
1748
responses :
1685
1749
UnauthorizedError :
1686
- description : API key is missing or invalid or missing
1687
- content :
1688
- application/json :
1689
- schema :
1690
- $ref : ' #/components/schemas/errorResponse'
1691
- example :
1692
- code : 401
1693
- message : ' Invalid access - no API key'
1694
- ForbiddenError :
1695
- description : ' Access bearer token is missing or invalid, or some permission is missing, etc.'
1750
+ description : ' API key and/or Bearer token is missing or invalid'
1696
1751
content :
1697
1752
application/json :
1698
1753
schema :
1699
1754
$ref : ' #/components/schemas/errorResponse'
1700
- example :
1701
- code : 403
1702
- message : ' ERROR: Authentication, no token supplied for protected path'
1755
+ examples :
1756
+ Invalid API Key :
1757
+ value :
1758
+ code : 401
1759
+ message : ' Invalid access - no API key'
1760
+ Invalid Bearer Token :
1761
+ value :
1762
+ code : 401
1763
+ message : ' ERROR: Authentication, no token supplied for protected path'
1703
1764
UnsupportedMediaTypeError :
1704
1765
description : Invalid content type
1705
1766
content :
0 commit comments