@centia-io/mcp-server 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,3122 @@
1
+ {
2
+ "openapi": "3.1.0",
3
+ "info": {
4
+ "title": "GC2 API",
5
+ "contact": {
6
+ "email": "mh@mapcentia.com"
7
+ },
8
+ "version": "1.0.0"
9
+ },
10
+ "paths": {
11
+ "/api/v4/call": {
12
+ "post": {
13
+ "tags": [
14
+ "Methods"
15
+ ],
16
+ "description": "Call a RPC method",
17
+ "operationId": "postCall",
18
+ "requestBody": {
19
+ "description": "RPC method call",
20
+ "required": true,
21
+ "content": {
22
+ "application/json": {
23
+ "schema": {
24
+ "$ref": "#/components/schemas/Call"
25
+ }
26
+ }
27
+ }
28
+ },
29
+ "responses": {
30
+ "200": {
31
+ "description": "OK",
32
+ "content": {
33
+ "application/json": {}
34
+ }
35
+ },
36
+ "400": {
37
+ "description": "Bad request"
38
+ }
39
+ }
40
+ }
41
+ },
42
+ "/api/v4/clients/{id}": {
43
+ "get": {
44
+ "tags": [
45
+ "Clients"
46
+ ],
47
+ "description": "Get client",
48
+ "operationId": "getClient",
49
+ "parameters": [
50
+ {
51
+ "name": "id",
52
+ "in": "path",
53
+ "description": "Id of client",
54
+ "required": false,
55
+ "example": "66f5005bd44c6"
56
+ }
57
+ ],
58
+ "responses": {
59
+ "200": {
60
+ "description": "Ok",
61
+ "content": {
62
+ "application/json": {
63
+ "schema": {
64
+ "allOf": [
65
+ {
66
+ "properties": {
67
+ "id": {
68
+ "description": "Client ID",
69
+ "type": "string",
70
+ "example": "66f5005bd44c6"
71
+ }
72
+ },
73
+ "type": "object"
74
+ },
75
+ {
76
+ "$ref": "#/components/schemas/Client"
77
+ }
78
+ ]
79
+ }
80
+ }
81
+ }
82
+ },
83
+ "404": {
84
+ "description": "Not found"
85
+ }
86
+ }
87
+ },
88
+ "delete": {
89
+ "tags": [
90
+ "Clients"
91
+ ],
92
+ "description": "Delete client",
93
+ "operationId": "deleteClient",
94
+ "parameters": [
95
+ {
96
+ "name": "id",
97
+ "in": "path",
98
+ "description": "Id of client",
99
+ "required": true,
100
+ "example": "66f5005bd44c6"
101
+ }
102
+ ],
103
+ "responses": {
104
+ "204": {
105
+ "description": "Client deleted"
106
+ },
107
+ "404": {
108
+ "description": "Not found"
109
+ }
110
+ }
111
+ },
112
+ "patch": {
113
+ "tags": [
114
+ "Clients"
115
+ ],
116
+ "description": "Update client",
117
+ "operationId": "patchClient",
118
+ "parameters": [
119
+ {
120
+ "name": "id",
121
+ "in": "path",
122
+ "description": "Id of client",
123
+ "required": true,
124
+ "example": "66f5005bd44c6"
125
+ }
126
+ ],
127
+ "requestBody": {
128
+ "description": "Properties to update. Partial update is allowed.",
129
+ "required": true,
130
+ "content": {
131
+ "application/json": {
132
+ "schema": {
133
+ "$ref": "#/components/schemas/Client"
134
+ }
135
+ }
136
+ }
137
+ },
138
+ "responses": {
139
+ "204": {
140
+ "description": "Client updated"
141
+ },
142
+ "400": {
143
+ "description": "Bad request"
144
+ },
145
+ "404": {
146
+ "description": "Not found"
147
+ }
148
+ }
149
+ }
150
+ },
151
+ "/api/v4/clients": {
152
+ "post": {
153
+ "tags": [
154
+ "Clients"
155
+ ],
156
+ "description": "Create a new client OAuth client",
157
+ "operationId": "postClient",
158
+ "requestBody": {
159
+ "description": "New client",
160
+ "required": true,
161
+ "content": {
162
+ "application/json": {
163
+ "schema": {
164
+ "$ref": "#/components/schemas/Client"
165
+ }
166
+ }
167
+ }
168
+ },
169
+ "responses": {
170
+ "201": {
171
+ "description": "Client created",
172
+ "content": {
173
+ "application/json": {
174
+ "schema": {
175
+ "required": [
176
+ "id",
177
+ "secret"
178
+ ],
179
+ "properties": {
180
+ "id": {
181
+ "type": "string",
182
+ "example": "66fd4ad4aa716"
183
+ },
184
+ "secret": {
185
+ "type": "string",
186
+ "example": "5a55bf524a8c9eed61a896878d1a26d1193b30d05715e9cc29aa4f004c4cd8e6"
187
+ }
188
+ },
189
+ "type": "object"
190
+ }
191
+ }
192
+ }
193
+ },
194
+ "400": {
195
+ "description": "Bad request"
196
+ }
197
+ }
198
+ }
199
+ },
200
+ "/api/v4/schemas/{schema}/tables/{table}/columns/{column}": {
201
+ "get": {
202
+ "tags": [
203
+ "Schema"
204
+ ],
205
+ "description": "Get column(s)",
206
+ "operationId": "getColumn",
207
+ "parameters": [
208
+ {
209
+ "name": "schema",
210
+ "in": "path",
211
+ "description": "Schema name",
212
+ "required": true,
213
+ "example": "my_schema"
214
+ },
215
+ {
216
+ "name": "table",
217
+ "in": "path",
218
+ "description": "Table name",
219
+ "required": true,
220
+ "example": "my_table"
221
+ },
222
+ {
223
+ "name": "column",
224
+ "in": "path",
225
+ "description": "Column names",
226
+ "required": false,
227
+ "example": "my_columns"
228
+ }
229
+ ],
230
+ "responses": {
231
+ "200": {
232
+ "description": "Ok",
233
+ "content": {
234
+ "application/json": {
235
+ "schema": {
236
+ "$ref": "#/components/schemas/Column"
237
+ }
238
+ }
239
+ }
240
+ },
241
+ "404": {
242
+ "description": "Not found"
243
+ }
244
+ }
245
+ },
246
+ "delete": {
247
+ "tags": [
248
+ "Schema"
249
+ ],
250
+ "description": "Delete column(s)",
251
+ "operationId": "deleteColumn",
252
+ "parameters": [
253
+ {
254
+ "name": "schema",
255
+ "in": "path",
256
+ "description": "Schema name",
257
+ "required": true,
258
+ "example": "my_schema"
259
+ },
260
+ {
261
+ "name": "table",
262
+ "in": "path",
263
+ "description": "Table name",
264
+ "required": true,
265
+ "example": "my_table"
266
+ },
267
+ {
268
+ "name": "column",
269
+ "in": "path",
270
+ "description": "Column names",
271
+ "required": true,
272
+ "example": "my_columns"
273
+ }
274
+ ],
275
+ "responses": {
276
+ "204": {
277
+ "description": "Column deleted"
278
+ },
279
+ "404": {
280
+ "description": "Not found"
281
+ }
282
+ }
283
+ }
284
+ },
285
+ "/api/v4/schemas/{schema}/tables/{table}/columns/": {
286
+ "post": {
287
+ "tags": [
288
+ "Schema"
289
+ ],
290
+ "description": "Create new column(s)",
291
+ "operationId": "postColumn",
292
+ "parameters": [
293
+ {
294
+ "name": "schema",
295
+ "in": "path",
296
+ "description": "Schema name",
297
+ "required": true,
298
+ "example": "my_schema"
299
+ },
300
+ {
301
+ "name": "table",
302
+ "in": "path",
303
+ "description": "Table name",
304
+ "required": true,
305
+ "example": "my_table"
306
+ }
307
+ ],
308
+ "requestBody": {
309
+ "description": "New column",
310
+ "required": true,
311
+ "content": {
312
+ "application/json": {
313
+ "schema": {
314
+ "$ref": "#/components/schemas/Column"
315
+ }
316
+ }
317
+ }
318
+ },
319
+ "responses": {
320
+ "201": {
321
+ "description": "Created"
322
+ },
323
+ "400": {
324
+ "description": "Bad request"
325
+ },
326
+ "404": {
327
+ "description": "Not found"
328
+ }
329
+ }
330
+ }
331
+ },
332
+ "/api/v4/schemas/{schema}/tables/{table}/columns/{column}/": {
333
+ "patch": {
334
+ "tags": [
335
+ "Schema"
336
+ ],
337
+ "description": "Update column(s)",
338
+ "operationId": "patchColumn",
339
+ "parameters": [
340
+ {
341
+ "name": "schema",
342
+ "in": "path",
343
+ "description": "Schema name",
344
+ "required": true,
345
+ "example": "my_schema"
346
+ },
347
+ {
348
+ "name": "table",
349
+ "in": "path",
350
+ "description": "Table name",
351
+ "required": true,
352
+ "example": "my_table"
353
+ },
354
+ {
355
+ "name": "column",
356
+ "in": "path",
357
+ "description": "Column names",
358
+ "required": true,
359
+ "example": "my_columns"
360
+ }
361
+ ],
362
+ "requestBody": {
363
+ "description": "Column",
364
+ "required": true,
365
+ "content": {
366
+ "application/json": {
367
+ "schema": {
368
+ "$ref": "#/components/schemas/Column"
369
+ }
370
+ }
371
+ }
372
+ },
373
+ "responses": {
374
+ "204": {
375
+ "description": "Column updated"
376
+ },
377
+ "400": {
378
+ "description": "Bad request"
379
+ },
380
+ "404": {
381
+ "description": "Not found"
382
+ }
383
+ }
384
+ }
385
+ },
386
+ "/api/v4/commit": {
387
+ "post": {
388
+ "tags": [
389
+ "Commit"
390
+ ],
391
+ "description": "Commit schema changes to Git and push to remote.",
392
+ "operationId": "postCommit",
393
+ "requestBody": {
394
+ "description": "New index",
395
+ "required": true,
396
+ "content": {
397
+ "application/json": {
398
+ "schema": {
399
+ "$ref": "#/components/schemas/Commit"
400
+ }
401
+ }
402
+ }
403
+ },
404
+ "responses": {
405
+ "200": {
406
+ "description": "Committed"
407
+ },
408
+ "400": {
409
+ "description": "Bad request"
410
+ }
411
+ }
412
+ }
413
+ },
414
+ "/api/v4/schemas/{schema}/tables/{table}/constraints/{constraint}": {
415
+ "get": {
416
+ "tags": [
417
+ "Schema"
418
+ ],
419
+ "description": "Get constraints",
420
+ "operationId": "getConstraint",
421
+ "parameters": [
422
+ {
423
+ "name": "schema",
424
+ "in": "path",
425
+ "description": "Schema name",
426
+ "required": true,
427
+ "example": "my_schema"
428
+ },
429
+ {
430
+ "name": "table",
431
+ "in": "path",
432
+ "description": "Table name",
433
+ "required": true,
434
+ "example": "my_table"
435
+ },
436
+ {
437
+ "name": "constraint",
438
+ "in": "path",
439
+ "description": "Constraint name(s)",
440
+ "required": false,
441
+ "example": "my_constraint"
442
+ }
443
+ ],
444
+ "responses": {
445
+ "200": {
446
+ "description": "Ok",
447
+ "content": {
448
+ "application/json": {
449
+ "schema": {
450
+ "$ref": "#/components/schemas/Constraint"
451
+ }
452
+ }
453
+ }
454
+ },
455
+ "404": {
456
+ "description": "Not found"
457
+ }
458
+ }
459
+ },
460
+ "post": {
461
+ "tags": [
462
+ "Schema"
463
+ ],
464
+ "description": "Get constraints",
465
+ "operationId": "postConstraint",
466
+ "parameters": [
467
+ {
468
+ "name": "schema",
469
+ "in": "path",
470
+ "description": "Schema name",
471
+ "required": true,
472
+ "example": "my_schema"
473
+ },
474
+ {
475
+ "name": "table",
476
+ "in": "path",
477
+ "description": "Table name",
478
+ "required": true,
479
+ "example": "my_table"
480
+ }
481
+ ],
482
+ "requestBody": {
483
+ "description": "New constraint",
484
+ "required": true,
485
+ "content": {
486
+ "application/json": {
487
+ "schema": {
488
+ "$ref": "#/components/schemas/Constraint"
489
+ }
490
+ }
491
+ }
492
+ },
493
+ "responses": {
494
+ "201": {
495
+ "description": "Created"
496
+ }
497
+ }
498
+ },
499
+ "delete": {
500
+ "tags": [
501
+ "Schema"
502
+ ],
503
+ "description": "Get constraint",
504
+ "operationId": "deleteConstraint",
505
+ "parameters": [
506
+ {
507
+ "name": "schema",
508
+ "in": "path",
509
+ "description": "Schema name",
510
+ "required": true,
511
+ "example": "my_schema"
512
+ },
513
+ {
514
+ "name": "table",
515
+ "in": "path",
516
+ "description": "Table name",
517
+ "required": true,
518
+ "example": "my_table"
519
+ },
520
+ {
521
+ "name": "constraint",
522
+ "in": "path",
523
+ "description": "Constraint name(s)",
524
+ "required": true,
525
+ "example": "my_constraint"
526
+ }
527
+ ],
528
+ "responses": {
529
+ "204": {
530
+ "description": "Column deleted"
531
+ },
532
+ "404": {
533
+ "description": "Not found"
534
+ }
535
+ }
536
+ }
537
+ },
538
+ "/api/v4/file/upload": {
539
+ "post": {
540
+ "tags": [
541
+ "File"
542
+ ],
543
+ "description": "Upload the file(s) using multipart/form-data to get them staged on the server.",
544
+ "operationId": "postFileUpload",
545
+ "requestBody": {
546
+ "content": {
547
+ "multipart/form-data": {
548
+ "schema": {
549
+ "properties": {
550
+ "filename": {
551
+ "type": "string",
552
+ "format": "binary",
553
+ "example": "file"
554
+ }
555
+ },
556
+ "type": "object"
557
+ }
558
+ }
559
+ }
560
+ },
561
+ "responses": {
562
+ "201": {
563
+ "description": "Created"
564
+ }
565
+ }
566
+ }
567
+ },
568
+ "/api/v4/file/process": {
569
+ "post": {
570
+ "tags": [
571
+ "File"
572
+ ],
573
+ "description": "Process the uploaded file into a target schema/table with desired options (dry-run, append, SRS, etc.).",
574
+ "operationId": "postFileProcess",
575
+ "requestBody": {
576
+ "description": "New table",
577
+ "required": true,
578
+ "content": {
579
+ "application/json": {
580
+ "schema": {
581
+ "$ref": "#/components/schemas/File"
582
+ }
583
+ }
584
+ }
585
+ },
586
+ "responses": {
587
+ "201": {
588
+ "description": "Created"
589
+ },
590
+ "404": {
591
+ "description": "Not found"
592
+ }
593
+ }
594
+ }
595
+ },
596
+ "/api/v4/rules/{id}": {
597
+ "get": {
598
+ "tags": [
599
+ "Rules"
600
+ ],
601
+ "description": "Get rule(s)",
602
+ "operationId": "getRule",
603
+ "parameters": [
604
+ {
605
+ "name": "id",
606
+ "in": "path",
607
+ "description": "Rule identifier",
608
+ "required": false,
609
+ "example": 2
610
+ }
611
+ ],
612
+ "responses": {
613
+ "200": {
614
+ "description": "Ok",
615
+ "content": {
616
+ "application/json": {
617
+ "schema": {
618
+ "$ref": "#/components/schemas/Rule"
619
+ }
620
+ }
621
+ }
622
+ },
623
+ "404": {
624
+ "description": "Not found"
625
+ }
626
+ }
627
+ },
628
+ "delete": {
629
+ "tags": [
630
+ "Rules"
631
+ ],
632
+ "description": "Delete rule(s)",
633
+ "operationId": "deleteRule",
634
+ "parameters": [
635
+ {
636
+ "name": "id",
637
+ "in": "path",
638
+ "description": "Id of rule",
639
+ "required": true,
640
+ "example": "2"
641
+ }
642
+ ],
643
+ "responses": {
644
+ "204": {
645
+ "description": "Rule deleted"
646
+ },
647
+ "404": {
648
+ "description": "Not found"
649
+ }
650
+ }
651
+ },
652
+ "patch": {
653
+ "tags": [
654
+ "Rules"
655
+ ],
656
+ "description": "Update rule(s)",
657
+ "operationId": "patchRule",
658
+ "parameters": [
659
+ {
660
+ "name": "id",
661
+ "in": "path",
662
+ "description": "Rule identifier",
663
+ "required": true,
664
+ "example": 2
665
+ }
666
+ ],
667
+ "requestBody": {
668
+ "description": "Update rule",
669
+ "required": true,
670
+ "content": {
671
+ "application/json": {
672
+ "schema": {
673
+ "$ref": "#/components/schemas/Rule"
674
+ }
675
+ }
676
+ }
677
+ },
678
+ "responses": {
679
+ "204": {
680
+ "description": "Rule updated"
681
+ },
682
+ "400": {
683
+ "description": "Bad request"
684
+ },
685
+ "404": {
686
+ "description": "Not found"
687
+ }
688
+ }
689
+ }
690
+ },
691
+ "/api/v4/rules": {
692
+ "post": {
693
+ "tags": [
694
+ "Rules"
695
+ ],
696
+ "description": "Create rule(s)",
697
+ "operationId": "postRule",
698
+ "requestBody": {
699
+ "description": "New rule",
700
+ "required": true,
701
+ "content": {
702
+ "application/json": {
703
+ "schema": {
704
+ "$ref": "#/components/schemas/Rule"
705
+ }
706
+ }
707
+ }
708
+ },
709
+ "responses": {
710
+ "201": {
711
+ "description": "Created"
712
+ },
713
+ "400": {
714
+ "description": "Bad request"
715
+ },
716
+ "404": {
717
+ "description": "Not found"
718
+ }
719
+ }
720
+ }
721
+ },
722
+ "/api/graphql/schema/{schema}": {
723
+ "post": {
724
+ "tags": [
725
+ "GraphQL"
726
+ ],
727
+ "summary": "GraphQL POST endpoint.\nAccepts a JSON body: { \"query\": string, \"variables\": object|null }",
728
+ "description": "Run GraphQL query/mutation",
729
+ "operationId": "postGraphQL",
730
+ "parameters": [
731
+ {
732
+ "name": "schema",
733
+ "in": "path",
734
+ "description": "Schema name",
735
+ "required": true,
736
+ "example": "my_schema"
737
+ }
738
+ ],
739
+ "requestBody": {
740
+ "description": "New rule",
741
+ "required": true,
742
+ "content": {
743
+ "application/json": {
744
+ "schema": {
745
+ "$ref": "#/components/schemas/GraphQL"
746
+ }
747
+ }
748
+ }
749
+ },
750
+ "responses": {
751
+ "200": {
752
+ "description": "Ok"
753
+ },
754
+ "400": {
755
+ "description": "Bad request"
756
+ },
757
+ "404": {
758
+ "description": "Not found"
759
+ }
760
+ }
761
+ }
762
+ },
763
+ "/api/v4/schemas/{schema}/tables/{table}/indices/{index}": {
764
+ "get": {
765
+ "tags": [
766
+ "Schema"
767
+ ],
768
+ "description": "Get index(s)",
769
+ "operationId": "getIndex",
770
+ "parameters": [
771
+ {
772
+ "name": "schema",
773
+ "in": "path",
774
+ "description": "Schema",
775
+ "required": true,
776
+ "example": "my_schema"
777
+ },
778
+ {
779
+ "name": "table",
780
+ "in": "path",
781
+ "description": "Table",
782
+ "required": true,
783
+ "example": "my_table"
784
+ },
785
+ {
786
+ "name": "index",
787
+ "in": "path",
788
+ "description": "Index",
789
+ "required": false,
790
+ "example": "my_index"
791
+ }
792
+ ],
793
+ "responses": {
794
+ "200": {
795
+ "description": "Ok",
796
+ "content": {
797
+ "application/json": {
798
+ "schema": {
799
+ "allOf": [
800
+ {
801
+ "properties": {
802
+ "unique": {
803
+ "description": "If the index has a unique constraint",
804
+ "type": "boolean",
805
+ "example": true
806
+ }
807
+ },
808
+ "type": "object"
809
+ },
810
+ {
811
+ "$ref": "#/components/schemas/Index"
812
+ }
813
+ ]
814
+ }
815
+ }
816
+ }
817
+ },
818
+ "404": {
819
+ "description": "Not found"
820
+ }
821
+ }
822
+ },
823
+ "delete": {
824
+ "tags": [
825
+ "Schema"
826
+ ],
827
+ "description": "Delete index(s)",
828
+ "operationId": "deleteIndex",
829
+ "parameters": [
830
+ {
831
+ "name": "schema",
832
+ "in": "path",
833
+ "description": "Name of schema",
834
+ "required": true,
835
+ "schema": {
836
+ "type": "string"
837
+ },
838
+ "example": "my_schema"
839
+ },
840
+ {
841
+ "name": "table",
842
+ "in": "path",
843
+ "description": "Name of table",
844
+ "required": true,
845
+ "schema": {
846
+ "type": "string"
847
+ },
848
+ "example": "my_table"
849
+ },
850
+ {
851
+ "name": "index",
852
+ "in": "path",
853
+ "description": "Index name(s)",
854
+ "required": true,
855
+ "example": "my_index"
856
+ }
857
+ ],
858
+ "responses": {
859
+ "204": {
860
+ "description": "Index deleted"
861
+ },
862
+ "404": {
863
+ "description": "Not found"
864
+ }
865
+ }
866
+ }
867
+ },
868
+ "/api/v4/schemas/{schema}/tables/{table}/indices": {
869
+ "post": {
870
+ "tags": [
871
+ "Schema"
872
+ ],
873
+ "description": "Create index(s)",
874
+ "operationId": "postIndex",
875
+ "parameters": [
876
+ {
877
+ "name": "schema",
878
+ "in": "path",
879
+ "description": "Name of schema",
880
+ "required": true,
881
+ "schema": {
882
+ "type": "string"
883
+ },
884
+ "example": "my_schema"
885
+ },
886
+ {
887
+ "name": "table",
888
+ "in": "path",
889
+ "description": "Name of table",
890
+ "required": true,
891
+ "schema": {
892
+ "type": "string"
893
+ },
894
+ "example": "my_table"
895
+ }
896
+ ],
897
+ "requestBody": {
898
+ "description": "New index",
899
+ "required": true,
900
+ "content": {
901
+ "application/json": {
902
+ "schema": {
903
+ "$ref": "#/components/schemas/Index"
904
+ }
905
+ }
906
+ }
907
+ },
908
+ "responses": {
909
+ "201": {
910
+ "description": "Created",
911
+ "links": {
912
+ "": {
913
+ "operationId": "getIndex"
914
+ }
915
+ }
916
+ },
917
+ "400": {
918
+ "description": "Bad request"
919
+ }
920
+ }
921
+ }
922
+ },
923
+ "/api/v4/methods/{method}": {
924
+ "get": {
925
+ "tags": [
926
+ "Methods"
927
+ ],
928
+ "description": "Get JSON-RPC method(s)",
929
+ "operationId": "getRpc",
930
+ "parameters": [
931
+ {
932
+ "name": "method",
933
+ "in": "path",
934
+ "description": "Identifier of RPC method",
935
+ "required": false,
936
+ "example": "myMethod"
937
+ }
938
+ ],
939
+ "responses": {
940
+ "200": {
941
+ "description": "Ok",
942
+ "content": {
943
+ "application/json": {
944
+ "schema": {
945
+ "$ref": "#/components/schemas/Method"
946
+ }
947
+ }
948
+ }
949
+ },
950
+ "404": {
951
+ "description": "Not found"
952
+ }
953
+ }
954
+ },
955
+ "patch": {
956
+ "tags": [
957
+ "Methods"
958
+ ],
959
+ "description": "Update JSON-RPC method(s)",
960
+ "operationId": "patchRpc",
961
+ "parameters": [
962
+ {
963
+ "name": "method",
964
+ "in": "path",
965
+ "description": "Method name",
966
+ "required": true,
967
+ "example": "66f5005bd44c6"
968
+ }
969
+ ],
970
+ "requestBody": {
971
+ "description": "RPC method to execute",
972
+ "required": true,
973
+ "content": {
974
+ "application/json": {
975
+ "schema": {
976
+ "$ref": "#/components/schemas/Method"
977
+ }
978
+ }
979
+ }
980
+ },
981
+ "responses": {
982
+ "204": {
983
+ "description": "Method updated"
984
+ },
985
+ "400": {
986
+ "description": "Bad request"
987
+ },
988
+ "404": {
989
+ "description": "Not found"
990
+ }
991
+ }
992
+ }
993
+ },
994
+ "/api/v4/methods": {
995
+ "post": {
996
+ "tags": [
997
+ "Methods"
998
+ ],
999
+ "description": "Create JSON-RPC method(s)",
1000
+ "operationId": "postRpc",
1001
+ "requestBody": {
1002
+ "description": "RPC method to create",
1003
+ "required": true,
1004
+ "content": {
1005
+ "application/json": {
1006
+ "schema": {
1007
+ "$ref": "#/components/schemas/Method"
1008
+ }
1009
+ }
1010
+ }
1011
+ },
1012
+ "responses": {
1013
+ "201": {
1014
+ "description": "Created",
1015
+ "content": {
1016
+ "application/json": {}
1017
+ }
1018
+ },
1019
+ "400": {
1020
+ "description": "Bad request"
1021
+ }
1022
+ }
1023
+ }
1024
+ },
1025
+ "/api/v4/methods/{id}": {
1026
+ "delete": {
1027
+ "tags": [
1028
+ "Methods"
1029
+ ],
1030
+ "description": "Delete JSON-RPC method(s)",
1031
+ "operationId": "deleteRpc",
1032
+ "parameters": [
1033
+ {
1034
+ "name": "id",
1035
+ "in": "path",
1036
+ "description": "Name of method",
1037
+ "required": true,
1038
+ "example": "myStatement"
1039
+ }
1040
+ ],
1041
+ "responses": {
1042
+ "204": {
1043
+ "description": "Method deleted"
1044
+ },
1045
+ "404": {
1046
+ "description": "Not found"
1047
+ }
1048
+ }
1049
+ }
1050
+ },
1051
+ "/api/v4/oauth": {
1052
+ "post": {
1053
+ "tags": [
1054
+ "OAuth"
1055
+ ],
1056
+ "description": "Create token",
1057
+ "operationId": "postOauth",
1058
+ "requestBody": {
1059
+ "description": "OAuth flow",
1060
+ "required": true,
1061
+ "content": {
1062
+ "application/json": {
1063
+ "schema": {
1064
+ "$ref": "#/components/schemas/OAuth"
1065
+ }
1066
+ }
1067
+ }
1068
+ },
1069
+ "responses": {
1070
+ "201": {
1071
+ "description": "Created",
1072
+ "content": {
1073
+ "application/json": {
1074
+ "schema": {
1075
+ "$ref": "#/components/schemas/OAuthResponse"
1076
+ }
1077
+ }
1078
+ }
1079
+ },
1080
+ "400": {
1081
+ "description": "Bad request"
1082
+ }
1083
+ }
1084
+ }
1085
+ },
1086
+ "/api/v4/oauth/device": {
1087
+ "post": {
1088
+ "tags": [
1089
+ "OAuth"
1090
+ ],
1091
+ "description": "Start device flow",
1092
+ "operationId": "postDevice",
1093
+ "requestBody": {
1094
+ "description": "OAuth device flow",
1095
+ "required": true,
1096
+ "content": {
1097
+ "application/json": {
1098
+ "schema": {
1099
+ "$ref": "#/components/schemas/OAuthDevice"
1100
+ }
1101
+ }
1102
+ }
1103
+ },
1104
+ "responses": {
1105
+ "201": {
1106
+ "description": "Created",
1107
+ "content": {
1108
+ "application/json": {
1109
+ "schema": {
1110
+ "$ref": "#/components/schemas/OAuthDeviceResponse"
1111
+ }
1112
+ }
1113
+ }
1114
+ },
1115
+ "400": {
1116
+ "description": "Bad request"
1117
+ }
1118
+ }
1119
+ }
1120
+ },
1121
+ "/api/v4/schemas/{schema}/tables/{table}/privileges": {
1122
+ "get": {
1123
+ "tags": [
1124
+ "Privileges"
1125
+ ],
1126
+ "description": "Get privileges",
1127
+ "operationId": "getPrivileges",
1128
+ "parameters": [
1129
+ {
1130
+ "name": "schema",
1131
+ "in": "path",
1132
+ "description": "Schema name",
1133
+ "required": true,
1134
+ "example": "my_schema"
1135
+ },
1136
+ {
1137
+ "name": "table",
1138
+ "in": "path",
1139
+ "description": "Table name",
1140
+ "required": true,
1141
+ "example": "my_table"
1142
+ }
1143
+ ],
1144
+ "responses": {
1145
+ "200": {
1146
+ "description": "Ok",
1147
+ "content": {
1148
+ "application/json": {
1149
+ "schema": {
1150
+ "$ref": "#/components/schemas/Privilege"
1151
+ }
1152
+ }
1153
+ }
1154
+ },
1155
+ "404": {
1156
+ "description": "Not found"
1157
+ }
1158
+ }
1159
+ },
1160
+ "patch": {
1161
+ "tags": [
1162
+ "Privileges"
1163
+ ],
1164
+ "description": "Update privileges",
1165
+ "operationId": "patchPrivileges",
1166
+ "parameters": [
1167
+ {
1168
+ "name": "schema",
1169
+ "in": "path",
1170
+ "description": "Schema name",
1171
+ "required": true,
1172
+ "example": "my_schema"
1173
+ },
1174
+ {
1175
+ "name": "table",
1176
+ "in": "path",
1177
+ "description": "Table name",
1178
+ "required": true,
1179
+ "example": "my_table"
1180
+ }
1181
+ ],
1182
+ "requestBody": {
1183
+ "description": "Privileges",
1184
+ "required": true,
1185
+ "content": {
1186
+ "application/json": {
1187
+ "schema": {
1188
+ "$ref": "#/components/schemas/Privilege"
1189
+ }
1190
+ }
1191
+ }
1192
+ },
1193
+ "responses": {
1194
+ "204": {
1195
+ "description": "Privileges updated"
1196
+ },
1197
+ "400": {
1198
+ "description": "Bad request"
1199
+ },
1200
+ "404": {
1201
+ "description": "Not found"
1202
+ }
1203
+ }
1204
+ }
1205
+ },
1206
+ "/api/v4/interfaces": {
1207
+ "get": {
1208
+ "tags": [
1209
+ "Methods"
1210
+ ],
1211
+ "description": "Get the interfaces for all RPC-JSON methods.",
1212
+ "operationId": "getTypeScript",
1213
+ "responses": {
1214
+ "200": {
1215
+ "description": "Ok",
1216
+ "content": {
1217
+ "text/plain": {}
1218
+ }
1219
+ }
1220
+ }
1221
+ }
1222
+ },
1223
+ "/api/v4/schemas/{schema}": {
1224
+ "get": {
1225
+ "tags": [
1226
+ "Schema"
1227
+ ],
1228
+ "description": "Get schema(s)",
1229
+ "operationId": "getSchema",
1230
+ "parameters": [
1231
+ {
1232
+ "name": "schema",
1233
+ "in": "path",
1234
+ "description": "Schema name",
1235
+ "required": false,
1236
+ "example": "my_schema"
1237
+ }
1238
+ ],
1239
+ "responses": {
1240
+ "200": {
1241
+ "description": "Ok",
1242
+ "content": {
1243
+ "application/json": {
1244
+ "schema": {
1245
+ "$ref": "#/components/schemas/Schema"
1246
+ }
1247
+ }
1248
+ },
1249
+ "links": {
1250
+ "getTableLink": {
1251
+ "operationId": "getTable",
1252
+ "parameters": {
1253
+ "schema": "$request.path.schema"
1254
+ },
1255
+ "description": "Link to tables in schema."
1256
+ }
1257
+ }
1258
+ },
1259
+ "400": {
1260
+ "description": "Bad request"
1261
+ },
1262
+ "404": {
1263
+ "description": "Not found"
1264
+ }
1265
+ }
1266
+ },
1267
+ "delete": {
1268
+ "tags": [
1269
+ "Schema"
1270
+ ],
1271
+ "description": "Delete schema(s)",
1272
+ "operationId": "deleteSchema",
1273
+ "parameters": [
1274
+ {
1275
+ "name": "schema",
1276
+ "in": "path",
1277
+ "description": "Schema name",
1278
+ "required": true,
1279
+ "example": "my_schema"
1280
+ }
1281
+ ],
1282
+ "responses": {
1283
+ "204": {
1284
+ "description": "Schema deleted"
1285
+ },
1286
+ "400": {
1287
+ "description": "Bad request"
1288
+ },
1289
+ "404": {
1290
+ "description": "Not found"
1291
+ }
1292
+ }
1293
+ },
1294
+ "patch": {
1295
+ "tags": [
1296
+ "Schema"
1297
+ ],
1298
+ "description": "Rename a schema",
1299
+ "operationId": "patchSchema",
1300
+ "parameters": [
1301
+ {
1302
+ "name": "schema",
1303
+ "in": "path",
1304
+ "description": "Schema name",
1305
+ "required": false,
1306
+ "example": "my_schema"
1307
+ }
1308
+ ],
1309
+ "requestBody": {
1310
+ "description": "Rename schema",
1311
+ "required": true,
1312
+ "content": {
1313
+ "application/json": {
1314
+ "schema": {
1315
+ "allOf": [
1316
+ {
1317
+ "required": [
1318
+ "name"
1319
+ ],
1320
+ "properties": {
1321
+ "name": {
1322
+ "description": "New name of schema",
1323
+ "type": "string",
1324
+ "example": "my_schema_with_new_name"
1325
+ }
1326
+ },
1327
+ "type": "object"
1328
+ }
1329
+ ]
1330
+ }
1331
+ }
1332
+ }
1333
+ },
1334
+ "responses": {
1335
+ "201": {
1336
+ "description": "Created"
1337
+ },
1338
+ "400": {
1339
+ "description": "Bad request"
1340
+ },
1341
+ "404": {
1342
+ "description": "Not found"
1343
+ }
1344
+ }
1345
+ }
1346
+ },
1347
+ "/api/v4/schemas": {
1348
+ "post": {
1349
+ "tags": [
1350
+ "Schema"
1351
+ ],
1352
+ "description": "Create schema(s)",
1353
+ "operationId": "postSchema",
1354
+ "requestBody": {
1355
+ "description": "New schema",
1356
+ "required": true,
1357
+ "content": {
1358
+ "application/json": {
1359
+ "schema": {
1360
+ "$ref": "#/components/schemas/Schema"
1361
+ }
1362
+ }
1363
+ }
1364
+ },
1365
+ "responses": {
1366
+ "201": {
1367
+ "description": "Created"
1368
+ },
1369
+ "400": {
1370
+ "description": "Bad request"
1371
+ }
1372
+ }
1373
+ }
1374
+ },
1375
+ "/api/v4/schemas/{schema}/sequences/{sequence}": {
1376
+ "get": {
1377
+ "tags": [
1378
+ "Schema"
1379
+ ],
1380
+ "description": "Get sequence(s)",
1381
+ "operationId": "getSequence",
1382
+ "parameters": [
1383
+ {
1384
+ "name": "schema",
1385
+ "in": "path",
1386
+ "description": "Schema name",
1387
+ "required": true,
1388
+ "example": "my_schema"
1389
+ },
1390
+ {
1391
+ "name": "sequence",
1392
+ "in": "path",
1393
+ "description": "Sequence names",
1394
+ "required": false,
1395
+ "example": "my_sequences"
1396
+ }
1397
+ ],
1398
+ "responses": {
1399
+ "200": {
1400
+ "description": "Ok",
1401
+ "content": {
1402
+ "application/json": {
1403
+ "schema": {
1404
+ "$ref": "#/components/schemas/Sequence"
1405
+ }
1406
+ }
1407
+ }
1408
+ },
1409
+ "404": {
1410
+ "description": "Not found"
1411
+ }
1412
+ }
1413
+ },
1414
+ "delete": {
1415
+ "tags": [
1416
+ "Schema"
1417
+ ],
1418
+ "description": "Delete sequence(s)",
1419
+ "operationId": "deleteSequence",
1420
+ "parameters": [
1421
+ {
1422
+ "name": "schema",
1423
+ "in": "path",
1424
+ "description": "Schema name",
1425
+ "required": true,
1426
+ "example": "my_schema"
1427
+ },
1428
+ {
1429
+ "name": "sequence",
1430
+ "in": "path",
1431
+ "description": "Sequence names",
1432
+ "required": true,
1433
+ "example": "my_sequences"
1434
+ }
1435
+ ],
1436
+ "responses": {
1437
+ "204": {
1438
+ "description": "Sequence deleted"
1439
+ },
1440
+ "404": {
1441
+ "description": "Not found"
1442
+ }
1443
+ }
1444
+ },
1445
+ "patch": {
1446
+ "tags": [
1447
+ "Schema"
1448
+ ],
1449
+ "description": "Update sequence(s)",
1450
+ "operationId": "patchSequence",
1451
+ "parameters": [
1452
+ {
1453
+ "name": "schema",
1454
+ "in": "path",
1455
+ "description": "Schema name",
1456
+ "required": true,
1457
+ "example": "my_schema"
1458
+ },
1459
+ {
1460
+ "name": "sequence",
1461
+ "in": "path",
1462
+ "description": "Sequence names",
1463
+ "required": true,
1464
+ "example": "my_sequences"
1465
+ }
1466
+ ],
1467
+ "requestBody": {
1468
+ "description": "Sequence",
1469
+ "required": true,
1470
+ "content": {
1471
+ "application/json": {
1472
+ "schema": {
1473
+ "$ref": "#/components/schemas/Sequence"
1474
+ }
1475
+ }
1476
+ }
1477
+ },
1478
+ "responses": {
1479
+ "204": {
1480
+ "description": "Sequence updated"
1481
+ },
1482
+ "400": {
1483
+ "description": "Bad request"
1484
+ },
1485
+ "404": {
1486
+ "description": "Not found"
1487
+ }
1488
+ }
1489
+ }
1490
+ },
1491
+ "/api/v4/schemas/{schema}/sequences/": {
1492
+ "post": {
1493
+ "tags": [
1494
+ "Schema"
1495
+ ],
1496
+ "description": "Create sequence(s)",
1497
+ "operationId": "postSequence",
1498
+ "parameters": [
1499
+ {
1500
+ "name": "schema",
1501
+ "in": "path",
1502
+ "description": "Schema name",
1503
+ "required": true,
1504
+ "example": "my_schema"
1505
+ }
1506
+ ],
1507
+ "requestBody": {
1508
+ "description": "New sequence",
1509
+ "required": true,
1510
+ "content": {
1511
+ "application/json": {
1512
+ "schema": {
1513
+ "$ref": "#/components/schemas/Sequence"
1514
+ }
1515
+ }
1516
+ }
1517
+ },
1518
+ "responses": {
1519
+ "201": {
1520
+ "description": "Created"
1521
+ },
1522
+ "400": {
1523
+ "description": "Bad request"
1524
+ },
1525
+ "404": {
1526
+ "description": "Not found"
1527
+ }
1528
+ }
1529
+ }
1530
+ },
1531
+ "/api/v4/sql": {
1532
+ "post": {
1533
+ "tags": [
1534
+ "Sql"
1535
+ ],
1536
+ "description": "Execute SQL statements",
1537
+ "operationId": "postSql",
1538
+ "requestBody": {
1539
+ "description": "Sql statement to execute",
1540
+ "required": true,
1541
+ "content": {
1542
+ "application/json": {
1543
+ "schema": {
1544
+ "$ref": "#/components/schemas/Sql"
1545
+ }
1546
+ }
1547
+ }
1548
+ },
1549
+ "responses": {
1550
+ "200": {
1551
+ "description": "Ok",
1552
+ "content": {
1553
+ "application/json": {}
1554
+ }
1555
+ },
1556
+ "500": {
1557
+ "description": "Internal error. Most like an SQL error."
1558
+ }
1559
+ }
1560
+ }
1561
+ },
1562
+ "/api/v4/sql/database/{database}": {
1563
+ "post": {
1564
+ "tags": [
1565
+ "Sql"
1566
+ ],
1567
+ "description": "Run SQL statements without token",
1568
+ "operationId": "postSqlNoToken",
1569
+ "parameters": [
1570
+ {
1571
+ "name": "database",
1572
+ "in": "path",
1573
+ "description": "Database to use",
1574
+ "required": false,
1575
+ "example": "mydb"
1576
+ }
1577
+ ],
1578
+ "requestBody": {
1579
+ "description": "Sql statement to run",
1580
+ "required": true,
1581
+ "content": {
1582
+ "application/json": {
1583
+ "schema": {
1584
+ "$ref": "#/components/schemas/Sql"
1585
+ }
1586
+ }
1587
+ }
1588
+ },
1589
+ "responses": {
1590
+ "200": {
1591
+ "description": "Ok",
1592
+ "content": {
1593
+ "application/json": {}
1594
+ }
1595
+ },
1596
+ "500": {
1597
+ "description": "Internal error. Most like an SQL error."
1598
+ }
1599
+ }
1600
+ }
1601
+ },
1602
+ "/api/v4/stats": {
1603
+ "get": {
1604
+ "tags": [
1605
+ "Stats"
1606
+ ],
1607
+ "description": "Get statistics",
1608
+ "operationId": "getStats",
1609
+ "responses": {
1610
+ "200": {
1611
+ "description": "Ok",
1612
+ "content": {
1613
+ "application/json": {
1614
+ "schema": {
1615
+ "$ref": "#/components/schemas/Stats"
1616
+ }
1617
+ }
1618
+ }
1619
+ },
1620
+ "404": {
1621
+ "description": "Not found"
1622
+ }
1623
+ }
1624
+ }
1625
+ },
1626
+ "/api/v4/schemas/{schema}/tables/{table}": {
1627
+ "get": {
1628
+ "tags": [
1629
+ "Schema"
1630
+ ],
1631
+ "description": "Get table(s)",
1632
+ "operationId": "getTable",
1633
+ "parameters": [
1634
+ {
1635
+ "name": "schema",
1636
+ "in": "path",
1637
+ "description": "Schema name",
1638
+ "required": true,
1639
+ "example": "my_schema"
1640
+ },
1641
+ {
1642
+ "name": "table",
1643
+ "in": "path",
1644
+ "description": "Table name",
1645
+ "required": false,
1646
+ "example": "my_table"
1647
+ }
1648
+ ],
1649
+ "responses": {
1650
+ "200": {
1651
+ "description": "Ok",
1652
+ "content": {
1653
+ "application/json": {
1654
+ "schema": {
1655
+ "$ref": "#/components/schemas/Table"
1656
+ }
1657
+ }
1658
+ },
1659
+ "links": {
1660
+ "getColumn": {
1661
+ "operationId": "getColumn",
1662
+ "parameters": {
1663
+ "schema": "$request.path.schema",
1664
+ "table ": "$request.path.table"
1665
+ },
1666
+ "description": "Link to columns."
1667
+ },
1668
+ "getConstraint": {
1669
+ "operationId": "getConstraint",
1670
+ "parameters": {
1671
+ "schema": "$request.path.schema",
1672
+ "table ": "$request.path.table"
1673
+ },
1674
+ "description": "Link to constraints."
1675
+ },
1676
+ "getIndex": {
1677
+ "operationId": "getIndex",
1678
+ "parameters": {
1679
+ "schema": "$request.path.schema",
1680
+ "table ": "$request.path.table"
1681
+ },
1682
+ "description": "Link to indices."
1683
+ },
1684
+ "getPrivileges": {
1685
+ "operationId": "getPrivileges",
1686
+ "parameters": {
1687
+ "schema": "$request.path.schema",
1688
+ "table ": "$request.path.table"
1689
+ },
1690
+ "description": "Link to privileges."
1691
+ }
1692
+ }
1693
+ },
1694
+ "400": {
1695
+ "description": "Bad request"
1696
+ },
1697
+ "404": {
1698
+ "description": "Not found"
1699
+ }
1700
+ }
1701
+ },
1702
+ "delete": {
1703
+ "tags": [
1704
+ "Schema"
1705
+ ],
1706
+ "description": "Delete table",
1707
+ "operationId": "deleteTable",
1708
+ "parameters": [
1709
+ {
1710
+ "name": "schema",
1711
+ "in": "path",
1712
+ "description": "Schema name",
1713
+ "required": true,
1714
+ "example": "my_schema"
1715
+ },
1716
+ {
1717
+ "name": "table",
1718
+ "in": "path",
1719
+ "description": "Table name",
1720
+ "required": true,
1721
+ "example": "my_table"
1722
+ }
1723
+ ],
1724
+ "responses": {
1725
+ "204": {
1726
+ "description": "Table deleted"
1727
+ },
1728
+ "400": {
1729
+ "description": "Bad request"
1730
+ },
1731
+ "404": {
1732
+ "description": "Not found"
1733
+ }
1734
+ }
1735
+ },
1736
+ "patch": {
1737
+ "tags": [
1738
+ "Schema"
1739
+ ],
1740
+ "description": "Rename and move table(s)",
1741
+ "operationId": "patchTable",
1742
+ "parameters": [
1743
+ {
1744
+ "name": "schema",
1745
+ "in": "path",
1746
+ "description": "Schema name",
1747
+ "required": true,
1748
+ "example": "my_schema"
1749
+ },
1750
+ {
1751
+ "name": "table",
1752
+ "in": "path",
1753
+ "description": "Table name",
1754
+ "required": true,
1755
+ "example": "my_table"
1756
+ }
1757
+ ],
1758
+ "requestBody": {
1759
+ "description": "Updated table",
1760
+ "required": true,
1761
+ "content": {
1762
+ "application/json": {
1763
+ "schema": {
1764
+ "allOf": [
1765
+ {
1766
+ "properties": {
1767
+ "name": {
1768
+ "description": "New name of table",
1769
+ "type": "string",
1770
+ "example": "my_table_with_new_name"
1771
+ },
1772
+ "schema": {
1773
+ "description": "Move table to schema",
1774
+ "type": "string",
1775
+ "example": "my_other_schema"
1776
+ }
1777
+ },
1778
+ "type": "object"
1779
+ }
1780
+ ]
1781
+ }
1782
+ }
1783
+ }
1784
+ },
1785
+ "responses": {
1786
+ "204": {
1787
+ "description": "Table updated"
1788
+ },
1789
+ "400": {
1790
+ "description": "Bad request"
1791
+ },
1792
+ "404": {
1793
+ "description": "Not found"
1794
+ }
1795
+ }
1796
+ }
1797
+ },
1798
+ "/api/v4/schemas/{schema}/tables": {
1799
+ "post": {
1800
+ "tags": [
1801
+ "Schema"
1802
+ ],
1803
+ "description": "Create table(s)",
1804
+ "operationId": "postTable",
1805
+ "parameters": [
1806
+ {
1807
+ "name": "name",
1808
+ "in": "path",
1809
+ "description": "Schema name",
1810
+ "required": true,
1811
+ "example": "my_schema"
1812
+ }
1813
+ ],
1814
+ "requestBody": {
1815
+ "description": "New table",
1816
+ "required": true,
1817
+ "content": {
1818
+ "application/json": {
1819
+ "schema": {
1820
+ "$ref": "#/components/schemas/Table"
1821
+ }
1822
+ }
1823
+ }
1824
+ },
1825
+ "responses": {
1826
+ "201": {
1827
+ "description": "Created"
1828
+ },
1829
+ "400": {
1830
+ "description": "Bad request"
1831
+ }
1832
+ }
1833
+ }
1834
+ },
1835
+ "/api/v4/user/{name}": {
1836
+ "get": {
1837
+ "tags": [
1838
+ "Users"
1839
+ ],
1840
+ "description": "Get rules",
1841
+ "operationId": "getUser",
1842
+ "parameters": [
1843
+ {
1844
+ "name": "name",
1845
+ "in": "path",
1846
+ "description": "User identifier",
1847
+ "required": false,
1848
+ "example": "joe"
1849
+ }
1850
+ ],
1851
+ "responses": {
1852
+ "200": {
1853
+ "description": "Ok",
1854
+ "content": {
1855
+ "application/json": {
1856
+ "schema": {
1857
+ "$ref": "#/components/schemas/User"
1858
+ }
1859
+ }
1860
+ }
1861
+ },
1862
+ "404": {
1863
+ "description": "Not found"
1864
+ }
1865
+ }
1866
+ }
1867
+ },
1868
+ "/api/v4/users": {
1869
+ "post": {
1870
+ "tags": [
1871
+ "Users"
1872
+ ],
1873
+ "description": "New user",
1874
+ "operationId": "postUser",
1875
+ "requestBody": {
1876
+ "description": "New user",
1877
+ "required": true,
1878
+ "content": {
1879
+ "application/json": {
1880
+ "schema": {
1881
+ "$ref": "#/components/schemas/User"
1882
+ }
1883
+ }
1884
+ }
1885
+ },
1886
+ "responses": {
1887
+ "201": {
1888
+ "description": "Created"
1889
+ },
1890
+ "400": {
1891
+ "description": "Bad request"
1892
+ },
1893
+ "404": {
1894
+ "description": "Not found"
1895
+ }
1896
+ }
1897
+ }
1898
+ },
1899
+ "/api/v4/users/{name}": {
1900
+ "delete": {
1901
+ "tags": [
1902
+ "Users"
1903
+ ],
1904
+ "description": "Delete user",
1905
+ "operationId": "deleteUsers",
1906
+ "parameters": [
1907
+ {
1908
+ "name": "name",
1909
+ "in": "path",
1910
+ "description": "User identifier",
1911
+ "required": true,
1912
+ "example": "joe"
1913
+ }
1914
+ ],
1915
+ "responses": {
1916
+ "204": {
1917
+ "description": "User deleted"
1918
+ },
1919
+ "404": {
1920
+ "description": "Not found"
1921
+ }
1922
+ }
1923
+ },
1924
+ "patch": {
1925
+ "tags": [
1926
+ "Users"
1927
+ ],
1928
+ "description": "Update user",
1929
+ "operationId": "patchUser",
1930
+ "parameters": [
1931
+ {
1932
+ "name": "name",
1933
+ "in": "path",
1934
+ "description": "User identifier",
1935
+ "required": true,
1936
+ "example": "joe"
1937
+ }
1938
+ ],
1939
+ "requestBody": {
1940
+ "description": "User",
1941
+ "required": true,
1942
+ "content": {
1943
+ "application/json": {
1944
+ "schema": {
1945
+ "$ref": "#/components/schemas/User"
1946
+ }
1947
+ }
1948
+ }
1949
+ },
1950
+ "responses": {
1951
+ "204": {
1952
+ "description": "Rule updated"
1953
+ },
1954
+ "400": {
1955
+ "description": "Bad request"
1956
+ },
1957
+ "404": {
1958
+ "description": "Not found"
1959
+ }
1960
+ }
1961
+ }
1962
+ }
1963
+ },
1964
+ "components": {
1965
+ "schemas": {
1966
+ "Call": {
1967
+ "description": "JSON-RPC is a stateless, lightweight remote procedure call (RPC) protocol that uses JSON for data interchange. Defined by the JSON-RPC 2.0 specification, it enables clients to invoke methods on a server by sending JSON-formatted requests and receiving JSON-formatted responses, with support for batch calls, notifications, and standardized error handling.",
1968
+ "required": [
1969
+ "jsonrpc",
1970
+ "method"
1971
+ ],
1972
+ "properties": {
1973
+ "jsonrpc": {
1974
+ "title": "JSON RPC version",
1975
+ "description": "The version number of the JSON-RPC protocol. Must be exactly \"2.0\".",
1976
+ "type": "string",
1977
+ "enum": [
1978
+ "2.0"
1979
+ ],
1980
+ "example": "2.0"
1981
+ },
1982
+ "id": {
1983
+ "title": "Identifier",
1984
+ "description": "An identifier established by the Client that MUST contain a string if included",
1985
+ "type": "string",
1986
+ "example": "1"
1987
+ },
1988
+ "method": {
1989
+ "title": "Method name",
1990
+ "description": "A String containing the name of the method to be invoked or created",
1991
+ "type": "string",
1992
+ "example": "getDate"
1993
+ },
1994
+ "params": {
1995
+ "title": "Parameters",
1996
+ "description": "Parameters for method.",
1997
+ "type": "array",
1998
+ "items": {
1999
+ "type": "object"
2000
+ },
2001
+ "example": {
2002
+ "my_date": "2011 04 01"
2003
+ }
2004
+ }
2005
+ },
2006
+ "type": "object"
2007
+ },
2008
+ "Client": {
2009
+ "description": "OAuth clients are applications that request and manage access to user resources through the OAuth authorization protocol. These clients act as intermediaries, enabling secure, delegated access to user accounts without directly handling sensitive credentials.",
2010
+ "required": [
2011
+ "name",
2012
+ "redirect_uri"
2013
+ ],
2014
+ "properties": {
2015
+ "id": {
2016
+ "title": "Client id",
2017
+ "description": "Id of client, which identify the client.",
2018
+ "type": "string",
2019
+ "example": "my_client_id"
2020
+ },
2021
+ "name": {
2022
+ "title": "Name",
2023
+ "description": "Name of client. Can help identify the client.",
2024
+ "type": "string",
2025
+ "example": "My Application"
2026
+ },
2027
+ "homepage": {
2028
+ "title": "Homepage",
2029
+ "description": "The homepage (or web-app), which starts the code flow.",
2030
+ "type": "string",
2031
+ "format": "uri",
2032
+ "example": "https://mapcentia.com"
2033
+ },
2034
+ "description": {
2035
+ "title": "Description",
2036
+ "description": "A longer description of the client, which can help identify the client.",
2037
+ "type": [
2038
+ "string",
2039
+ "null"
2040
+ ],
2041
+ "example": null
2042
+ },
2043
+ "redirect_uri": {
2044
+ "title": "Redirect URIs.",
2045
+ "description": "The URIs the auth server is allowed to redirect back to.",
2046
+ "type": "array",
2047
+ "items": {
2048
+ "type": "string"
2049
+ },
2050
+ "example": [
2051
+ "https://my_site1.com",
2052
+ "https://my_site2.com"
2053
+ ]
2054
+ },
2055
+ "public": {
2056
+ "title": "Public",
2057
+ "description": "Public clients do not require a secret.",
2058
+ "type": "boolean",
2059
+ "default": false,
2060
+ "example": true
2061
+ },
2062
+ "confirm": {
2063
+ "title": "Confirm",
2064
+ "description": "Users must confirm client access.",
2065
+ "type": "boolean",
2066
+ "default": true,
2067
+ "example": true
2068
+ },
2069
+ "two_factor": {
2070
+ "title": "Two factor authentication",
2071
+ "description": "Users must log in with two factor authentication.",
2072
+ "type": "boolean",
2073
+ "default": true,
2074
+ "example": true
2075
+ },
2076
+ "allow_signup": {
2077
+ "title": "Allow users to sign up",
2078
+ "description": "Users can sign up for a new account in the web-dialog.",
2079
+ "type": "boolean",
2080
+ "default": false,
2081
+ "example": true
2082
+ },
2083
+ "social_signup": {
2084
+ "title": "Enable social signup",
2085
+ "description": "Users can sign up for a new account with social login.",
2086
+ "type": "boolean",
2087
+ "default": false,
2088
+ "example": true
2089
+ }
2090
+ },
2091
+ "type": "object"
2092
+ },
2093
+ "Column": {
2094
+ "description": "Each column has a data type. The data type constrains the set of possible values that can be assigned to a column and assigns semantics to the data stored in the column so that it can be used for computations. For instance, a column declared to be of a numerical type will not accept arbitrary text strings, and the data stored in such a column can be used for mathematical computations. By contrast, a column declared to be of a character string type will accept almost any kind of data but it does not lend itself to mathematical calculations, although other operations such as string concatenation are available.",
2095
+ "required": [],
2096
+ "properties": {
2097
+ "name": {
2098
+ "title": "Name",
2099
+ "description": "Name of the column.",
2100
+ "type": "string",
2101
+ "example": "my-column"
2102
+ },
2103
+ "type": {
2104
+ "title": "Type",
2105
+ "description": "The type of the column, like varchar, integer, boolean etc.",
2106
+ "type": "string",
2107
+ "example": "int"
2108
+ },
2109
+ "is_nullable": {
2110
+ "title": "Is nullable",
2111
+ "description": "If true the column can be set to null.",
2112
+ "type": "boolean",
2113
+ "default": "true",
2114
+ "example": "false"
2115
+ },
2116
+ "default_value": {
2117
+ "title": "Default value",
2118
+ "description": "The column is set to the default value if no value is given.",
2119
+ "type": "string",
2120
+ "example": "my-value"
2121
+ },
2122
+ "identity_generation": {
2123
+ "title": "Identity generation of the column",
2124
+ "description": "An identity column is a special column that is generated automatically from an implicit sequence. It can be used to generate key values.",
2125
+ "type": "string",
2126
+ "enum": [
2127
+ "always",
2128
+ "by default"
2129
+ ],
2130
+ "example": "always"
2131
+ }
2132
+ },
2133
+ "type": "object"
2134
+ },
2135
+ "Commit": {
2136
+ "description": "Schema commit.",
2137
+ "required": [
2138
+ "schema",
2139
+ "repo",
2140
+ "message"
2141
+ ],
2142
+ "properties": {
2143
+ "schema": {
2144
+ "title": "Schema",
2145
+ "description": "Schema to commit",
2146
+ "type": "string",
2147
+ "example": "myschema"
2148
+ },
2149
+ "repo": {
2150
+ "title": "Repository",
2151
+ "description": "An Git repository URL with credentials.",
2152
+ "type": "string",
2153
+ "example": "https://user:password@github.com/path/repo.git"
2154
+ },
2155
+ "message": {
2156
+ "title": "Commit message",
2157
+ "description": "The commit message.",
2158
+ "type": "string",
2159
+ "example": "My first commit"
2160
+ },
2161
+ "meta_query": {
2162
+ "title": "Meta query string",
2163
+ "description": "Only commit meta for this search.",
2164
+ "type": "string",
2165
+ "default": null,
2166
+ "example": "tag:mytables"
2167
+ }
2168
+ },
2169
+ "type": "object"
2170
+ },
2171
+ "Constraint": {
2172
+ "description": "A constraint is a rule that is enforced on a table to ensure data integrity. Constraints can be used to enforce rules such as uniqueness, foreign key relationships, and check constraints. They help maintain the consistency and accuracy of data in a database.",
2173
+ "required": [
2174
+ "constraint",
2175
+ "columns"
2176
+ ],
2177
+ "properties": {
2178
+ "name": {
2179
+ "title": "Name",
2180
+ "description": "Name of the constraint.",
2181
+ "type": "string",
2182
+ "example": "my-constraint"
2183
+ },
2184
+ "constraint": {
2185
+ "title": "Type",
2186
+ "description": "Type of the constraint.",
2187
+ "type": "string",
2188
+ "example": "foreign"
2189
+ },
2190
+ "columns": {
2191
+ "title": "Columns",
2192
+ "description": "Columns in constraint",
2193
+ "type": "array",
2194
+ "items": {
2195
+ "type": "string"
2196
+ },
2197
+ "example": [
2198
+ "c1",
2199
+ "c2",
2200
+ "c3"
2201
+ ]
2202
+ },
2203
+ "check": {
2204
+ "title": "Check",
2205
+ "description": "A check constraint.",
2206
+ "type": "string",
2207
+ "example": "c1 > 0"
2208
+ },
2209
+ "referenced_table": {
2210
+ "title": "Referenced table",
2211
+ "description": "Referenced table in a foreign key constraint.",
2212
+ "type": "string",
2213
+ "example": "my_schema.my.table"
2214
+ },
2215
+ "referenced_columns": {
2216
+ "title": "Referenced columns",
2217
+ "description": "Referenced columns in a foreign key constraint. This will default to the primary key if omitted.",
2218
+ "type": "array",
2219
+ "items": {
2220
+ "type": "string"
2221
+ },
2222
+ "example": [
2223
+ "c1",
2224
+ "c2",
2225
+ "c3"
2226
+ ]
2227
+ }
2228
+ },
2229
+ "type": "object"
2230
+ },
2231
+ "File": {
2232
+ "description": "Use the Files endpoints to upload one or more files (like CSV files) to temporary storage and then process them into a database table.",
2233
+ "required": [
2234
+ "file",
2235
+ "schema"
2236
+ ],
2237
+ "properties": {
2238
+ "file": {
2239
+ "title": "File",
2240
+ "description": "File to import to database.",
2241
+ "type": "string"
2242
+ },
2243
+ "schema": {
2244
+ "title": "Schema",
2245
+ "description": "Destination schema",
2246
+ "type": "string"
2247
+ },
2248
+ "import": {
2249
+ "title": "Import",
2250
+ "description": "If false, a dry-run will be executed.",
2251
+ "type": "boolean",
2252
+ "default": false
2253
+ },
2254
+ "t_srs": {
2255
+ "title": "Target srs",
2256
+ "description": "Fallback target SRS. Will be used if no authority name/code is available.",
2257
+ "type": "string",
2258
+ "default": "EPSG:4326"
2259
+ },
2260
+ "s_srs": {
2261
+ "title": "Source srs",
2262
+ "description": "Fallback source SRS. Will be used if file doesn't contain projection information.",
2263
+ "type": "string",
2264
+ "default": "EPSG:4326"
2265
+ },
2266
+ "append": {
2267
+ "title": "Append",
2268
+ "description": "Append to existing table instead of creating new.",
2269
+ "type": "boolean",
2270
+ "default": false
2271
+ },
2272
+ "p_multi": {
2273
+ "title": "Promote to multi",
2274
+ "description": "Promote single geometries to multi part.",
2275
+ "type": "boolean",
2276
+ "default": false
2277
+ },
2278
+ "truncate": {
2279
+ "title": "Truncate",
2280
+ "description": "Truncate table before appending. Only have effect if --append is set.",
2281
+ "type": "boolean",
2282
+ "default": false
2283
+ },
2284
+ "timestamp": {
2285
+ "title": "Timestamp",
2286
+ "description": "Name of timestamp field. Create a timestamp field in the import table. Omit property for no timestamp field.",
2287
+ "type": "string",
2288
+ "example": "creation_timestamp"
2289
+ },
2290
+ "x_possible_names": {
2291
+ "title": "Possible names for X",
2292
+ "description": "Specify the potential names of the columns that can contain X/longitude. Only effects CSV",
2293
+ "type": "string",
2294
+ "default": "lon*,Lon*,x,X",
2295
+ "example": "Lon*"
2296
+ },
2297
+ "y_possible_names": {
2298
+ "title": "Possible names for Y",
2299
+ "description": "Specify the potential names of the columns that can contain Y/latitude. Only effects CSV",
2300
+ "type": "string",
2301
+ "default": "lat*,Lat*,y,Y",
2302
+ "example": "Lat*"
2303
+ }
2304
+ },
2305
+ "type": "object"
2306
+ },
2307
+ "Rule": {
2308
+ "required": [],
2309
+ "properties": {
2310
+ "id": {
2311
+ "title": "Unique identifier",
2312
+ "description": "Id of the rule. If omitted the rule will get an id automatically generated.",
2313
+ "type": "integer",
2314
+ "example": 1000
2315
+ },
2316
+ "priority": {
2317
+ "title": "Priority",
2318
+ "description": "All rules are checked by priority in descending order. The first that matches will be applied.",
2319
+ "type": "integer",
2320
+ "example": 10
2321
+ },
2322
+ "username": {
2323
+ "title": "Username",
2324
+ "description": "Rule match for user name (the user that makes the request).",
2325
+ "type": "string",
2326
+ "example": "john"
2327
+ },
2328
+ "service": {
2329
+ "title": "Service",
2330
+ "description": "Rule match for service.",
2331
+ "type": "string",
2332
+ "enum": [
2333
+ "sql",
2334
+ "ows",
2335
+ "wfst"
2336
+ ],
2337
+ "example": "sql"
2338
+ },
2339
+ "request": {
2340
+ "title": "Request",
2341
+ "description": "Rule match for request.",
2342
+ "type": "string",
2343
+ "enum": [
2344
+ "select",
2345
+ "insert",
2346
+ "update",
2347
+ "delete"
2348
+ ],
2349
+ "example": "select"
2350
+ },
2351
+ "layer": {
2352
+ "title": "Layer",
2353
+ "description": "Rule match for the requested layer(s).",
2354
+ "type": "string",
2355
+ "example": "my_table"
2356
+ },
2357
+ "iprange": {
2358
+ "title": "Iprange",
2359
+ "description": "Rule match for the iprange, which the request originates from.",
2360
+ "type": "string",
2361
+ "example": "127.0.0.1/32"
2362
+ },
2363
+ "schema": {
2364
+ "title": "Schema",
2365
+ "description": "Rule match for the requested schema(s).",
2366
+ "type": "string",
2367
+ "example": "my_schema"
2368
+ },
2369
+ "access": {
2370
+ "title": "Access",
2371
+ "description": "The access level the rule grants.",
2372
+ "type": "string",
2373
+ "enum": [
2374
+ "allow",
2375
+ "limit",
2376
+ "deny"
2377
+ ],
2378
+ "example": "limit"
2379
+ },
2380
+ "filter": {
2381
+ "title": "Filter",
2382
+ "description": "A filter for rules with 'limit' access. This is a valid WHERE clause.",
2383
+ "type": "string",
2384
+ "example": "user='john'"
2385
+ }
2386
+ },
2387
+ "type": "object"
2388
+ },
2389
+ "GraphQL": {
2390
+ "description": "The GraphQL API allows you to query and manipulate your database data using a dynamically generated schema. Each table in your schema is automatically mapped to GraphQL types, queries, and mutations.",
2391
+ "required": [
2392
+ "query"
2393
+ ],
2394
+ "properties": {
2395
+ "query": {
2396
+ "title": "Query",
2397
+ "description": "GraphQL query. Both query and mutation operations are supported. Queries retrieve data, while mutations modify data.",
2398
+ "type": "string",
2399
+ "example": "query { ... }"
2400
+ },
2401
+ "variables": {
2402
+ "title": "Variables",
2403
+ "description": "Variables for the GraphQL query. Should be a JSON object with variable names as keys and their values as values.",
2404
+ "type": "object",
2405
+ "example": {
2406
+ "id": 1
2407
+ }
2408
+ },
2409
+ "operationName": {
2410
+ "title": "Operation name",
2411
+ "description": "Name of the operation to execute. Useful when a query contains multiple operations.",
2412
+ "type": "string",
2413
+ "example": "Artists"
2414
+ }
2415
+ },
2416
+ "type": "object"
2417
+ },
2418
+ "Index": {
2419
+ "description": "Indices in a database use a similar approach as in most non-fiction books: terms and concepts that are frequently looked up by readers are collected in an alphabetic index at the end of the book. The interested reader can scan the index relatively quickly and flip to the appropriate page(s), rather than having to read the entire book to find the material of interest.",
2420
+ "required": [
2421
+ "columns"
2422
+ ],
2423
+ "properties": {
2424
+ "name": {
2425
+ "title": "Name",
2426
+ "description": "Name of the index.",
2427
+ "type": "string",
2428
+ "example": "my-btree"
2429
+ },
2430
+ "columns": {
2431
+ "title": "Columns",
2432
+ "description": "Column(s) to index. An index can comprise more columns.",
2433
+ "type": "array",
2434
+ "items": {
2435
+ "type": "string"
2436
+ },
2437
+ "example": [
2438
+ "field1"
2439
+ ]
2440
+ },
2441
+ "method": {
2442
+ "title": "The index method.",
2443
+ "description": "The index method.",
2444
+ "type": "string",
2445
+ "default": "btree",
2446
+ "enum": [
2447
+ "btree",
2448
+ "brin",
2449
+ "gin",
2450
+ "gist",
2451
+ "hash"
2452
+ ],
2453
+ "example": "btree"
2454
+ }
2455
+ },
2456
+ "type": "object"
2457
+ },
2458
+ "Method": {
2459
+ "description": "nstead of sending raw SQL every time you want to run a statement, you can wrap your SQL statements inside JSON-RPC methods. This means you define a named method which holds your SQL query along with optional instructions on how to interpret and format the data types.",
2460
+ "required": [
2461
+ "method",
2462
+ "q"
2463
+ ],
2464
+ "properties": {
2465
+ "method": {
2466
+ "title": "Method",
2467
+ "description": "A String containing the name of the method to be created.",
2468
+ "type": "string",
2469
+ "example": "getDate"
2470
+ },
2471
+ "q": {
2472
+ "title": "Query",
2473
+ "description": "SQL statement. SELECT, INSERT, UPDATE or DELETE.",
2474
+ "type": "string",
2475
+ "example": "SELECT :my_date::date as my_date"
2476
+ },
2477
+ "type_hints": {
2478
+ "title": "Type hints",
2479
+ "description": "For JSON represented parameters which are not of JSON type.",
2480
+ "type": "object",
2481
+ "example": {
2482
+ "my_date": "date"
2483
+ }
2484
+ },
2485
+ "type_formats": {
2486
+ "title": "Type formats",
2487
+ "description": "For JSON represented parameters which are not of JSON type.",
2488
+ "type": "object",
2489
+ "example": {
2490
+ "my_date": "Y m d"
2491
+ }
2492
+ },
2493
+ "output_format": {
2494
+ "title": "Output format",
2495
+ "description": "The wanted output format.",
2496
+ "type": "string",
2497
+ "default": "json",
2498
+ "example": "csv"
2499
+ },
2500
+ "srs": {
2501
+ "title": "Spatial reference system",
2502
+ "description": "The spatial reference system to use for PostGIS geometry columns. EPSG code.",
2503
+ "type": "integer",
2504
+ "default": 4326,
2505
+ "example": 25832
2506
+ }
2507
+ },
2508
+ "type": "object"
2509
+ },
2510
+ "OAuth": {
2511
+ "description": "OAuth is used to authenticate users and grant access to resources. It is a protocol that allows users to authorize third-party applications to access their resources without sharing their credentials.",
2512
+ "required": [
2513
+ "grant_type"
2514
+ ],
2515
+ "properties": {
2516
+ "grant_type": {
2517
+ "title": "OAuth grant type",
2518
+ "description": "The OAuth grant type to use for authentication.",
2519
+ "type": "string",
2520
+ "enum": [
2521
+ "password",
2522
+ "authorization_code",
2523
+ "refresh_token",
2524
+ "device_code"
2525
+ ],
2526
+ "example": "password"
2527
+ },
2528
+ "username": {
2529
+ "title": "Username",
2530
+ "description": "Username - either database user or sub-user. Only used in password grant.",
2531
+ "type": "string",
2532
+ "example": "mydb"
2533
+ },
2534
+ "password": {
2535
+ "title": "Password",
2536
+ "description": "Password for password grant.",
2537
+ "type": "string",
2538
+ "example": "abc123!"
2539
+ },
2540
+ "database": {
2541
+ "title": "Database",
2542
+ "description": "The database the user belongs to.",
2543
+ "type": "string",
2544
+ "example": "mydb"
2545
+ },
2546
+ "client_id": {
2547
+ "title": "Client id",
2548
+ "description": "The OAuth client id.",
2549
+ "type": "string",
2550
+ "example": "djskjskdj"
2551
+ },
2552
+ "client_secret": {
2553
+ "title": "Client secret",
2554
+ "description": "The OAuth client secret.",
2555
+ "type": "string",
2556
+ "example": "xxx"
2557
+ },
2558
+ "code": {
2559
+ "title": "Code",
2560
+ "description": "The code which is exchanged for an access token in authorization_code grant",
2561
+ "type": "string",
2562
+ "example": "xxx"
2563
+ },
2564
+ "redirect_uri": {
2565
+ "title": "Redirect uri",
2566
+ "description": "The redirect uris for authorization_code grant.",
2567
+ "type": "string",
2568
+ "example": "xxx"
2569
+ },
2570
+ "code_verifier": {
2571
+ "title": "Code verifier",
2572
+ "description": "The code verifier for PKCE.",
2573
+ "type": "string",
2574
+ "example": "xxx"
2575
+ }
2576
+ },
2577
+ "type": "object"
2578
+ },
2579
+ "OAuthResponse": {
2580
+ "description": "OAuth grant response. This is the final response with tokens.",
2581
+ "required": [
2582
+ "access_token",
2583
+ "token_type",
2584
+ "expires_in",
2585
+ "refresh_token",
2586
+ "scope"
2587
+ ],
2588
+ "properties": {
2589
+ "access_token": {
2590
+ "title": "JWT access token",
2591
+ "description": "The JWT access token.",
2592
+ "type": "string",
2593
+ "example": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3"
2594
+ },
2595
+ "token_type": {
2596
+ "title": "Token type",
2597
+ "description": "Always 'bearer'",
2598
+ "type": "string",
2599
+ "enum": [
2600
+ "bearer"
2601
+ ],
2602
+ "example": "bearer"
2603
+ },
2604
+ "expires_in": {
2605
+ "title": "Expiration time",
2606
+ "description": "The token expiration time.",
2607
+ "type": "integer",
2608
+ "example": 3600
2609
+ },
2610
+ "refresh_token": {
2611
+ "title": "JWT refresh token",
2612
+ "description": "The JWT refresh token.",
2613
+ "type": "string",
2614
+ "example": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3"
2615
+ },
2616
+ "scope": {
2617
+ "title": "Scope",
2618
+ "description": "The scope.",
2619
+ "type": "string",
2620
+ "example": "sql"
2621
+ }
2622
+ },
2623
+ "type": "object"
2624
+ },
2625
+ "OAuthDeviceResponse": {
2626
+ "description": "Device response with user code and verification uri.",
2627
+ "required": [
2628
+ "device_code",
2629
+ "user_code",
2630
+ "verification_uri",
2631
+ "expires_in",
2632
+ "interval"
2633
+ ],
2634
+ "properties": {
2635
+ "device_code": {
2636
+ "title": "Device code",
2637
+ "description": "The device code.",
2638
+ "type": "string",
2639
+ "example": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3"
2640
+ },
2641
+ "user_code": {
2642
+ "title": "User code",
2643
+ "description": "The user code.",
2644
+ "type": "string",
2645
+ "example": "AB12-CD34"
2646
+ },
2647
+ "verification_uri": {
2648
+ "title": "Verification uri",
2649
+ "description": "The verification URI.",
2650
+ "type": "string",
2651
+ "format": "url",
2652
+ "example": "https://api.centia.io/api/v4/oauth"
2653
+ },
2654
+ "expires_in": {
2655
+ "title": "Expiration time",
2656
+ "description": "The JWT refresh token.",
2657
+ "type": "integer",
2658
+ "example": "1800"
2659
+ },
2660
+ "interval": {
2661
+ "title": "Interval",
2662
+ "description": "The interval.",
2663
+ "type": "integer",
2664
+ "example": 5
2665
+ }
2666
+ },
2667
+ "type": "object"
2668
+ },
2669
+ "OAuthDevice": {
2670
+ "description": "Device request for starting a device flow.",
2671
+ "required": [
2672
+ "client_id"
2673
+ ],
2674
+ "properties": {
2675
+ "client_id": {
2676
+ "title": "Client id",
2677
+ "description": "The client id.",
2678
+ "type": "string",
2679
+ "example": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3"
2680
+ }
2681
+ },
2682
+ "type": "object"
2683
+ },
2684
+ "Privilege": {
2685
+ "description": "The privilege system enables the super-user to grant sub-users read or write privileges to tables. Sub-users can grant privileges to tables in their own schemas.",
2686
+ "required": [
2687
+ "subuser",
2688
+ "privileges"
2689
+ ],
2690
+ "properties": {
2691
+ "subuser": {
2692
+ "title": "Sub-user",
2693
+ "description": "Name of the sub-user",
2694
+ "type": "string",
2695
+ "example": "joe"
2696
+ },
2697
+ "privileges": {
2698
+ "title": "Privileges",
2699
+ "description": "The privileges granted to the sub-user on a table.",
2700
+ "type": "string",
2701
+ "enum": [
2702
+ "none",
2703
+ "read",
2704
+ "write"
2705
+ ],
2706
+ "example": "all"
2707
+ }
2708
+ },
2709
+ "type": "object"
2710
+ },
2711
+ "Schema": {
2712
+ "description": "A database contains one or more named schemas, which in turn contain tables. Within one schema, two tables cannot have the same name. The same table name can be used in different schemas without conflict.",
2713
+ "required": [
2714
+ "name"
2715
+ ],
2716
+ "properties": {
2717
+ "name": {
2718
+ "title": "Name",
2719
+ "description": "Name of the schema.",
2720
+ "type": "string",
2721
+ "example": "my-schema"
2722
+ },
2723
+ "tables": {
2724
+ "title": "Tables",
2725
+ "description": "Tables in the schema.",
2726
+ "type": "array",
2727
+ "items": {
2728
+ "$ref": "#/components/schemas/Table"
2729
+ }
2730
+ },
2731
+ "sequences": {
2732
+ "title": "Sequences",
2733
+ "description": "Sequences in the schema.",
2734
+ "type": "array",
2735
+ "items": {
2736
+ "$ref": "#/components/schemas/Sequence"
2737
+ }
2738
+ }
2739
+ },
2740
+ "type": "object"
2741
+ },
2742
+ "Sequence": {
2743
+ "description": "A sequence is a database object that generates a sequence of integers, often used for auto-incrementing primary key columns.",
2744
+ "required": [
2745
+ "name"
2746
+ ],
2747
+ "properties": {
2748
+ "name": {
2749
+ "title": "Name",
2750
+ "description": "The name of the sequence",
2751
+ "type": "string",
2752
+ "example": "my_sequence"
2753
+ },
2754
+ "data_type": {
2755
+ "title": "Data type",
2756
+ "description": "The data type of the sequence",
2757
+ "type": "string",
2758
+ "default": "bigint",
2759
+ "enum": [
2760
+ "smallint",
2761
+ "integer",
2762
+ "bigint"
2763
+ ],
2764
+ "example": "bigint"
2765
+ },
2766
+ "increment_by": {
2767
+ "title": "Increment by",
2768
+ "description": "Specifies which value is added to the current sequence value to create a new value",
2769
+ "type": "integer",
2770
+ "default": 1,
2771
+ "example": 1
2772
+ },
2773
+ "min_value": {
2774
+ "title": "Min value",
2775
+ "description": "Determines the minimum value a sequence can generate.",
2776
+ "type": "integer",
2777
+ "example": 1
2778
+ },
2779
+ "max_value": {
2780
+ "title": "Max value",
2781
+ "description": "Determines the maximum value for the sequence.",
2782
+ "type": "integer",
2783
+ "example": 9223372036854
2784
+ },
2785
+ "start_value": {
2786
+ "title": "Start value",
2787
+ "description": "he initial value of the sequence",
2788
+ "type": "integer",
2789
+ "example": 1
2790
+ },
2791
+ "cache_size": {
2792
+ "title": "Cache size",
2793
+ "description": "Specifies how many sequence numbers should be preallocated and stored in memory for faster access.",
2794
+ "type": "integer",
2795
+ "default": 1,
2796
+ "example": 1
2797
+ },
2798
+ "owned_by": {
2799
+ "title": "Qwned by",
2800
+ "description": "Associates the sequence with a specific table column, so that if that column (or its whole table) is deleted, the sequence will be automatically deleted as well. The format is schema.table.column.",
2801
+ "type": "string",
2802
+ "example": "public.my_table.id"
2803
+ }
2804
+ },
2805
+ "type": "object"
2806
+ },
2807
+ "Sql": {
2808
+ "description": "SQL query execution endpoint. Supports SELECT, INSERT, UPDATE, DELETE and MERGE statements.",
2809
+ "required": [],
2810
+ "properties": {
2811
+ "q": {
2812
+ "title": "Query",
2813
+ "description": "SQL statement. SELECT, INSERT, UPDATE, DELETE or MERGE.",
2814
+ "type": "string",
2815
+ "example": "SELECT :my_date::date as my_date"
2816
+ },
2817
+ "params": {
2818
+ "title": "Parameters",
2819
+ "description": "Parameters for prepared statements.",
2820
+ "type": "array",
2821
+ "items": {
2822
+ "type": "object"
2823
+ },
2824
+ "example": {
2825
+ "my_date": "2011 04 01"
2826
+ }
2827
+ },
2828
+ "type_hints": {
2829
+ "title": "Type hints",
2830
+ "description": "For JSON represented parameters which are not of JSON type.",
2831
+ "type": "object",
2832
+ "example": {
2833
+ "my_date": "date"
2834
+ }
2835
+ },
2836
+ "type_formats": {
2837
+ "title": "Type formats",
2838
+ "description": "Formats for types (like date formatting).",
2839
+ "type": "object",
2840
+ "example": {
2841
+ "my_date": "Y m d"
2842
+ }
2843
+ },
2844
+ "output_format": {
2845
+ "title": "Output format",
2846
+ "description": "The wanted output format.",
2847
+ "type": "string",
2848
+ "default": "json",
2849
+ "example": "csv"
2850
+ },
2851
+ "srs": {
2852
+ "title": "Spatial reference system",
2853
+ "description": "The spatial reference system to use for PostGIS geometry columns. EPSG code.",
2854
+ "type": "integer",
2855
+ "default": 4326,
2856
+ "example": 25832
2857
+ }
2858
+ },
2859
+ "type": "object"
2860
+ },
2861
+ "Stats": {
2862
+ "description": "Statistics about the whole database.",
2863
+ "required": [
2864
+ "tables",
2865
+ "total_size",
2866
+ "total_size_bytes",
2867
+ "number_of_tables",
2868
+ "cost"
2869
+ ],
2870
+ "properties": {
2871
+ "tables": {
2872
+ "title": "Tables.",
2873
+ "description": "List of stats for all tables.",
2874
+ "type": "array",
2875
+ "items": {
2876
+ "$ref": "#/components/schemas/TableStats"
2877
+ }
2878
+ },
2879
+ "total_size": {
2880
+ "title": "Total size",
2881
+ "description": "The total size of all tables in human-readable format.",
2882
+ "type": "integer",
2883
+ "example": 722018304
2884
+ },
2885
+ "total_size_bytes": {
2886
+ "title": "Total size",
2887
+ "description": "The total size of all tables in bytes.",
2888
+ "type": "string",
2889
+ "example": "689 MB"
2890
+ },
2891
+ "number_of_tables": {
2892
+ "title": "Number of tables",
2893
+ "description": "The total of table in the database",
2894
+ "type": "integer",
2895
+ "example": 21
2896
+ },
2897
+ "cost": {
2898
+ "title": "Cost of queries",
2899
+ "description": "The cost of queries.",
2900
+ "type": "number",
2901
+ "example": 25686.6
2902
+ }
2903
+ },
2904
+ "type": "object"
2905
+ },
2906
+ "TableStats": {
2907
+ "description": "Table statistics.",
2908
+ "required": [
2909
+ "table_name",
2910
+ "schema_name",
2911
+ "total_size",
2912
+ "total_size_bytes"
2913
+ ],
2914
+ "properties": {
2915
+ "table_name": {
2916
+ "title": "Table name",
2917
+ "description": "The name of the table.",
2918
+ "type": "string",
2919
+ "example": "my_table"
2920
+ },
2921
+ "schema_name": {
2922
+ "title": "Schema name",
2923
+ "description": "The name of the schema.",
2924
+ "type": "string",
2925
+ "example": "my_schema"
2926
+ },
2927
+ "total_size": {
2928
+ "title": "Total size",
2929
+ "description": "The total size of the table including indices in human-readable format.",
2930
+ "type": "string",
2931
+ "example": "2728 kB"
2932
+ },
2933
+ "total_size_bytes": {
2934
+ "title": "Total size in bytes",
2935
+ "description": "The total size of the table including indices in bytes.",
2936
+ "type": "integer",
2937
+ "example": 2793472
2938
+ },
2939
+ "table_size": {
2940
+ "title": "Table size",
2941
+ "description": "The size of the table in human-readable format.",
2942
+ "type": "string",
2943
+ "example": "2168 kB"
2944
+ },
2945
+ "table_size_bytes": {
2946
+ "title": "Table size in bytes",
2947
+ "description": "The size of the table in bytes.",
2948
+ "type": "integer",
2949
+ "example": 2220032
2950
+ },
2951
+ "indices_size": {
2952
+ "title": "Indices size",
2953
+ "description": "The size of the table's indices in human-readable format",
2954
+ "type": "string",
2955
+ "example": "520 kB"
2956
+ },
2957
+ "indices_size_bytes": {
2958
+ "title": "Indices size",
2959
+ "description": "The size of the table's indices in bytes.",
2960
+ "type": "integer",
2961
+ "example": 532480
2962
+ },
2963
+ "row_count": {
2964
+ "title": "Row count",
2965
+ "description": "The number of rows in the table.",
2966
+ "type": "integer",
2967
+ "example": 6338
2968
+ }
2969
+ },
2970
+ "type": "object"
2971
+ },
2972
+ "Table": {
2973
+ "description": "A table is much like a table on paper: It consists of rows and columns. The number and order of the columns is fixed, and each column has a name. The number of rows is variable — it reflects how much data is stored at a given moment.",
2974
+ "required": [
2975
+ "name"
2976
+ ],
2977
+ "properties": {
2978
+ "name": {
2979
+ "title": "Name",
2980
+ "description": "Name of the table",
2981
+ "type": "string",
2982
+ "example": "my-column"
2983
+ },
2984
+ "columns": {
2985
+ "title": "Columns",
2986
+ "description": "Columns in the table.",
2987
+ "type": "array",
2988
+ "items": {
2989
+ "$ref": "#/components/schemas/Column"
2990
+ }
2991
+ },
2992
+ "indices": {
2993
+ "title": "Indices",
2994
+ "description": "Indices in the table.",
2995
+ "type": "array",
2996
+ "items": {
2997
+ "$ref": "#/components/schemas/Index"
2998
+ }
2999
+ },
3000
+ "constraints": {
3001
+ "title": "Constraints",
3002
+ "description": "Constraints in the table.",
3003
+ "type": "array",
3004
+ "items": {
3005
+ "$ref": "#/components/schemas/Constraint"
3006
+ }
3007
+ }
3008
+ },
3009
+ "type": "object"
3010
+ },
3011
+ "User": {
3012
+ "required": [
3013
+ "name",
3014
+ "email",
3015
+ "password"
3016
+ ],
3017
+ "properties": {
3018
+ "name": {
3019
+ "title": "Name",
3020
+ "description": "Name of user.",
3021
+ "type": "string",
3022
+ "example": "joe"
3023
+ },
3024
+ "email": {
3025
+ "title": "E-mail",
3026
+ "description": "Users e-mail.",
3027
+ "type": "string",
3028
+ "format": "email",
3029
+ "example": "joe@example.com"
3030
+ },
3031
+ "password": {
3032
+ "title": "Password",
3033
+ "description": "Users password. Min. 8 characters and at least one upper case letter and one number.",
3034
+ "type": "password",
3035
+ "example": "Abc123!"
3036
+ },
3037
+ "properties": {
3038
+ "title": "Properties",
3039
+ "description": "An object, which can contain any properties and values.",
3040
+ "type": "object",
3041
+ "example": {
3042
+ "phone": "555-1234567",
3043
+ "address": "123 Main St",
3044
+ "city": "New York"
3045
+ }
3046
+ },
3047
+ "default_user": {
3048
+ "title": "Is default user",
3049
+ "description": "The default user is the user that is used when no token is provided. Use for public applications where users should not be able to access data without a token.",
3050
+ "type": "boolean",
3051
+ "example": true
3052
+ }
3053
+ },
3054
+ "type": "object"
3055
+ }
3056
+ },
3057
+ "securitySchemes": {
3058
+ "bearerAuth": {
3059
+ "type": "http",
3060
+ "name": "bearerAuth",
3061
+ "in": "header",
3062
+ "bearerFormat": "JWT",
3063
+ "scheme": "bearer"
3064
+ }
3065
+ }
3066
+ },
3067
+ "security": [
3068
+ {
3069
+ "bearerAuth": []
3070
+ }
3071
+ ],
3072
+ "tags": [
3073
+ {
3074
+ "name": "Methods",
3075
+ "description": "Methods"
3076
+ },
3077
+ {
3078
+ "name": "Clients",
3079
+ "description": "Clients"
3080
+ },
3081
+ {
3082
+ "name": "Schema",
3083
+ "description": "Schema"
3084
+ },
3085
+ {
3086
+ "name": "Commit",
3087
+ "description": "Commit"
3088
+ },
3089
+ {
3090
+ "name": "File",
3091
+ "description": "File"
3092
+ },
3093
+ {
3094
+ "name": "Rules",
3095
+ "description": "Rules"
3096
+ },
3097
+ {
3098
+ "name": "GraphQL",
3099
+ "description": "GraphQL"
3100
+ },
3101
+ {
3102
+ "name": "OAuth",
3103
+ "description": "OAuth"
3104
+ },
3105
+ {
3106
+ "name": "Privileges",
3107
+ "description": "Privileges"
3108
+ },
3109
+ {
3110
+ "name": "Sql",
3111
+ "description": "Sql"
3112
+ },
3113
+ {
3114
+ "name": "Stats",
3115
+ "description": "Stats"
3116
+ },
3117
+ {
3118
+ "name": "Users",
3119
+ "description": "Users"
3120
+ }
3121
+ ]
3122
+ }