haveapi 0.22.0 → 0.22.1

Sign up to get free protection for your applications and to get access to all the features.
data/doc/json-schema.html DELETED
@@ -1,1189 +0,0 @@
1
-
2
-
3
- <h1 id="envelope">Envelope</h1>
4
- <pre><code>{
5
- "title": "All response are wrapped in this envelope",
6
- "type": "object",
7
- "properties": {
8
- "version": {
9
- },
10
- "status": {
11
- "type": "boolean"
12
- },
13
- "response": {
14
- "type": "object"
15
- },
16
- "message": {
17
- "type": "string"
18
- },
19
- "errors": {
20
- "type": "object",
21
- "patternProperties": {
22
- "^.+$": {
23
- "type": "array"
24
- }
25
- }
26
- }
27
- },
28
- "required": [
29
- "status"
30
- ]
31
- }</code></pre>
32
-
33
-
34
- <h1 id="all">OPTIONS /</h1>
35
- <pre><code>{
36
- "title": "Describe all API versions",
37
- "type": "object",
38
- "properties": {
39
- "default_version": {
40
- },
41
- "versions": {
42
- "type": "object",
43
- "patternProperties": {
44
- "^.+$": {
45
- "$ref": "#/definitions/version"
46
- }
47
- },
48
- "properties": {
49
- "default": {
50
- "$ref": "#/definitions/version"
51
- }
52
- }
53
- }
54
- },
55
- "required": [
56
- "default_version",
57
- "versions"
58
- ],
59
- "version": {
60
- "type": "object",
61
- "properties": {
62
- "authentication": {
63
- "type": "object",
64
- "properties": {
65
- "basic": {
66
- "$ref": "#/definitions/auth_basic"
67
- },
68
- "token": {
69
- "$ref": "#/definitions/auth_token"
70
- }
71
- }
72
- },
73
- "resources": {
74
- "type": "object",
75
- "$ref": "#/definitions/resources"
76
- },
77
- "meta": {
78
- "type": "object",
79
- "properties": {
80
- "namespace": {
81
- "type": "string",
82
- "default": "_meta"
83
- }
84
- }
85
- },
86
- "help": {
87
- "type": "string"
88
- }
89
- }
90
- },
91
- "auth_basic": {
92
- "type": "object"
93
- },
94
- "auth_token": {
95
- "type": "object",
96
- "properties": {
97
- "http_header": {
98
- "type": "string",
99
- "default": "X-HaveAPI-Auth-Token"
100
- },
101
- "query_parameter": {
102
- "type": "string",
103
- "default": "_auth_token"
104
- },
105
- "resources": {
106
- "type": "object",
107
- "$ref": "#/definitions/resources"
108
- }
109
- }
110
- },
111
- "resources": {
112
- "type": "object",
113
- "patternProperties": {
114
- "^[a-z_]+$": {
115
- "type": "object",
116
- "properties": {
117
- "description": {
118
- "type": "string"
119
- },
120
- "actions": {
121
- "$ref": "#/definitions/actions"
122
- },
123
- "resources": {
124
- "$ref": "#/definitions/resources"
125
- }
126
- }
127
- }
128
- }
129
- },
130
- "actions": {
131
- "type": "object",
132
- "patternProperties": {
133
- "^[a-z_]+$": {
134
- "type": "object",
135
- "properties": {
136
- "auth": {
137
- "type": "boolean"
138
- },
139
- "description": {
140
- "type": "string"
141
- },
142
- "aliases": {
143
- "type": "array",
144
- "items": {
145
- "type": "string"
146
- }
147
- },
148
- "blocking": {
149
- "type": "boolean"
150
- },
151
- "input": {
152
- "$ref": "#/definitions/input_parameters"
153
- },
154
- "output": {
155
- "$ref": "#/definitions/output_parameters"
156
- },
157
- "meta": {
158
- "$ref": "#/definitions/action_meta"
159
- },
160
- "examples": {
161
- "type": "object",
162
- "properties": {
163
- "title": {
164
- "type": "string"
165
- },
166
- "url_params": {
167
- "type": "array",
168
- "items": {
169
- "type": "integer"
170
- }
171
- },
172
- "request": {
173
- "type": "object"
174
- },
175
- "response": {
176
- "type": "object"
177
- },
178
- "status": {
179
- "type": "boolean"
180
- },
181
- "message": {
182
- "type": "string"
183
- },
184
- "errors": {
185
- "type": "object",
186
- "patternProperties": {
187
- "^[a-z_]+$": {
188
- "type": "array",
189
- "items": {
190
- "type": "string"
191
- }
192
- }
193
- }
194
- },
195
- "http_status": {
196
- "type": "integer"
197
- },
198
- "comment": {
199
- "type": "string"
200
- }
201
- }
202
- },
203
- "url": {
204
- "type": "string"
205
- },
206
- "method": {
207
- "type": "string"
208
- },
209
- "help": {
210
- "type": "string"
211
- }
212
- }
213
- }
214
- }
215
- },
216
- "input_parameters": {
217
- "type": "object",
218
- "properties": {
219
- "parameters": {
220
- "type": "object",
221
- "patternProperties": {
222
- "^[a-z_]+$": {
223
- "type": "object",
224
- "oneOf": [
225
- {
226
- "title": "Data type",
227
- "type": "object",
228
- "properties": {
229
- "required": {
230
- "type": "boolean"
231
- },
232
- "label": {
233
- "type": "string"
234
- },
235
- "description": {
236
- "type": "string"
237
- },
238
- "type": {
239
- "type": "string",
240
- "enum": [
241
- "String",
242
- "Text",
243
- "Integer",
244
- "Float",
245
- "Datetime",
246
- "Boolean"
247
- ]
248
- },
249
- "validators": {
250
- "$ref": "#/definitions/input_validators"
251
- },
252
- "default": {
253
- },
254
- "protected": {
255
- "type": "boolean"
256
- }
257
- }
258
- },
259
- {
260
- "title": "Resource",
261
- "type": "object",
262
- "properties": {
263
- "required": {
264
- "type": "boolean"
265
- },
266
- "label": {
267
- "type": "string"
268
- },
269
- "description": {
270
- "type": "string"
271
- },
272
- "type": {
273
- "type": "string",
274
- "enum": [
275
- "Resource"
276
- ]
277
- },
278
- "resource": {
279
- "type": "array"
280
- },
281
- "value_id": {
282
- "type": "string"
283
- },
284
- "value_label": {
285
- "type": "string"
286
- },
287
- "value": {
288
- "type": "object",
289
- "properties": {
290
- "url": {
291
- "type": "string"
292
- },
293
- "method": {
294
- "type": "string"
295
- },
296
- "help": {
297
- "type": "string"
298
- }
299
- }
300
- },
301
- "choices": {
302
- "type": "object",
303
- "properties": {
304
- "url": {
305
- "type": "string"
306
- },
307
- "method": {
308
- "type": "string"
309
- },
310
- "help": {
311
- "type": "string"
312
- }
313
- }
314
- }
315
- }
316
- }
317
- ]
318
- }
319
- }
320
- },
321
- "layout": {
322
- "type": "string",
323
- "enum": [
324
- "hash",
325
- "hash_list",
326
- "object",
327
- "object_list"
328
- ]
329
- },
330
- "namespace": {
331
- "type": "string"
332
- }
333
- }
334
- },
335
- "input_validators": {
336
- "type": "object",
337
- "properties": {
338
- "accept": {
339
- "type": "object",
340
- "properties": {
341
- "value": {
342
- },
343
- "message": {
344
- "type": "string"
345
- }
346
- }
347
- },
348
- "confirm": {
349
- "type": "object",
350
- "properties": {
351
- "equal": {
352
- "type": "boolean"
353
- },
354
- "parameter": {
355
- "type": "string"
356
- },
357
- "message": {
358
- "type": "string"
359
- }
360
- }
361
- },
362
- "custom": {
363
- "type": "string"
364
- },
365
- "exclude": {
366
- "type": "object",
367
- "properties": {
368
- "values": {
369
- "type": "array"
370
- },
371
- "message": {
372
- "type": "string"
373
- }
374
- }
375
- },
376
- "format": {
377
- "type": "object",
378
- "properties": {
379
- "rx": {
380
- "type": "string"
381
- },
382
- "match": {
383
- "type": "boolean"
384
- },
385
- "description": {
386
- "type": "string"
387
- },
388
- "message": {
389
- "type": "string"
390
- }
391
- }
392
- },
393
- "include": {
394
- "type": "object",
395
- "properties": {
396
- "values": {
397
- "oneOf": [
398
- {
399
- "title": "Array of allowed values",
400
- "type": "array"
401
- },
402
- {
403
- "title": "Hash of allowed values",
404
- "type": "object"
405
- }
406
- ]
407
- },
408
- "message": {
409
- "type": "string"
410
- }
411
- }
412
- },
413
- "length": {
414
- "oneOf": [
415
- {
416
- "title": "Equality",
417
- "type": "object",
418
- "properties": {
419
- "equals": {
420
- "type": "integer"
421
- },
422
- "message": {
423
- "type": "string"
424
- }
425
- }
426
- },
427
- {
428
- "title": "Interval",
429
- "type": "object",
430
- "properties": {
431
- "min": {
432
- "type": "integer"
433
- },
434
- "max": {
435
- "type": "integer"
436
- },
437
- "message": {
438
- "type": "string"
439
- }
440
- }
441
- }
442
- ]
443
- },
444
- "number": {
445
- "type": "object",
446
- "properties": {
447
- "min": {
448
- "type": "number"
449
- },
450
- "max": {
451
- "type": "number"
452
- },
453
- "step": {
454
- "type": "number"
455
- },
456
- "mod": {
457
- "type": "integer"
458
- },
459
- "odd": {
460
- "type": "boolean"
461
- },
462
- "even": {
463
- "type": "boolean"
464
- },
465
- "message": {
466
- "type": "string"
467
- }
468
- }
469
- },
470
- "present": {
471
- "type": "object",
472
- "properties": {
473
- "empty": {
474
- "type": "boolean"
475
- },
476
- "message": {
477
- "type": "string"
478
- }
479
- }
480
- }
481
- }
482
- },
483
- "output_parameters": {
484
- "type": "object",
485
- "properties": {
486
- "parameters": {
487
- "type": "object",
488
- "patternProperties": {
489
- "^[a-z_]+$": {
490
- "type": "object",
491
- "oneOf": [
492
- {
493
- "title": "Data type",
494
- "type": "object",
495
- "properties": {
496
- "label": {
497
- "type": "string"
498
- },
499
- "description": {
500
- "type": "string"
501
- },
502
- "type": {
503
- "type": "string",
504
- "enum": [
505
- "String",
506
- "Text",
507
- "Integer",
508
- "Float",
509
- "Datetime",
510
- "Boolean"
511
- ]
512
- },
513
- "protected": {
514
- "type": "boolean"
515
- }
516
- }
517
- },
518
- {
519
- "title": "Resource",
520
- "type": "object",
521
- "properties": {
522
- "label": {
523
- "type": "string"
524
- },
525
- "description": {
526
- "type": "string"
527
- },
528
- "type": {
529
- "type": "string",
530
- "enum": [
531
- "Resource"
532
- ]
533
- },
534
- "resource": {
535
- "type": "array"
536
- },
537
- "value_id": {
538
- "type": "string"
539
- },
540
- "value_label": {
541
- "type": "string"
542
- },
543
- "value": {
544
- "type": "object",
545
- "properties": {
546
- "url": {
547
- "type": "string"
548
- },
549
- "method": {
550
- "type": "string"
551
- },
552
- "help": {
553
- "type": "string"
554
- }
555
- }
556
- },
557
- "choices": {
558
- "type": "object",
559
- "properties": {
560
- "url": {
561
- "type": "string"
562
- },
563
- "method": {
564
- "type": "string"
565
- },
566
- "help": {
567
- "type": "string"
568
- }
569
- }
570
- }
571
- }
572
- }
573
- ]
574
- }
575
- }
576
- },
577
- "layout": {
578
- "type": "string",
579
- "enum": [
580
- "hash",
581
- "hash_list",
582
- "object",
583
- "object_list"
584
- ]
585
- },
586
- "namespace": {
587
- "type": "string"
588
- }
589
- }
590
- },
591
- "action_meta": {
592
- "type": "object",
593
- "properties": {
594
- "object": {
595
- "input": {
596
- "$ref": "#/definitions/input_parameters"
597
- },
598
- "output": {
599
- "$ref": "#/definitions/output_parameters"
600
- }
601
- },
602
- "global": {
603
- "input": {
604
- "$ref": "#/definitions/input_parameters"
605
- },
606
- "output": {
607
- "$ref": "#/definitions/output_parameters"
608
- }
609
- }
610
- }
611
- }
612
- }</code></pre>
613
-
614
- <h1 id="versions">OPTIONS /?describe=versions</h1>
615
- <pre><code>{
616
- "title": "Show available API versions",
617
- "type": "object",
618
- "properties": {
619
- "versions": {
620
- "type": "array"
621
- },
622
- "default": {
623
- }
624
- },
625
- "required": [
626
- "versions",
627
- "default"
628
- ]
629
- }</code></pre>
630
-
631
- <h1 id="default">OPTIONS /?describe=default</h1>
632
- <pre><code>{
633
- "title": "Describe only the default version of the API",
634
- "$ref": "#/definitions/version",
635
- "version": {
636
- "type": "object",
637
- "properties": {
638
- "authentication": {
639
- "type": "object",
640
- "properties": {
641
- "basic": {
642
- "$ref": "#/definitions/auth_basic"
643
- },
644
- "token": {
645
- "$ref": "#/definitions/auth_token"
646
- }
647
- }
648
- },
649
- "resources": {
650
- "type": "object",
651
- "$ref": "#/definitions/resources"
652
- },
653
- "meta": {
654
- "type": "object",
655
- "properties": {
656
- "namespace": {
657
- "type": "string",
658
- "default": "_meta"
659
- }
660
- }
661
- },
662
- "help": {
663
- "type": "string"
664
- }
665
- }
666
- },
667
- "auth_basic": {
668
- "type": "object"
669
- },
670
- "auth_token": {
671
- "type": "object",
672
- "properties": {
673
- "http_header": {
674
- "type": "string",
675
- "default": "X-HaveAPI-Auth-Token"
676
- },
677
- "query_parameter": {
678
- "type": "string",
679
- "default": "_auth_token"
680
- },
681
- "resources": {
682
- "type": "object",
683
- "$ref": "#/definitions/resources"
684
- }
685
- }
686
- },
687
- "resources": {
688
- "type": "object",
689
- "patternProperties": {
690
- "^[a-z_]+$": {
691
- "type": "object",
692
- "properties": {
693
- "description": {
694
- "type": "string"
695
- },
696
- "actions": {
697
- "$ref": "#/definitions/actions"
698
- },
699
- "resources": {
700
- "$ref": "#/definitions/resources"
701
- }
702
- }
703
- }
704
- }
705
- },
706
- "actions": {
707
- "type": "object",
708
- "patternProperties": {
709
- "^[a-z_]+$": {
710
- "type": "object",
711
- "properties": {
712
- "auth": {
713
- "type": "boolean"
714
- },
715
- "description": {
716
- "type": "string"
717
- },
718
- "aliases": {
719
- "type": "array",
720
- "items": {
721
- "type": "string"
722
- }
723
- },
724
- "blocking": {
725
- "type": "boolean"
726
- },
727
- "input": {
728
- "$ref": "#/definitions/input_parameters"
729
- },
730
- "output": {
731
- "$ref": "#/definitions/output_parameters"
732
- },
733
- "meta": {
734
- "$ref": "#/definitions/action_meta"
735
- },
736
- "examples": {
737
- "type": "object",
738
- "properties": {
739
- "title": {
740
- "type": "string"
741
- },
742
- "url_params": {
743
- "type": "array",
744
- "items": {
745
- "type": "integer"
746
- }
747
- },
748
- "request": {
749
- "type": "object"
750
- },
751
- "response": {
752
- "type": "object"
753
- },
754
- "status": {
755
- "type": "boolean"
756
- },
757
- "message": {
758
- "type": "string"
759
- },
760
- "errors": {
761
- "type": "object",
762
- "patternProperties": {
763
- "^[a-z_]+$": {
764
- "type": "array",
765
- "items": {
766
- "type": "string"
767
- }
768
- }
769
- }
770
- },
771
- "http_status": {
772
- "type": "integer"
773
- },
774
- "comment": {
775
- "type": "string"
776
- }
777
- }
778
- },
779
- "url": {
780
- "type": "string"
781
- },
782
- "method": {
783
- "type": "string"
784
- },
785
- "help": {
786
- "type": "string"
787
- }
788
- }
789
- }
790
- }
791
- },
792
- "input_parameters": {
793
- "type": "object",
794
- "properties": {
795
- "parameters": {
796
- "type": "object",
797
- "patternProperties": {
798
- "^[a-z_]+$": {
799
- "type": "object",
800
- "oneOf": [
801
- {
802
- "title": "Data type",
803
- "type": "object",
804
- "properties": {
805
- "required": {
806
- "type": "boolean"
807
- },
808
- "label": {
809
- "type": "string"
810
- },
811
- "description": {
812
- "type": "string"
813
- },
814
- "type": {
815
- "type": "string",
816
- "enum": [
817
- "String",
818
- "Text",
819
- "Integer",
820
- "Float",
821
- "Datetime",
822
- "Boolean"
823
- ]
824
- },
825
- "validators": {
826
- "$ref": "#/definitions/input_validators"
827
- },
828
- "default": {
829
- },
830
- "protected": {
831
- "type": "boolean"
832
- }
833
- }
834
- },
835
- {
836
- "title": "Resource",
837
- "type": "object",
838
- "properties": {
839
- "required": {
840
- "type": "boolean"
841
- },
842
- "label": {
843
- "type": "string"
844
- },
845
- "description": {
846
- "type": "string"
847
- },
848
- "type": {
849
- "type": "string",
850
- "enum": [
851
- "Resource"
852
- ]
853
- },
854
- "resource": {
855
- "type": "array"
856
- },
857
- "value_id": {
858
- "type": "string"
859
- },
860
- "value_label": {
861
- "type": "string"
862
- },
863
- "value": {
864
- "type": "object",
865
- "properties": {
866
- "url": {
867
- "type": "string"
868
- },
869
- "method": {
870
- "type": "string"
871
- },
872
- "help": {
873
- "type": "string"
874
- }
875
- }
876
- },
877
- "choices": {
878
- "type": "object",
879
- "properties": {
880
- "url": {
881
- "type": "string"
882
- },
883
- "method": {
884
- "type": "string"
885
- },
886
- "help": {
887
- "type": "string"
888
- }
889
- }
890
- }
891
- }
892
- }
893
- ]
894
- }
895
- }
896
- },
897
- "layout": {
898
- "type": "string",
899
- "enum": [
900
- "hash",
901
- "hash_list",
902
- "object",
903
- "object_list"
904
- ]
905
- },
906
- "namespace": {
907
- "type": "string"
908
- }
909
- }
910
- },
911
- "input_validators": {
912
- "type": "object",
913
- "properties": {
914
- "accept": {
915
- "type": "object",
916
- "properties": {
917
- "value": {
918
- },
919
- "message": {
920
- "type": "string"
921
- }
922
- }
923
- },
924
- "confirm": {
925
- "type": "object",
926
- "properties": {
927
- "equal": {
928
- "type": "boolean"
929
- },
930
- "parameter": {
931
- "type": "string"
932
- },
933
- "message": {
934
- "type": "string"
935
- }
936
- }
937
- },
938
- "custom": {
939
- "type": "string"
940
- },
941
- "exclude": {
942
- "type": "object",
943
- "properties": {
944
- "values": {
945
- "type": "array"
946
- },
947
- "message": {
948
- "type": "string"
949
- }
950
- }
951
- },
952
- "format": {
953
- "type": "object",
954
- "properties": {
955
- "rx": {
956
- "type": "string"
957
- },
958
- "match": {
959
- "type": "boolean"
960
- },
961
- "description": {
962
- "type": "string"
963
- },
964
- "message": {
965
- "type": "string"
966
- }
967
- }
968
- },
969
- "include": {
970
- "type": "object",
971
- "properties": {
972
- "values": {
973
- "oneOf": [
974
- {
975
- "title": "Array of allowed values",
976
- "type": "array"
977
- },
978
- {
979
- "title": "Hash of allowed values",
980
- "type": "object"
981
- }
982
- ]
983
- },
984
- "message": {
985
- "type": "string"
986
- }
987
- }
988
- },
989
- "length": {
990
- "oneOf": [
991
- {
992
- "title": "Equality",
993
- "type": "object",
994
- "properties": {
995
- "equals": {
996
- "type": "integer"
997
- },
998
- "message": {
999
- "type": "string"
1000
- }
1001
- }
1002
- },
1003
- {
1004
- "title": "Interval",
1005
- "type": "object",
1006
- "properties": {
1007
- "min": {
1008
- "type": "integer"
1009
- },
1010
- "max": {
1011
- "type": "integer"
1012
- },
1013
- "message": {
1014
- "type": "string"
1015
- }
1016
- }
1017
- }
1018
- ]
1019
- },
1020
- "number": {
1021
- "type": "object",
1022
- "properties": {
1023
- "min": {
1024
- "type": "number"
1025
- },
1026
- "max": {
1027
- "type": "number"
1028
- },
1029
- "step": {
1030
- "type": "number"
1031
- },
1032
- "mod": {
1033
- "type": "integer"
1034
- },
1035
- "odd": {
1036
- "type": "boolean"
1037
- },
1038
- "even": {
1039
- "type": "boolean"
1040
- },
1041
- "message": {
1042
- "type": "string"
1043
- }
1044
- }
1045
- },
1046
- "present": {
1047
- "type": "object",
1048
- "properties": {
1049
- "empty": {
1050
- "type": "boolean"
1051
- },
1052
- "message": {
1053
- "type": "string"
1054
- }
1055
- }
1056
- }
1057
- }
1058
- },
1059
- "output_parameters": {
1060
- "type": "object",
1061
- "properties": {
1062
- "parameters": {
1063
- "type": "object",
1064
- "patternProperties": {
1065
- "^[a-z_]+$": {
1066
- "type": "object",
1067
- "oneOf": [
1068
- {
1069
- "title": "Data type",
1070
- "type": "object",
1071
- "properties": {
1072
- "label": {
1073
- "type": "string"
1074
- },
1075
- "description": {
1076
- "type": "string"
1077
- },
1078
- "type": {
1079
- "type": "string",
1080
- "enum": [
1081
- "String",
1082
- "Text",
1083
- "Integer",
1084
- "Float",
1085
- "Datetime",
1086
- "Boolean"
1087
- ]
1088
- },
1089
- "protected": {
1090
- "type": "boolean"
1091
- }
1092
- }
1093
- },
1094
- {
1095
- "title": "Resource",
1096
- "type": "object",
1097
- "properties": {
1098
- "label": {
1099
- "type": "string"
1100
- },
1101
- "description": {
1102
- "type": "string"
1103
- },
1104
- "type": {
1105
- "type": "string",
1106
- "enum": [
1107
- "Resource"
1108
- ]
1109
- },
1110
- "resource": {
1111
- "type": "array"
1112
- },
1113
- "value_id": {
1114
- "type": "string"
1115
- },
1116
- "value_label": {
1117
- "type": "string"
1118
- },
1119
- "value": {
1120
- "type": "object",
1121
- "properties": {
1122
- "url": {
1123
- "type": "string"
1124
- },
1125
- "method": {
1126
- "type": "string"
1127
- },
1128
- "help": {
1129
- "type": "string"
1130
- }
1131
- }
1132
- },
1133
- "choices": {
1134
- "type": "object",
1135
- "properties": {
1136
- "url": {
1137
- "type": "string"
1138
- },
1139
- "method": {
1140
- "type": "string"
1141
- },
1142
- "help": {
1143
- "type": "string"
1144
- }
1145
- }
1146
- }
1147
- }
1148
- }
1149
- ]
1150
- }
1151
- }
1152
- },
1153
- "layout": {
1154
- "type": "string",
1155
- "enum": [
1156
- "hash",
1157
- "hash_list",
1158
- "object",
1159
- "object_list"
1160
- ]
1161
- },
1162
- "namespace": {
1163
- "type": "string"
1164
- }
1165
- }
1166
- },
1167
- "action_meta": {
1168
- "type": "object",
1169
- "properties": {
1170
- "object": {
1171
- "input": {
1172
- "$ref": "#/definitions/input_parameters"
1173
- },
1174
- "output": {
1175
- "$ref": "#/definitions/output_parameters"
1176
- }
1177
- },
1178
- "global": {
1179
- "input": {
1180
- "$ref": "#/definitions/input_parameters"
1181
- },
1182
- "output": {
1183
- "$ref": "#/definitions/output_parameters"
1184
- }
1185
- }
1186
- }
1187
- }
1188
- }</code></pre>
1189
-