-
Notifications
You must be signed in to change notification settings - Fork 71
/
README-CONCEPTS.rtf
1526 lines (1482 loc) · 90.8 KB
/
README-CONCEPTS.rtf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
{\rtf1\ansi\ansicpg1252\cocoartf1404\cocoasubrtf460
{\fonttbl\f0\fswiss\fcharset0 Helvetica;\f1\fnil\fcharset0 Consolas;}
{\colortbl;\red255\green255\blue255;\red118\green85\blue189;\red153\green153\blue153;\red34\green34\blue34;
\red17\green85\blue204;\red217\green217\blue217;\red255\green0\blue255;\red239\green239\blue239;\red67\green67\blue67;
}
{\*\listtable{\list\listtemplateid1\listhybrid{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{disc\}}{\leveltext\leveltemplateid1\'01\uc0\u8226 ;}{\levelnumbers;}\fi-360\li720\lin720 }{\listname ;}\listid1}
{\list\listtemplateid2\listhybrid{\listlevel\levelnfc0\levelnfcn0\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{decimal\}.}{\leveltext\leveltemplateid101\'02\'00.;}{\levelnumbers\'01;}\fi-360\li720\lin720 }{\listname ;}\listid2}
{\list\listtemplateid3\listhybrid{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{disc\}}{\leveltext\leveltemplateid201\'01\uc0\u8226 ;}{\levelnumbers;}\fi-360\li720\lin720 }{\listname ;}\listid3}
{\list\listtemplateid4\listhybrid{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{disc\}}{\leveltext\leveltemplateid301\'01\uc0\u8226 ;}{\levelnumbers;}\fi-360\li720\lin720 }{\listname ;}\listid4}
{\list\listtemplateid5\listhybrid{\listlevel\levelnfc0\levelnfcn0\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{decimal\}.}{\leveltext\leveltemplateid401\'02\'00.;}{\levelnumbers\'01;}\fi-360\li720\lin720 }{\listname ;}\listid5}}
{\*\listoverridetable{\listoverride\listid1\listoverridecount0\ls1}{\listoverride\listid2\listoverridecount0\ls2}{\listoverride\listid3\listoverridecount0\ls3}{\listoverride\listid4\listoverridecount0\ls4}{\listoverride\listid5\listoverridecount0\ls5}}
\vieww12540\viewh16140\viewkind1
\deftab720
\pard\pardeftab720\ri0\sl276\slmult1\sa200\partightenfactor0
\f0\fs40 \cf2 openFDA website\uc0\u8232 \cf3 Conceptual documentation and helpful reference materials\cf2 \
\pard\pardeftab720\ri0\sl276\slmult1\sa200\partightenfactor0
\fs22 \cf4 \
\pard\pardeftab720\li360\ri0\sl276\slmult1\sa200\partightenfactor0
{\field{\*\fldinst{HYPERLINK "%5Cl%20%22h.17632gths3md%22"}}{\fldrslt \cf5 \ul \ulc5 Introduction}}\cf5 \ul \ulc5 \
\pard\pardeftab720\li360\ri0\sl276\slmult1\sa200\partightenfactor0
{\field{\*\fldinst{HYPERLINK "%5Cl%20%22h.tvqob1rmhaia%22"}}{\fldrslt \cf5 \ulc5 Glossary of important terms}}\
\pard\pardeftab720\li360\ri0\sl276\slmult1\sa200\partightenfactor0
{\field{\*\fldinst{HYPERLINK "%5Cl%20%22h.38hyirtoxja5%22"}}{\fldrslt \cf5 \ulc5 Technical architecture and principles}}\
\pard\pardeftab720\li720\ri0\sl276\slmult1\sa200\partightenfactor0
{\field{\*\fldinst{HYPERLINK "%5Cl%20%22h.l1z18z1p3eoa%22"}}{\fldrslt \cf5 \ulc5 Site structure is a mirror image of API structure}}\
\pard\pardeftab720\li720\ri0\sl276\slmult1\sa200\partightenfactor0
{\field{\*\fldinst{HYPERLINK "%5Cl%20%22h.yq0eonn2xeqs%22"}}{\fldrslt \cf5 \ulc5 Conventions}}\
\pard\pardeftab720\li1080\ri0\sl276\slmult1\sa200\partightenfactor0
{\field{\*\fldinst{HYPERLINK "%5Cl%20%22h.lnpw1huip0yw%22"}}{\fldrslt \cf5 \ulc5 Underscore files}}\
\pard\pardeftab720\li1080\ri0\sl276\slmult1\sa200\partightenfactor0
{\field{\*\fldinst{HYPERLINK "%5Cl%20%22h.qotiz6bhu0nx%22"}}{\fldrslt \cf5 \ulc5 Little content in React/JavaScript components}}\
\pard\pardeftab720\li1080\ri0\sl276\slmult1\sa200\partightenfactor0
{\field{\*\fldinst{HYPERLINK "%5Cl%20%22h.zc2fwumijxzj%22"}}{\fldrslt \cf5 \ulc5 Components}}\
\pard\pardeftab720\li360\ri0\sl276\slmult1\sa200\partightenfactor0
{\field{\*\fldinst{HYPERLINK "%5Cl%20%22h.ou94z5pdu6ho%22"}}{\fldrslt \cf5 \ulc5 Pages}}\
\pard\pardeftab720\li720\ri0\sl276\slmult1\sa200\partightenfactor0
{\field{\*\fldinst{HYPERLINK "%5Cl%20%22h.m3gvftamrntq%22"}}{\fldrslt \cf5 \ulc5 Endpoint pages}}\
\pard\pardeftab720\li1080\ri0\sl276\slmult1\sa200\partightenfactor0
{\field{\*\fldinst{HYPERLINK "%5Cl%20%22h.w23baavf2qrb%22"}}{\fldrslt \cf5 \ulc5 Endpoint configuration files}}\
\pard\pardeftab720\li720\ri0\sl276\slmult1\sa200\partightenfactor0
{\field{\*\fldinst{HYPERLINK "%5Cl%20%22h.thgr1znafvjd%22"}}{\fldrslt \cf5 \ulc5 Updates (i.e. blog posts)}}\
\pard\pardeftab720\li1080\ri0\sl276\slmult1\sa200\partightenfactor0
{\field{\*\fldinst{HYPERLINK "%5Cl%20%22h.68g635o4fl37%22"}}{\fldrslt \cf5 \ulc5 Meta information fields}}\
\pard\pardeftab720\li360\ri0\sl276\slmult1\sa200\partightenfactor0
{\field{\*\fldinst{HYPERLINK "%5Cl%20%22h.3otwsm40qfm%22"}}{\fldrslt \cf5 \ulc5 Configuration file markup}}\
\pard\pardeftab720\li720\ri0\sl276\slmult1\sa200\partightenfactor0
{\field{\*\fldinst{HYPERLINK "%5Cl%20%22h.be4lek31g132%22"}}{\fldrslt \cf5 \ulc5 _content.yaml}}\
\pard\pardeftab720\li1080\ri0\sl276\slmult1\sa200\partightenfactor0
{\field{\*\fldinst{HYPERLINK "%5Cl%20%22h.b1c063bkk4u7%22"}}{\fldrslt \cf5 \ulc5 Example}}\
\pard\pardeftab720\li1080\ri0\sl276\slmult1\sa200\partightenfactor0
{\field{\*\fldinst{HYPERLINK "%5Cl%20%22h.hbhwqqm2bwg0%22"}}{\fldrslt \cf5 \ulc5 How the above example would be processed}}\
\pard\pardeftab720\li1080\ri0\sl276\slmult1\sa200\partightenfactor0
{\field{\*\fldinst{HYPERLINK "%5Cl%20%22h.alzdgfd453c4%22"}}{\fldrslt \cf5 \ulc5 Elements}}\
\pard\pardeftab720\li720\ri0\sl276\slmult1\sa200\partightenfactor0
{\field{\*\fldinst{HYPERLINK "%5Cl%20%22h.i966r8fkb1sy%22"}}{\fldrslt \cf5 \ulc5 _explorers.yaml}}\
\pard\pardeftab720\li1080\ri0\sl276\slmult1\sa200\partightenfactor0
{\field{\*\fldinst{HYPERLINK "%5Cl%20%22h.3baqtuwe4255%22"}}{\fldrslt \cf5 \ulc5 Example}}\
\pard\pardeftab720\li1080\ri0\sl276\slmult1\sa200\partightenfactor0
{\field{\*\fldinst{HYPERLINK "%5Cl%20%22h.gycld8215d83%22"}}{\fldrslt \cf5 \ulc5 Elements}}\
\pard\pardeftab720\li720\ri0\sl276\slmult1\sa200\partightenfactor0
{\field{\*\fldinst{HYPERLINK "%5Cl%20%22h.97fe17sdq3a8%22"}}{\fldrslt \cf5 \ulc5 _fields.yaml}}\
\pard\pardeftab720\li720\ri0\sl276\slmult1\sa200\partightenfactor0
{\field{\*\fldinst{HYPERLINK "%5Cl%20%22h.9em2mcy1o0i8%22"}}{\fldrslt \cf5 \ulc5 _infographics.yaml}}\
\pard\pardeftab720\li1080\ri0\sl276\slmult1\sa200\partightenfactor0
{\field{\*\fldinst{HYPERLINK "%5Cl%20%22h.666lga42afp1%22"}}{\fldrslt \cf5 \ulc5 Example}}\
\pard\pardeftab720\li1080\ri0\sl276\slmult1\sa200\partightenfactor0
{\field{\*\fldinst{HYPERLINK "%5Cl%20%22h.zacvvcpmg5i8%22"}}{\fldrslt \cf5 \ulc5 Elements}}\
\pard\pardeftab720\li720\ri0\sl276\slmult1\sa200\partightenfactor0
{\field{\*\fldinst{HYPERLINK "%5Cl%20%22h.1ejscps4iupf%22"}}{\fldrslt \cf5 \ulc5 _examples.json}}\
\pard\pardeftab720\li720\ri0\sl276\slmult1\sa200\partightenfactor0
{\field{\*\fldinst{HYPERLINK "%5Cl%20%22h.1ztknxpsa115%22"}}{\fldrslt \cf5 \ulc5 _meta.yaml}}\
\pard\pardeftab720\li1080\ri0\sl276\slmult1\sa200\partightenfactor0
{\field{\*\fldinst{HYPERLINK "%5Cl%20%22h.3t3zwkg8aide%22"}}{\fldrslt \cf5 \ulc5 Example}}\
\pard\pardeftab720\li1080\ri0\sl276\slmult1\sa200\partightenfactor0
{\field{\*\fldinst{HYPERLINK "%5Cl%20%22h.c1jile2uordm%22"}}{\fldrslt \cf5 \ulc5 Elements}}\
\pard\pardeftab720\ri0\sl276\slmult1\sa200\partightenfactor0
\cf4 \ulnone \
\
\
\pard\pardeftab720\ri0\sl276\slmult1\sb200\sa200\partightenfactor0
\fs34 \cf3 \
Introduction\
\pard\pardeftab720\ri0\sl276\slmult1\sa200\partightenfactor0
\fs22 \cf4 This document describes elements of the openFDA website and its technical architecture, along with instructions for working with it to edit and create pages.\
Throughout this document, the
\b drug adverse events
\b0 endpoint is used as an example. Its
\i noun
\i0 is
\b drug
\b0 and
\i endpoint
\i0 name is
\b event
\b0 .\
\pard\pardeftab720\ri0\sl276\slmult1\sa200\partightenfactor0
\b \cf4 Important.
\b0 Where this document and the actual pages and content on the site disagree, use the examples from the live site and GitHub repository, which is liable to be more up to date. The concepts presented herein are consistent, even if some details on the site (such as file names) are slightly different.
\b \
\pard\pardeftab720\ri0\sl276\slmult1\sa200\partightenfactor0
\b0\fs30 \cf2 \
\pard\pardeftab720\ri0\sl276\slmult1\sb200\sa200\partightenfactor0
\fs34 \cf3 Glossary of important terms
\fs30 \cf2 \
\pard\tx360\tx720\pardeftab720\li720\fi-360\ri0\sl276\slmult1\partightenfactor0
\ls1\ilvl0
\fs22 \cf4 \uc0\u9679
\b Gatsby.
\b0 This is the static site generation software that processes the configuration files and React.js components to ultimately create the rich, JavaScript-based open.fda.gov website.
\b \
\pard\tx360\tx720\pardeftab720\li720\fi-360\ri0\sl276\slmult1\partightenfactor0
\ls1\ilvl0
\b0 \cf5 \uc0\u9679 {\field{\*\fldinst{HYPERLINK "https://daringfireball.net/projects/markdown/"}}{\fldrslt
\b \ul Markdown}}\cf4 . This is a lightweight markup language used to style text, add links to text, and similar.
\b \cf5 \ul \ulc5 \
\pard\tx360\tx720\pardeftab720\li720\fi-360\ri0\sl276\slmult1\partightenfactor0
\ls1\ilvl0
\b0 \cf4 \ulnone \uc0\u9679
\b React.js.
\b0 This is the JavaScript-based front-end framework that the user interface components of the open.fda.gov website are built with.
\b \
\pard\tx360\tx720\pardeftab720\li720\fi-360\ri0\sl276\slmult1\partightenfactor0
\ls1\ilvl0
\b0 \cf5 \uc0\u9679 {\field{\*\fldinst{HYPERLINK "https://learn.getgrav.org/advanced/yaml"}}{\fldrslt
\b \ul YAML
\b0 .}}\cf4
\i Yet another markup language.
\i0 This is the format used by most configuration files which the website processing code uses to generate pages.
\b \cf5 \ul \ulc5 \
\pard\tx360\tx720\pardeftab720\li720\fi-360\ri0\sl276\slmult1\partightenfactor0
\ls1\ilvl0
\b0 \cf4 \ulnone \uc0\u9679
\b HTML, JavaScript, CSS, and SASS
\b0 are the ordinary web technologies that underpin all these.
\b \
\pard\pardeftab720\ri0\sl276\slmult1\sa200\partightenfactor0
\ls1\ilvl0
\b0 \cf4 Basic familiarity with these technologies is essential for fluency with all parts of the openFDA website. A novice JavaScript developer would be able to get up to speed with the site in one or two days. Non-technical staff can familiarize themselves with YAML and Markdown and successfully edit or create new pages on the site, although a JavaScript engineer would have the special skill necessary to deploy the change.\
\pard\pardeftab720\ri0\sl276\slmult1\sb200\partightenfactor0
\ls1\ilvl0
\fs30 \cf2 \
\pard\pardeftab720\ri0\sl276\slmult1\sb200\sa200\partightenfactor0
\ls1\ilvl0
\fs34 \cf3 Technical architecture and principles\
\pard\pardeftab720\ri0\sl276\slmult1\sa200\partightenfactor0
\ls1\ilvl0
\fs22 \cf4 The best way to learn about the site and how it works is to run it. Instructions are part of the GitHub repository. Effectively, you just need to install a node.js environment, clone the repository, install the node packages, and start up Gatsby. You can edit content and code live, while the site constantly rebuilds itself, for rapid iteration.\
\pard\pardeftab720\ri0\sl276\slmult1\sb200\partightenfactor0
\ls1\ilvl0
\fs30 \cf2 Site structure is a mirror image of API structure\
\pard\pardeftab720\ri0\sl276\slmult1\sa200\partightenfactor0
\ls1\ilvl0
\fs22 \cf4 The website folder structure and API endpoint structure mirror one another.\
\pard\pardeftab720\li720\ri0\sl276\slmult1\sa200\partightenfactor0
\ls1\ilvl0
\b \cf4 API endpoint {\field{\*\fldinst{HYPERLINK "https://api.fda.gov/drug/event.json"}}{\fldrslt
\b0 \cf5 \ul \ulc5 https://api.fda.gov/drug/event.json}}
\b0 \uc0\u8232
\b Website {\field{\*\fldinst{HYPERLINK "https://open.fda.gov/drug/event"}}{\fldrslt
\b0 \cf5 \ul \ulc5 https://open.fda.gov/drug/event}}\
\pard\pardeftab720\ri0\sl276\slmult1\sa200\partightenfactor0
\ls1\ilvl0
\b0 \cf4 In this way, API users are trained to expect a simplicity and clarity of thought and architecture in both the openFDA APIs and corresponding documentation.\
\pard\pardeftab720\ri0\sl276\slmult1\sb200\partightenfactor0
\ls1\ilvl0
\fs30 \cf2 Conventions\
\pard\pardeftab720\ri0\sl276\slmult1\sb160\sa200\partightenfactor0
\ls1\ilvl0
\fs26 \cf2 Underscore files\
\pard\pardeftab720\ri0\sl276\slmult1\sa200\partightenfactor0
\ls1\ilvl0
\fs22 \cf4 In general, files that begin with an underscore
\b _
\b0 like
\b _fields.yaml
\b0 are content files, meant to be edited by non-technical staff and which are ingested by components to generate the site.\
\pard\pardeftab720\ri0\sl276\slmult1\sb160\sa200\partightenfactor0
\ls1\ilvl0
\fs26 \cf2 Little content in React/JavaScript components\
\pard\pardeftab720\ri0\sl276\slmult1\sa200\partightenfactor0
\ls1\ilvl0
\fs22 \cf4 For most pages, content and datalive in either YAML or Markdown files. Only a few components, such as the
\b Nav
\b0 component that draws the menu at the top of the site, have content blended with code. For most
\i repeated
\i0 pages (e.g. endpoint basics and reference guide pages), content and data are separated so that one does not need to know how to code
\i per se
\i0 to edit the openFDA site.\
\pard\pardeftab720\ri0\sl276\slmult1\sb160\sa200\partightenfactor0
\ls1\ilvl0
\fs26 \cf2 Components\
\pard\pardeftab720\ri0\sl276\slmult1\sa200\partightenfactor0
\ls1\ilvl0
\fs22 \cf4 A
\i component
\i0 is a functional user interface element of the site; usually something that is re-used throughout. It can be more or less static\'97like the standard footer at the bottom of every page\'97or dynamic, like the "hero" element at the top of most data and API pages. Even the widget that draws an external link with the little external link icon is a component.\
Most components are in the folder
\b components
\b0 and are a React JSX (JavaScript) file. Occasionally a component requires several files. Typically, the JSX file has all the code necessary to create the component. Corresponding visual styles may be found in the folder
\b css
\b0 . Examples of components include the
\b Nav
\b0 component that draws the menu at the top of the site, the
\b Footer
\b0 component that draws the FDA footer, and more abstract components like the
\b Content
\b0 component that processes
\b _content.yaml
\b0 files, the
\b Hero
\b0 component that draws the big banner/header on most pages, and the
\b Infographic
\b0 component that draws data visualizations based on API calls.\
Content files like
\b _content.yaml
\b0 and
\b _fields.yaml
\b0 are fed into components, which process the data and generate interactive pages. The endpoint basics page, for example, has all kinds of components on it, from the
\b Hero
\b0 to the
\b InfographicContainer
\b0 , to the various chart components (
\b Bar, Donut,
\b0 and
\b Line
\b0 ), the
\b Content
\b0 ,
\b Downloads
\b0 ,
\b GettingStarted
\b0 (API key generation), and
\b QueryExplorer
\b0 components, among others. The basic content and data about the endpoint are passed through all these components to generate the interactive documentation users see.\
\pard\pardeftab720\ri0\sl276\slmult1\sb200\sa200\partightenfactor0
\ls1\ilvl0
\fs34 \cf3 Pages\
\pard\pardeftab720\ri0\sl276\slmult1\sa200\partightenfactor0
\ls1\ilvl0
\fs22 \cf4 In general, new endpoints or improvements to openFDA won't warrant entirely new
\i types
\i0 of pages, but instead new pages similar to those that exist already. In these cases, simply copying and learning from the existing pages is the best way to get started with edits or additions. For instance, if you're adding a new endpoint, just copy an existing endpoint page to get started.\
The most critical types of pages are described below.\
\pard\pardeftab720\ri0\sl276\slmult1\sb200\partightenfactor0
\ls1\ilvl0
\fs30 \cf2 Endpoint pages\
\pard\pardeftab720\ri0\sl276\slmult1\sa200\partightenfactor0
\ls1\ilvl0
\fs22 \cf4 Like all pages on the openFDA site, endpoint pages (including the basics page and reference page) are generated \'93automatically\'94 from easily-editable configuration files.\
To create a new endpoint page:\
\pard\tx360\tx720\pardeftab720\li720\fi-360\ri0\sl276\slmult1\partightenfactor0
\ls2\ilvl0\cf4 1. Create a folder for the appropriate
\i noun
\i0 in the folder
\b pages
\b0 .\uc0\u8232
\i For example, for the drug/event endpoint, you need a folder called
\b drug
\b0 .
\i0 \uc0\u8232 If the new endpoint is for an existing noun, the folder may already exist. This folder name should match the noun in the API endpoint path exactly.\
2. Create a folder for the
\b endpoint
\b0 in the appropriate noun folder.\uc0\u8232
\i For example, for the drug/event endpoint, you need a folder called
\b event
\i0\b0 \
3. Copy or create the files below. If copying them, choose a similar endpoint so that you can easily edit the files. For example, it would be easy to copy the files from one
\i enforcement reports
\i0 endpoint for one noun (e.g. drugs) to another noun (e.g. foods) and make appropriate edits, since the endpoints are similar.\
\pard\pardeftab720\ri0\sl276\slmult1\sa200\partightenfactor0
\ls2\ilvl0\cf4 In this way, the drug adverse events endpoint (api.fda.gov/drug/event) would live in the site at:\
\pard\pardeftab720\li720\ri0\sl276\slmult1\sa200\partightenfactor0
\ls2\ilvl0
\b \cf4 ./pages/drug/event/\
\pard\pardeftab720\ri0\sl276\slmult1\sb160\sa200\partightenfactor0
\ls2\ilvl0
\b0\fs26 \cf2 Endpoint configuration files\
\pard\pardeftab720\ri0\sl276\slmult1\sa200\partightenfactor0
\ls2\ilvl0
\fs22 \cf4 Every file is
\b required
\b0 for each endpoint.\
\pard\pardeftab720\ri0\sl276\slmult1\sa200\partightenfactor0
\ls2\ilvl0
\b \cf4 In
\b0
\b ./pages/noun/endpoint/\uc0\u8232
\b0 e.g. ./pages/drug/event/
\b \
\pard\pardeftab720\ri0\sl276\slmult1\sa200\partightenfactor0
\ls2\ilvl0
\b0 \cf4 These are the files that are required for the
\i endpoint basics
\i0 page.\
\pard\tx360\tx720\pardeftab720\li720\fi-360\ri0\sl276\slmult1\partightenfactor0
\ls3\ilvl0\cf4 \uc0\u9679
\b _content.yaml
\b0 \uc0\u8232 The content for the endpoint basics page, in order. This is processed by the endpoint basics component to create the endpoint basics page.
\b \
\ls3\ilvl0
\b0 \uc0\u9679
\b _explorers.yaml
\b0 \uc0\u8232 Interactive query example panels, which are used to show users individual API calls. These are the panels that have a query and a button to "Run" the query.
\b \
\ls3\ilvl0
\b0 \uc0\u9679
\b _fields.yaml
\b0 \uc0\u8232 Detailed field-by-field listing of every field that appears in endpoint query results. This is referenced by other components to provide documentation about endpoint fields. A skeletal version can be generated automatically from the JSON schema for the endpoint, and that only needs to be generated once. The rest of the data (such as the descriptions of each field) need to be manually added when a new endpoint is created.
\b \
\ls3\ilvl0
\b0 \uc0\u9679
\b _infographics.yaml
\b0 \uc0\u8232 Stories for the infographic explorer, which is the visual introduction to the endpoint, on the endpoint basics page. This is processed by the infographic explorer component to create the interactive exploration and data visualization tool.
\b \
\ls3\ilvl0
\b0 \uc0\u9679
\b _meta.yaml
\b0 \uc0\u8232 General information about the endpoint, like its name, datasets that supply data to it, description, and so forth. This is referenced by other components to generate query strings, populate the page title and
\b Hero
\b0 component, and so forth.
\b \
\ls3\ilvl0
\b0 \uc0\u9679
\b index.jsx
\b0 \uc0\u8232 This is a general file that tells the site generator that this is an endpoint basics page. It is exactly the same for every endpoint basics page, requiring no special editing or configuration for a particular endpoint.
\b \
\pard\pardeftab720\ri0\sl276\slmult1\sa200\partightenfactor0
\ls3\ilvl0\cf4 In
\b0
\b ./pages/noun/endpoint/reference/\uc0\u8232
\b0 e.g. ./pages/drug/event/reference/
\b \
\pard\pardeftab720\ri0\sl276\slmult1\sa200\partightenfactor0
\ls3\ilvl0
\b0 \cf4 If this
\b reference
\b0 folder doesn't exist, you need to create it. These are the files for the
\i endpoint reference guide
\i0 page.\
\pard\tx360\tx720\pardeftab720\li720\fi-360\ri0\sl276\slmult1\partightenfactor0
\ls4\ilvl0\cf4 \uc0\u9679
\b _content.yaml
\b0 \uc0\u8232 The content for the endpoint reference page, in order. This is processed by the endpoint reference component to create the endpoint reference page.
\b \
\ls4\ilvl0
\b0 \uc0\u9679
\b _examples.json
\b0 \uc0\u8232 Snippets of JSON returns from the given endpoint. These are the code examples that will be used to demonstrate what users see when they query the endpoint.
\b \
\ls4\ilvl0
\b0 \uc0\u9679
\b _explorers.yaml
\b0 (optional)\uc0\u8232 Interactive query example panels, which are used to show users individual API calls. These are the panels that have a query and a button to "Run" the query. These are optional on reference pages; heretofore we have never used them, preferring that the reference guide is just a field-by-field guide to the endpoint, and leaving the interactivity to the basics page.
\b \
\ls4\ilvl0
\b0 \uc0\u9679
\b _meta.yaml
\b0 \uc0\u8232 General information about the endpoint, like its name, datasets that supply data to it, description, and so forth. This is referenced by other components to generate query strings, populate the page title and
\b Hero
\b0 component, and so forth.
\b \
\ls4\ilvl0
\b0 \uc0\u9679
\b index.jsx
\b0 \uc0\u8232 This is a general file that tells the site generator that this is an endpoint reference page. It is exactly the same for every endpoint reference page, requiring no special editing or configuration for a particular endpoint.
\b \
\pard\pardeftab720\ri0\sl276\slmult1\sa200\partightenfactor0
\ls4\ilvl0
\b0 \cf4 \
\pard\pardeftab720\ri0\sl276\slmult1\sb200\partightenfactor0
\ls4\ilvl0
\fs30 \cf2 Updates (i.e. blog posts)\
\pard\pardeftab720\ri0\sl276\slmult1\sa200\partightenfactor0
\ls4\ilvl0
\fs22 \cf4 These pages are generally in Markdown (.md) format. At the top is meta information, and below the actual post content. The meta information fields are YAML, just like in other configuration files.\
These update posts live in the folder
\b blog
\b0 within the folder
\b pages
\b0 . The post itself is a file called
\b index.md
\b0 that lives in a folder named with the date and
\i path
\i0 of the post. For example:\
\pard\pardeftab720\li720\ri0\sl276\slmult1\sa200\partightenfactor0
\ls4\ilvl0
\b \cf4 ./pages/blog/2014-03-04-introducing-openfda/index.md\
\pard\pardeftab720\ri0\sl276\slmult1\sa200\partightenfactor0
\ls4\ilvl0\cf4 Important:
\b0 There must be three dashes before and after the meta fields in the file index.md. Otherwise the site generator will fail to pick up the meta fields. Exactly copy an existing update/blog post if you want to add a new one.
\b \
\pard\pardeftab720\ri0\sl276\slmult1\sb160\sa200\partightenfactor0
\ls4\ilvl0
\b0\fs26 \cf2 Meta information fields\
\itap1\trowd \taflags1 \trgaph108\trleft-108 \trwWidth12500\trftsWidth2 \trbrdrt\brdrs\brdrw10\brdrcf0 \trbrdrl\brdrs\brdrw10\brdrcf0 \trbrdrr\brdrs\brdrw10\brdrcf0
\clvertalt \clshdrawnil \clbrdrt\brdrs\brdrw10\brdrcf6 \clbrdrl\brdrs\brdrw10\brdrcf6 \clbrdrb\brdrs\brdrw10\brdrcf6 \clbrdrr\brdrs\brdrw10\brdrcf6 \clpadt72 \clpadl72 \clpadb72 \clpadr72 \gaph\cellx2880
\clvertalt \clshdrawnil \clbrdrt\brdrs\brdrw10\brdrcf6 \clbrdrl\brdrs\brdrw10\brdrcf6 \clbrdrb\brdrs\brdrw10\brdrcf6 \clbrdrr\brdrs\brdrw10\brdrcf6 \clpadt72 \clpadl72 \clpadb72 \clpadr72 \gaph\cellx5760
\clvertalt \clshdrawnil \clbrdrt\brdrs\brdrw10\brdrcf6 \clbrdrl\brdrs\brdrw10\brdrcf6 \clbrdrb\brdrs\brdrw10\brdrcf6 \clbrdrr\brdrs\brdrw10\brdrcf6 \clpadt72 \clpadl72 \clpadb72 \clpadr72 \gaph\cellx8640
\pard\intbl\itap1\pardeftab720\ri0\partightenfactor0
\ls4\ilvl0
\fs18 \cf3 Line/field
\fs22 \cf4 \cell
\pard\intbl\itap1\pardeftab720\ri0\partightenfactor0
\ls4\ilvl0
\fs18 \cf3 Description
\fs22 \cf4 \cell
\pard\intbl\itap1\pardeftab720\ri0\partightenfactor0
\ls4\ilvl0
\fs18 \cf3 Examples
\fs22 \cf4 \cell \row
\itap1\trowd \taflags1 \trgaph108\trleft-108 \trwWidth12500\trftsWidth2 \trbrdrl\brdrs\brdrw10\brdrcf0 \trbrdrr\brdrs\brdrw10\brdrcf0
\clvertalt \clshdrawnil \clbrdrt\brdrs\brdrw10\brdrcf6 \clbrdrl\brdrs\brdrw10\brdrcf6 \clbrdrb\brdrs\brdrw10\brdrcf6 \clbrdrr\brdrs\brdrw10\brdrcf6 \clpadt72 \clpadl72 \clpadb72 \clpadr72 \gaph\cellx2880
\clvertalt \clshdrawnil \clbrdrt\brdrs\brdrw10\brdrcf6 \clbrdrl\brdrs\brdrw10\brdrcf6 \clbrdrb\brdrs\brdrw10\brdrcf6 \clbrdrr\brdrs\brdrw10\brdrcf6 \clpadt72 \clpadl72 \clpadb72 \clpadr72 \gaph\cellx5760
\clvertalt \clshdrawnil \clbrdrt\brdrs\brdrw10\brdrcf6 \clbrdrl\brdrs\brdrw10\brdrcf6 \clbrdrb\brdrs\brdrw10\brdrcf6 \clbrdrr\brdrs\brdrw10\brdrcf6 \clpadt72 \clpadl72 \clpadb72 \clpadr72 \gaph\cellx8640
\pard\intbl\itap1\pardeftab720\ri0\partightenfactor0
\ls4\ilvl0
\f1\fs18 \cf4 ---
\f0\fs22 \cell
\pard\intbl\itap1\pardeftab720\ri0\partightenfactor0
\ls4\ilvl0
\fs18 \cf4 Required to demarcate the beginning of the meta fields.
\fs22 \cell
\pard\intbl\itap1\pardeftab720\ri0\partightenfactor0
\ls4\ilvl0\cf4 \cell \row
\itap1\trowd \taflags1 \trgaph108\trleft-108 \trwWidth12500\trftsWidth2 \trbrdrl\brdrs\brdrw10\brdrcf0 \trbrdrr\brdrs\brdrw10\brdrcf0
\clvertalt \clshdrawnil \clbrdrt\brdrs\brdrw10\brdrcf6 \clbrdrl\brdrs\brdrw10\brdrcf6 \clbrdrb\brdrs\brdrw10\brdrcf6 \clbrdrr\brdrs\brdrw10\brdrcf6 \clpadt72 \clpadl72 \clpadb72 \clpadr72 \gaph\cellx2880
\clvertalt \clshdrawnil \clbrdrt\brdrs\brdrw10\brdrcf6 \clbrdrl\brdrs\brdrw10\brdrcf6 \clbrdrb\brdrs\brdrw10\brdrcf6 \clbrdrr\brdrs\brdrw10\brdrcf6 \clpadt72 \clpadl72 \clpadb72 \clpadr72 \gaph\cellx5760
\clvertalt \clshdrawnil \clbrdrt\brdrs\brdrw10\brdrcf6 \clbrdrl\brdrs\brdrw10\brdrcf6 \clbrdrb\brdrs\brdrw10\brdrcf6 \clbrdrr\brdrs\brdrw10\brdrcf6 \clpadt72 \clpadl72 \clpadb72 \clpadr72 \gaph\cellx8640
\pard\intbl\itap1\pardeftab720\ri0\partightenfactor0
\ls4\ilvl0
\f1\fs18 \cf4 path
\f0\fs22 \cell
\pard\intbl\itap1\pardeftab720\ri0\partightenfactor0
\ls4\ilvl0
\fs18 \cf4 A string for the path at which this post should be accessible on the website. It must begin with a slash. It should be short, human readable, with words separated by dashes. This helps Google index the post.
\fs22 \cell
\pard\intbl\itap1\pardeftab720\ri0\partightenfactor0
\ls4\ilvl0
\f1\fs18 \cf4 path: "/update/introducing-openfda"
\f0\fs22 \
\ls4\ilvl0
\f1\fs18 path: "/update/new-device-data"\cell \row
\itap1\trowd \taflags1 \trgaph108\trleft-108 \trwWidth12500\trftsWidth2 \trbrdrl\brdrs\brdrw10\brdrcf0 \trbrdrr\brdrs\brdrw10\brdrcf0
\clvertalt \clshdrawnil \clbrdrt\brdrs\brdrw10\brdrcf6 \clbrdrl\brdrs\brdrw10\brdrcf6 \clbrdrb\brdrs\brdrw10\brdrcf6 \clbrdrr\brdrs\brdrw10\brdrcf6 \clpadt72 \clpadl72 \clpadb72 \clpadr72 \gaph\cellx2880
\clvertalt \clshdrawnil \clbrdrt\brdrs\brdrw10\brdrcf6 \clbrdrl\brdrs\brdrw10\brdrcf6 \clbrdrb\brdrs\brdrw10\brdrcf6 \clbrdrr\brdrs\brdrw10\brdrcf6 \clpadt72 \clpadl72 \clpadb72 \clpadr72 \gaph\cellx5760
\clvertalt \clshdrawnil \clbrdrt\brdrs\brdrw10\brdrcf6 \clbrdrl\brdrs\brdrw10\brdrcf6 \clbrdrb\brdrs\brdrw10\brdrcf6 \clbrdrr\brdrs\brdrw10\brdrcf6 \clpadt72 \clpadl72 \clpadb72 \clpadr72 \gaph\cellx8640
\pard\intbl\itap1\pardeftab720\ri0\partightenfactor0
\ls4\ilvl0\cf4 date
\f0\fs22 \cell
\pard\intbl\itap1\pardeftab720\ri0\partightenfactor0
\ls4\ilvl0
\fs18 \cf4 The date that the post should be considered published on, in the format:
\fs22 \
\ls4\ilvl0
\fs18 \
\pard\intbl\itap1\pardeftab720\li720\ri0\partightenfactor0
\ls4\ilvl0\cf4 YYYY-MM-DD\cell
\pard\intbl\itap1\pardeftab720\ri0\partightenfactor0
\ls4\ilvl0
\f1 \cf4 date: 2014-03-04
\f0\fs22 \cell \row
\itap1\trowd \taflags1 \trgaph108\trleft-108 \trwWidth12500\trftsWidth2 \trbrdrl\brdrs\brdrw10\brdrcf0 \trbrdrr\brdrs\brdrw10\brdrcf0
\clvertalt \clshdrawnil \clbrdrt\brdrs\brdrw10\brdrcf6 \clbrdrl\brdrs\brdrw10\brdrcf6 \clbrdrb\brdrs\brdrw10\brdrcf6 \clbrdrr\brdrs\brdrw10\brdrcf6 \clpadt72 \clpadl72 \clpadb72 \clpadr72 \gaph\cellx2880
\clvertalt \clshdrawnil \clbrdrt\brdrs\brdrw10\brdrcf6 \clbrdrl\brdrs\brdrw10\brdrcf6 \clbrdrb\brdrs\brdrw10\brdrcf6 \clbrdrr\brdrs\brdrw10\brdrcf6 \clpadt72 \clpadl72 \clpadb72 \clpadr72 \gaph\cellx5760
\clvertalt \clshdrawnil \clbrdrt\brdrs\brdrw10\brdrcf6 \clbrdrl\brdrs\brdrw10\brdrcf6 \clbrdrb\brdrs\brdrw10\brdrcf6 \clbrdrr\brdrs\brdrw10\brdrcf6 \clpadt72 \clpadl72 \clpadb72 \clpadr72 \gaph\cellx8640
\pard\intbl\itap1\pardeftab720\ri0\partightenfactor0
\ls4\ilvl0
\f1\fs18 \cf4 title
\f0\fs22 \cell
\pard\intbl\itap1\pardeftab720\ri0\partightenfactor0
\ls4\ilvl0
\fs18 \cf4 The title of the post, as it should be seen on screen and on Google.
\fs22 \cell
\pard\intbl\itap1\pardeftab720\ri0\partightenfactor0
\ls4\ilvl0
\f1\fs18 \cf4 title: "Introducing openFDA"
\f0\fs22 \cell \row
\itap1\trowd \taflags1 \trgaph108\trleft-108 \trwWidth12500\trftsWidth2 \trbrdrl\brdrs\brdrw10\brdrcf0 \trbrdrr\brdrs\brdrw10\brdrcf0
\clvertalt \clshdrawnil \clbrdrt\brdrs\brdrw10\brdrcf6 \clbrdrl\brdrs\brdrw10\brdrcf6 \clbrdrb\brdrs\brdrw10\brdrcf6 \clbrdrr\brdrs\brdrw10\brdrcf6 \clpadt72 \clpadl72 \clpadb72 \clpadr72 \gaph\cellx2880
\clvertalt \clshdrawnil \clbrdrt\brdrs\brdrw10\brdrcf6 \clbrdrl\brdrs\brdrw10\brdrcf6 \clbrdrb\brdrs\brdrw10\brdrcf6 \clbrdrr\brdrs\brdrw10\brdrcf6 \clpadt72 \clpadl72 \clpadb72 \clpadr72 \gaph\cellx5760
\clvertalt \clshdrawnil \clbrdrt\brdrs\brdrw10\brdrcf6 \clbrdrl\brdrs\brdrw10\brdrcf6 \clbrdrb\brdrs\brdrw10\brdrcf6 \clbrdrr\brdrs\brdrw10\brdrcf6 \clpadt72 \clpadl72 \clpadb72 \clpadr72 \gaph\cellx8640
\pard\intbl\itap1\pardeftab720\ri0\partightenfactor0
\ls4\ilvl0
\f1\fs18 \cf4 authors:
\f0\fs22 \cell
\pard\intbl\itap1\pardeftab720\ri0\partightenfactor0
\ls4\ilvl0
\fs18 \cf4 A YAML list of the authors of the post, their names and/or titles should be seen on screen. If there is only one author, it still must be a list, but with only one item.
\fs22 \cell
\pard\intbl\itap1\pardeftab720\ri0\sa200\partightenfactor0
\ls4\ilvl0
\f1\fs18 \cf4 authors:\uc0\u8232 - "Jane Doe, MS"\u8232 - "Dr. So-and-so Person"
\f0\fs22 \
\ls4\ilvl0
\f1\fs18 authors:\uc0\u8232 - "Sole Author"\cell \row
\itap1\trowd \taflags1 \trgaph108\trleft-108 \trwWidth12500\trftsWidth2 \trbrdrl\brdrs\brdrw10\brdrcf0 \trbrdrb\brdrs\brdrw10\brdrcf0 \trbrdrr\brdrs\brdrw10\brdrcf0
\clvertalt \clshdrawnil \clbrdrt\brdrs\brdrw10\brdrcf6 \clbrdrl\brdrs\brdrw10\brdrcf6 \clbrdrb\brdrs\brdrw10\brdrcf6 \clbrdrr\brdrs\brdrw10\brdrcf6 \clpadt72 \clpadl72 \clpadb72 \clpadr72 \gaph\cellx2880
\clvertalt \clshdrawnil \clbrdrt\brdrs\brdrw10\brdrcf6 \clbrdrl\brdrs\brdrw10\brdrcf6 \clbrdrb\brdrs\brdrw10\brdrcf6 \clbrdrr\brdrs\brdrw10\brdrcf6 \clpadt72 \clpadl72 \clpadb72 \clpadr72 \gaph\cellx5760
\clvertalt \clshdrawnil \clbrdrt\brdrs\brdrw10\brdrcf6 \clbrdrl\brdrs\brdrw10\brdrcf6 \clbrdrb\brdrs\brdrw10\brdrcf6 \clbrdrr\brdrs\brdrw10\brdrcf6 \clpadt72 \clpadl72 \clpadb72 \clpadr72 \gaph\cellx8640
\pard\intbl\itap1\pardeftab720\ri0\partightenfactor0
\ls4\ilvl0\cf4 ---
\f0\fs22 \cell
\pard\intbl\itap1\pardeftab720\ri0\partightenfactor0
\ls4\ilvl0
\fs18 \cf4 Required to demarcate the end of the meta fields.
\fs22 \cell
\pard\intbl\itap1\pardeftab720\ri0\sa200\partightenfactor0
\ls4\ilvl0\cf4 \cell \lastrow\row
\pard\pardeftab720\ri0\sl276\slmult1\sb200\partightenfactor0
\ls4\ilvl0
\fs30 \cf2 \
\pard\pardeftab720\ri0\sl276\slmult1\sb200\sa200\partightenfactor0
\ls4\ilvl0
\fs34 \cf3 Configuration file markup\
\pard\pardeftab720\ri0\sl276\slmult1\sa200\partightenfactor0
\ls4\ilvl0
\fs22 \cf4 These files (e.g.
\b _content.yaml
\b0 ) are processed by the site generation code to \'93automatically\'94 create rich pages on the openFDA site. They are designed to be relatively easily editable by someone with little to no programming background. They are usually written in YAML, with some markdown syntax for text markup (e.g. to make text bold, to specify a heading, or to add a link). You should be familiar with both YAML and markdown before editing these files\'97the syntax is straightforward, but it
\i is
\i0 specific and needs to be followed precisely.\
Look at existing files for existing endpoints if you want to learn more about how these files are organized, and how YAML and markdown are used to generate pages.\
\pard\pardeftab720\ri0\sl276\slmult1\sb200\partightenfactor0
\ls4\ilvl0
\fs30 \cf2 _content.yaml\
\pard\pardeftab720\ri0\sl276\slmult1\sa200\partightenfactor0
\ls4\ilvl0
\fs22 \cf4 The content for an \'93automatically-generated\'94 page on the site, such as an endpoint basics or reference page. This is processed to generate the page in question. The content must appear in the exact order that you want it to appear on the openFDA website.\
\pard\pardeftab720\ri0\sl276\slmult1\sa200\partightenfactor0
\ls4\ilvl0
\b \cf4 This is a YAML list.
\b0 The processing code looks at each item in the list in order, determines what it is, and adds it to the page. Each item on the page\'97a heading, a paragraph, a disclaimer box, an interactive API query, an image, a snippet of code, a downloads box, an API key generation widget, or other item\'97is its own list item.
\b \
\pard\pardeftab720\ri0\sl276\slmult1\sa200\partightenfactor0
\ls4\ilvl0
\b0 \cf4 Each item must begin with a dash \cf7 -\cf4 , then a space \cf7 \'a0\cf4 . For more information, see {\field{\*\fldinst{HYPERLINK "https://docs.saltstack.com/en/latest/topics/yaml/#rule-three-dashes"}}{\fldrslt \cf5 \ul \ulc5 YAML list syntax.}}\
\pard\pardeftab720\ri0\sl276\slmult1\sb160\sa200\partightenfactor0
\ls4\ilvl0
\fs26 \cf2 Example\
\itap1\trowd \taflags1 \trgaph108\trleft-108 \trwWidth12500\trftsWidth2 \trbrdrt\brdrs\brdrw10\brdrcf0 \trbrdrl\brdrs\brdrw10\brdrcf0 \trbrdrb\brdrs\brdrw10\brdrcf0 \trbrdrr\brdrs\brdrw10\brdrcf0
\clvertalt \clcbpat9 \clbrdrt\brdrs\brdrw10\brdrcf9 \clbrdrl\brdrs\brdrw10\brdrcf9 \clbrdrb\brdrs\brdrw10\brdrcf9 \clbrdrr\brdrs\brdrw10\brdrcf9 \clpadt144 \clpadl144 \clpadb144 \clpadr144 \gaph\cellx8640
\pard\intbl\itap1\pardeftab720\ri0\partightenfactor0
\ls4\ilvl0
\f1\fs22 \cf8 - "## About"
\f0 \cf4 \
\ls4\ilvl0
\f1 \cf8 - "The openFDA drug adverse event API returns data from the [FDA Adverse Event Reporting System (FAERS)]('/data/faers'), a database that contains information on adverse event and medication error reports submitted to FDA. Currently, this data covers publically releasable records submitted to the FDA from 2004-2013. The data is updated quarterly."\
- \cf7 disclaimer:\cf8 \
- "FAERS data does have limitations. There is no certainty that the reported event (adverse event or medication error) was actually due to the product. FDA does not require that a causal relationship between a product and event be proven, and reports do not always contain enough detail to properly evaluate an event."\
- \cf7 gettingStarted\cf8 \
- "### Downloads"\
- \cf7 downloads\cf8 \
- \cf7 example:\cf8 header\
- \cf7 fields:\cf8 \
- safetyreportid\
- safetyreportversion\
- receivedate\
- "### Remember"\
- \cf7 ul:\cf8 \
- "Drug adverse event reports may list multiple drugs."\
- "It is not possible to make a causal connection between a reaction and a specific drug product from the data in a single adverse event report."\
- \cf7 ol:\cf8 \
- "Get your API key."\
- "Learn the endpoint."\
- "Expore the data."\
- \cf7 queryExplorer: \cf8 oneEvent\cell \lastrow\row
\pard\pardeftab720\ri0\sl276\slmult1\sa200\partightenfactor0
\ls4\ilvl0
\f0 \cf4 \
\pard\pardeftab720\ri0\sl276\slmult1\sb160\sa200\partightenfactor0
\ls4\ilvl0
\fs26 \cf2 How the above example would be processed\
\pard\pardeftab720\ri0\sl276\slmult1\sa200\partightenfactor0
\ls4\ilvl0
\fs22 \cf4 The code looks at each item beginning with a dash \cf7 -\cf4 and processes them in the following ways:\
\pard\pardeftab720\ri0\partightenfactor0
\ls4\ilvl0
\f1 \cf8 - "## About"\
\pard\pardeftab720\ri0\sb200\sa200\partightenfactor0
\ls4\ilvl0
\f0 \cf4 Becomes a 2nd-level heading (an H2 HTML tag).\
\pard\pardeftab720\ri0\partightenfactor0
\ls4\ilvl0
\f1 \cf8 - "The openFDA drug adverse event API returns data from the [FDA Adverse Event Reporting System (FAERS)]('/data/faers'), a database that contains information on adverse event and medication error reports submitted to FDA. Currently, this data covers publically releasable records submitted to the FDA from 2004-2013. The data is updated quarterly."\
\pard\pardeftab720\ri0\sb200\sa200\partightenfactor0
\ls4\ilvl0
\f0 \cf4 Becomes an ordinary paragraph. This paragraph contains a link to the FAERS page on the openFDA website.\
\pard\pardeftab720\ri0\partightenfactor0
\ls4\ilvl0
\f1 \cf8 - \cf7 disclaimer:\cf8 \
- "FAERS data does have limitations. There is no certainty that the reported event (adverse event or medication error) was actually due to the product. FDA does not require that a causal relationship between a product and event be proven, and reports do not always contain enough detail to properly evaluate an event."\
\pard\pardeftab720\ri0\sb200\sa200\partightenfactor0
\ls4\ilvl0
\f0 \cf4 Becomes a disclaimer box with one subparagraph.\
\pard\pardeftab720\ri0\partightenfactor0
\ls4\ilvl0
\f1 \cf8 - \cf7 gettingStarted\cf8 \
\pard\pardeftab720\ri0\sb200\sa200\partightenfactor0
\ls4\ilvl0
\f0 \cf4 Becomes an API key generation box, which includes a passing reference to the endpoint
\b drug/event.
\b0 \
\pard\pardeftab720\ri0\partightenfactor0
\ls4\ilvl0
\f1 \cf8 - "### Downloads"\
\pard\pardeftab720\ri0\sb200\sa200\partightenfactor0
\ls4\ilvl0
\f0 \cf4 Becomes a 3rd-level heading (an H3 HTML tag).\
\pard\pardeftab720\ri0\partightenfactor0
\ls4\ilvl0
\f1 \cf8 - \cf7 downloads\cf8 \
\pard\pardeftab720\ri0\sb200\sa200\partightenfactor0
\ls4\ilvl0
\f0 \cf4 Becomes a downloads box for the data in the endpoint
\b drug/event.
\b0 \
\pard\pardeftab720\ri0\partightenfactor0
\ls4\ilvl0
\f1 \cf8 - \cf7 example:\cf8 header\
\pard\pardeftab720\ri0\sb200\sa200\partightenfactor0
\ls4\ilvl0
\f0 \cf4 Becomes a JSON code example (snippet) drawn from the
\b header
\b0 object in the file _
\b examples.json
\b0 for this endpoint.\
\pard\pardeftab720\ri0\partightenfactor0
\ls4\ilvl0
\f1 \cf8 - \cf7 fields:\cf8 \
- safetyreportid\
- safetyreportversion\
- receivedate\
\pard\pardeftab720\ri0\sb200\sa200\partightenfactor0
\ls4\ilvl0
\f0 \cf4 Becomes field-by-field documentation for the three specified fields in the file
\b _fields.yaml
\b0 for this endpoint.\
\pard\pardeftab720\ri0\partightenfactor0
\ls4\ilvl0
\f1 \cf8 - "### Remember"\
\pard\pardeftab720\ri0\sb200\sa200\partightenfactor0
\ls4\ilvl0
\f0 \cf4 Becomes a 3rd-level heading (an H3 HTML tag).\
\pard\pardeftab720\ri0\partightenfactor0
\ls4\ilvl0
\f1 \cf8 - \cf7 ul:\cf8 \
- "Drug adverse event reports may list multiple drugs."\
- "It is not possible to make a causal connection between a reaction and a specific drug product from the data in a single adverse event report."\
\pard\pardeftab720\ri0\sb200\sa200\partightenfactor0
\ls4\ilvl0
\f0 \cf4 Becomes an unordered (bulleted) list with 2 items.\
\pard\pardeftab720\ri0\partightenfactor0
\ls4\ilvl0
\f1 \cf8 - \cf7 ol:\cf8 \
- "Get your API key."\
- "Learn the endpoint."\
- "Expore the data."\
\pard\pardeftab720\ri0\sb200\sa200\partightenfactor0
\ls4\ilvl0
\f0 \cf4 Becomes an ordered (numbered) list with 3 numbered items.\
\pard\pardeftab720\ri0\partightenfactor0
\ls4\ilvl0
\f1 \cf8 - \cf7 queryExplorer: \cf8 oneEvent\
\pard\pardeftab720\ri0\sb200\sa200\partightenfactor0
\ls4\ilvl0
\f0 \cf4 Looks in the
\b _explorers.yaml
\b0 for the item called
\b oneEvent
\b0 , and turns that into an interactive query explorer panel.\
\pard\pardeftab720\ri0\sl276\slmult1\sb160\sa200\partightenfactor0
\ls4\ilvl0
\fs26 \cf2 Elements\
\itap1\trowd \taflags1 \trgaph108\trleft-108 \trwWidth12500\trftsWidth2 \trbrdrt\brdrs\brdrw10\brdrcf0 \trbrdrl\brdrs\brdrw10\brdrcf0 \trbrdrr\brdrs\brdrw10\brdrcf0
\clvertalt \clshdrawnil \clbrdrt\brdrs\brdrw10\brdrcf6 \clbrdrl\brdrs\brdrw10\brdrcf6 \clbrdrb\brdrs\brdrw10\brdrcf6 \clbrdrr\brdrs\brdrw10\brdrcf6 \clpadt72 \clpadl72 \clpadb72 \clpadr72 \gaph\cellx2160
\clvertalt \clshdrawnil \clbrdrt\brdrs\brdrw10\brdrcf6 \clbrdrl\brdrs\brdrw10\brdrcf6 \clbrdrb\brdrs\brdrw10\brdrcf6 \clbrdrr\brdrs\brdrw10\brdrcf6 \clpadt72 \clpadl72 \clpadb72 \clpadr72 \gaph\cellx4320
\clvertalt \clshdrawnil \clbrdrt\brdrs\brdrw10\brdrcf6 \clbrdrl\brdrs\brdrw10\brdrcf6 \clbrdrb\brdrs\brdrw10\brdrcf6 \clbrdrr\brdrs\brdrw10\brdrcf6 \clpadt72 \clpadl72 \clpadb72 \clpadr72 \gaph\cellx6480
\clvertalt \clshdrawnil \clbrdrt\brdrs\brdrw10\brdrcf6 \clbrdrl\brdrs\brdrw10\brdrcf6 \clbrdrb\brdrs\brdrw10\brdrcf6 \clbrdrr\brdrs\brdrw10\brdrcf6 \clpadt72 \clpadl72 \clpadb72 \clpadr72 \gaph\cellx8640
\pard\intbl\itap1\pardeftab720\ri0\partightenfactor0
\ls4\ilvl0
\fs18 \cf3 Element
\fs22 \cf4 \cell
\pard\intbl\itap1\pardeftab720\ri0\partightenfactor0
\ls4\ilvl0
\fs18 \cf3 Type
\fs22 \cf4 \cell
\pard\intbl\itap1\pardeftab720\ri0\partightenfactor0
\ls4\ilvl0
\fs18 \cf3 Description
\fs22 \cf4 \cell
\pard\intbl\itap1\pardeftab720\ri0\partightenfactor0
\ls4\ilvl0
\fs18 \cf3 Examples
\fs22 \cf4 \cell \row
\itap1\trowd \taflags1 \trgaph108\trleft-108 \trwWidth12500\trftsWidth2 \trbrdrl\brdrs\brdrw10\brdrcf0 \trbrdrr\brdrs\brdrw10\brdrcf0
\clvertalt \clshdrawnil \clbrdrt\brdrs\brdrw10\brdrcf6 \clbrdrl\brdrs\brdrw10\brdrcf6 \clbrdrb\brdrs\brdrw10\brdrcf6 \clbrdrr\brdrs\brdrw10\brdrcf6 \clpadt72 \clpadl72 \clpadb72 \clpadr72 \gaph\cellx2160
\clvertalt \clshdrawnil \clbrdrt\brdrs\brdrw10\brdrcf6 \clbrdrl\brdrs\brdrw10\brdrcf6 \clbrdrb\brdrs\brdrw10\brdrcf6 \clbrdrr\brdrs\brdrw10\brdrcf6 \clpadt72 \clpadl72 \clpadb72 \clpadr72 \gaph\cellx4320
\clvertalt \clshdrawnil \clbrdrt\brdrs\brdrw10\brdrcf6 \clbrdrl\brdrs\brdrw10\brdrcf6 \clbrdrb\brdrs\brdrw10\brdrcf6 \clbrdrr\brdrs\brdrw10\brdrcf6 \clpadt72 \clpadl72 \clpadb72 \clpadr72 \gaph\cellx6480
\clvertalt \clshdrawnil \clbrdrt\brdrs\brdrw10\brdrcf6 \clbrdrl\brdrs\brdrw10\brdrcf6 \clbrdrb\brdrs\brdrw10\brdrcf6 \clbrdrr\brdrs\brdrw10\brdrcf6 \clpadt72 \clpadl72 \clpadb72 \clpadr72 \gaph\cellx8640
\pard\intbl\itap1\pardeftab720\ri0\partightenfactor0
\ls4\ilvl0
\f1\fs18 \cf4 -
\f0\fs22 \cell
\pard\intbl\itap1\pardeftab720\ri0\partightenfactor0
\ls4\ilvl0
\fs18 \cf4 paragraph or heading
\fs22 \cell
\pard\intbl\itap1\pardeftab720\ri0\partightenfactor0
\ls4\ilvl0
\fs18 \cf4 An ordinary paragraph of text, or a heading. Content must be contained within straight double-quotes \cf7 "\cf4 . This becomes a paragraph unless a heading level is specified using markdown.
\fs22 \cell
\pard\intbl\itap1\pardeftab720\ri0\partightenfactor0
\ls4\ilvl0
\f1\fs18 \cf4 - "This is a paragraph."
\f0\fs22 \
\ls4\ilvl0
\f1\fs18 - "## This is a 2nd-level heading"\cell \row
\itap1\trowd \taflags1 \trgaph108\trleft-108 \trwWidth12500\trftsWidth2 \trbrdrl\brdrs\brdrw10\brdrcf0 \trbrdrr\brdrs\brdrw10\brdrcf0
\clvertalt \clshdrawnil \clbrdrt\brdrs\brdrw10\brdrcf6 \clbrdrl\brdrs\brdrw10\brdrcf6 \clbrdrb\brdrs\brdrw10\brdrcf6 \clbrdrr\brdrs\brdrw10\brdrcf6 \clpadt72 \clpadl72 \clpadb72 \clpadr72 \gaph\cellx2160
\clvertalt \clshdrawnil \clbrdrt\brdrs\brdrw10\brdrcf6 \clbrdrl\brdrs\brdrw10\brdrcf6 \clbrdrb\brdrs\brdrw10\brdrcf6 \clbrdrr\brdrs\brdrw10\brdrcf6 \clpadt72 \clpadl72 \clpadb72 \clpadr72 \gaph\cellx4320
\clvertalt \clshdrawnil \clbrdrt\brdrs\brdrw10\brdrcf6 \clbrdrl\brdrs\brdrw10\brdrcf6 \clbrdrb\brdrs\brdrw10\brdrcf6 \clbrdrr\brdrs\brdrw10\brdrcf6 \clpadt72 \clpadl72 \clpadb72 \clpadr72 \gaph\cellx6480
\clvertalt \clshdrawnil \clbrdrt\brdrs\brdrw10\brdrcf6 \clbrdrl\brdrs\brdrw10\brdrcf6 \clbrdrb\brdrs\brdrw10\brdrcf6 \clbrdrr\brdrs\brdrw10\brdrcf6 \clpadt72 \clpadl72 \clpadb72 \clpadr72 \gaph\cellx8640
\pard\intbl\itap1\pardeftab720\ri0\partightenfactor0
\ls4\ilvl0\cf4 - disclaimer:
\f0\fs22 \cell
\pard\intbl\itap1\pardeftab720\ri0\partightenfactor0
\ls4\ilvl0
\fs18 \cf4 disclaimer box
\fs22 \cell
\pard\intbl\itap1\pardeftab720\ri0\partightenfactor0
\ls4\ilvl0
\fs18 \cf4 A box with a \'93Disclaimer\'94 title and 1 or more paragraphs of text. Each paragraph of text is its own list item underneath this disclaimer element, processed like a paragraph or heading element.
\fs22 \cell
\pard\intbl\itap1\pardeftab720\ri0\partightenfactor0
\ls4\ilvl0
\f1\fs18 \cf4 - disclaimer:
\f0\fs22 \
\ls4\ilvl0
\f1\fs18 - "This is a first disclaimer paragraph."\
- "This is a second disclaimer paragraph."\cell \row
\itap1\trowd \taflags1 \trgaph108\trleft-108 \trwWidth12500\trftsWidth2 \trbrdrl\brdrs\brdrw10\brdrcf0 \trbrdrr\brdrs\brdrw10\brdrcf0
\clvertalt \clshdrawnil \clbrdrt\brdrs\brdrw10\brdrcf6 \clbrdrl\brdrs\brdrw10\brdrcf6 \clbrdrb\brdrs\brdrw10\brdrcf6 \clbrdrr\brdrs\brdrw10\brdrcf6 \clpadt72 \clpadl72 \clpadb72 \clpadr72 \gaph\cellx2160
\clvertalt \clshdrawnil \clbrdrt\brdrs\brdrw10\brdrcf6 \clbrdrl\brdrs\brdrw10\brdrcf6 \clbrdrb\brdrs\brdrw10\brdrcf6 \clbrdrr\brdrs\brdrw10\brdrcf6 \clpadt72 \clpadl72 \clpadb72 \clpadr72 \gaph\cellx4320
\clvertalt \clshdrawnil \clbrdrt\brdrs\brdrw10\brdrcf6 \clbrdrl\brdrs\brdrw10\brdrcf6 \clbrdrb\brdrs\brdrw10\brdrcf6 \clbrdrr\brdrs\brdrw10\brdrcf6 \clpadt72 \clpadl72 \clpadb72 \clpadr72 \gaph\cellx6480
\clvertalt \clshdrawnil \clbrdrt\brdrs\brdrw10\brdrcf6 \clbrdrl\brdrs\brdrw10\brdrcf6 \clbrdrb\brdrs\brdrw10\brdrcf6 \clbrdrr\brdrs\brdrw10\brdrcf6 \clpadt72 \clpadl72 \clpadb72 \clpadr72 \gaph\cellx8640
\pard\intbl\itap1\pardeftab720\ri0\partightenfactor0
\ls4\ilvl0\cf4 - gettingStarted
\f0\fs22 \cell
\pard\intbl\itap1\pardeftab720\ri0\partightenfactor0
\ls4\ilvl0
\fs18 \cf4 API key box
\fs22 \cell
\pard\intbl\itap1\pardeftab720\ri0\partightenfactor0
\ls4\ilvl0
\fs18 \cf4 An API key generation form, which reminds users that they should get their own API key.
\fs22 \cell
\pard\intbl\itap1\pardeftab720\ri0\partightenfactor0
\ls4\ilvl0
\f1\fs18 \cf4 - gettingStarted
\f0\fs22 \cell \row
\itap1\trowd \taflags1 \trgaph108\trleft-108 \trwWidth12500\trftsWidth2 \trbrdrl\brdrs\brdrw10\brdrcf0 \trbrdrr\brdrs\brdrw10\brdrcf0
\clvertalt \clshdrawnil \clbrdrt\brdrs\brdrw10\brdrcf6 \clbrdrl\brdrs\brdrw10\brdrcf6 \clbrdrb\brdrs\brdrw10\brdrcf6 \clbrdrr\brdrs\brdrw10\brdrcf6 \clpadt72 \clpadl72 \clpadb72 \clpadr72 \gaph\cellx2160
\clvertalt \clshdrawnil \clbrdrt\brdrs\brdrw10\brdrcf6 \clbrdrl\brdrs\brdrw10\brdrcf6 \clbrdrb\brdrs\brdrw10\brdrcf6 \clbrdrr\brdrs\brdrw10\brdrcf6 \clpadt72 \clpadl72 \clpadb72 \clpadr72 \gaph\cellx4320
\clvertalt \clshdrawnil \clbrdrt\brdrs\brdrw10\brdrcf6 \clbrdrl\brdrs\brdrw10\brdrcf6 \clbrdrb\brdrs\brdrw10\brdrcf6 \clbrdrr\brdrs\brdrw10\brdrcf6 \clpadt72 \clpadl72 \clpadb72 \clpadr72 \gaph\cellx6480
\clvertalt \clshdrawnil \clbrdrt\brdrs\brdrw10\brdrcf6 \clbrdrl\brdrs\brdrw10\brdrcf6 \clbrdrb\brdrs\brdrw10\brdrcf6 \clbrdrr\brdrs\brdrw10\brdrcf6 \clpadt72 \clpadl72 \clpadb72 \clpadr72 \gaph\cellx8640
\pard\intbl\itap1\pardeftab720\ri0\partightenfactor0
\ls4\ilvl0
\f1\fs18 \cf4 - downloads
\f0\fs22 \cell
\pard\intbl\itap1\pardeftab720\ri0\partightenfactor0
\ls4\ilvl0
\fs18 \cf4 downloads box
\fs22 \cell
\pard\intbl\itap1\pardeftab720\ri0\partightenfactor0
\ls4\ilvl0
\fs18 \cf4 A downloads box for the current endpoint. The downloads box will make a call to the open.fda.gov download endpoint and get a list of all the files available for download, and display them in the downloads box.
\fs22 \cell
\pard\intbl\itap1\pardeftab720\ri0\sa200\partightenfactor0
\ls4\ilvl0
\f1\fs18 \cf4 - downloads
\f0\fs22 \cell \row
\itap1\trowd \taflags1 \trgaph108\trleft-108 \trwWidth12500\trftsWidth2 \trbrdrl\brdrs\brdrw10\brdrcf0 \trbrdrr\brdrs\brdrw10\brdrcf0
\clvertalt \clshdrawnil \clbrdrt\brdrs\brdrw10\brdrcf6 \clbrdrl\brdrs\brdrw10\brdrcf6 \clbrdrb\brdrs\brdrw10\brdrcf6 \clbrdrr\brdrs\brdrw10\brdrcf6 \clpadt72 \clpadl72 \clpadb72 \clpadr72 \gaph\cellx2160
\clvertalt \clshdrawnil \clbrdrt\brdrs\brdrw10\brdrcf6 \clbrdrl\brdrs\brdrw10\brdrcf6 \clbrdrb\brdrs\brdrw10\brdrcf6 \clbrdrr\brdrs\brdrw10\brdrcf6 \clpadt72 \clpadl72 \clpadb72 \clpadr72 \gaph\cellx4320
\clvertalt \clshdrawnil \clbrdrt\brdrs\brdrw10\brdrcf6 \clbrdrl\brdrs\brdrw10\brdrcf6 \clbrdrb\brdrs\brdrw10\brdrcf6 \clbrdrr\brdrs\brdrw10\brdrcf6 \clpadt72 \clpadl72 \clpadb72 \clpadr72 \gaph\cellx6480
\clvertalt \clshdrawnil \clbrdrt\brdrs\brdrw10\brdrcf6 \clbrdrl\brdrs\brdrw10\brdrcf6 \clbrdrb\brdrs\brdrw10\brdrcf6 \clbrdrr\brdrs\brdrw10\brdrcf6 \clpadt72 \clpadl72 \clpadb72 \clpadr72 \gaph\cellx8640
\pard\intbl\itap1\pardeftab720\ri0\partightenfactor0
\ls4\ilvl0
\f1\fs18 \cf4 - example:
\f0\fs22 \cell
\pard\intbl\itap1\pardeftab720\ri0\partightenfactor0
\ls4\ilvl0
\fs18 \cf4 code snippet/ example
\fs22 \cell
\pard\intbl\itap1\pardeftab720\ri0\partightenfactor0
\ls4\ilvl0
\fs18 \cf4 A code snippet box for the specified example. The example must be a valid object path in the file
\b _examples.json
\b0 for the current endpoint.
\fs22 \cell
\pard\intbl\itap1\pardeftab720\ri0\sa200\partightenfactor0
\ls4\ilvl0
\f1\fs18 \cf4 - example: header
\f0\fs22 \
\ls4\ilvl0
\f1\fs18 - example: patient.drug.openfda\cell \row
\itap1\trowd \taflags1 \trgaph108\trleft-108 \trwWidth12500\trftsWidth2 \trbrdrl\brdrs\brdrw10\brdrcf0 \trbrdrr\brdrs\brdrw10\brdrcf0
\clvertalt \clshdrawnil \clbrdrt\brdrs\brdrw10\brdrcf6 \clbrdrl\brdrs\brdrw10\brdrcf6 \clbrdrb\brdrs\brdrw10\brdrcf6 \clbrdrr\brdrs\brdrw10\brdrcf6 \clpadt72 \clpadl72 \clpadb72 \clpadr72 \gaph\cellx2160
\clvertalt \clshdrawnil \clbrdrt\brdrs\brdrw10\brdrcf6 \clbrdrl\brdrs\brdrw10\brdrcf6 \clbrdrb\brdrs\brdrw10\brdrcf6 \clbrdrr\brdrs\brdrw10\brdrcf6 \clpadt72 \clpadl72 \clpadb72 \clpadr72 \gaph\cellx4320
\clvertalt \clshdrawnil \clbrdrt\brdrs\brdrw10\brdrcf6 \clbrdrl\brdrs\brdrw10\brdrcf6 \clbrdrb\brdrs\brdrw10\brdrcf6 \clbrdrr\brdrs\brdrw10\brdrcf6 \clpadt72 \clpadl72 \clpadb72 \clpadr72 \gaph\cellx6480
\clvertalt \clshdrawnil \clbrdrt\brdrs\brdrw10\brdrcf6 \clbrdrl\brdrs\brdrw10\brdrcf6 \clbrdrb\brdrs\brdrw10\brdrcf6 \clbrdrr\brdrs\brdrw10\brdrcf6 \clpadt72 \clpadl72 \clpadb72 \clpadr72 \gaph\cellx8640
\pard\intbl\itap1\pardeftab720\ri0\partightenfactor0
\ls4\ilvl0\cf4 - fields:
\f0\fs22 \cell
\pard\intbl\itap1\pardeftab720\ri0\partightenfactor0
\ls4\ilvl0
\fs18 \cf4 field documentation
\fs22 \cell
\pard\intbl\itap1\pardeftab720\ri0\partightenfactor0
\ls4\ilvl0
\fs18 \cf4 Tables with field-by-field documentation for the specified fields from the file
\b _fields.yaml
\b0 for the current endpoint. Each field must be a valid path respecting the hierarchy in
\b _fields.yaml.
\b0 1 or more fields must be specified.
\fs22 \cell
\pard\intbl\itap1\pardeftab720\ri0\partightenfactor0
\ls4\ilvl0
\f1\fs18 \cf4 - fields:
\f0\fs22 \
\ls4\ilvl0
\f1\fs18 - safetyreportid\
- patient.drug.reactionmedrapt\cell \row
\itap1\trowd \taflags1 \trgaph108\trleft-108 \trwWidth12500\trftsWidth2 \trbrdrl\brdrs\brdrw10\brdrcf0 \trbrdrr\brdrs\brdrw10\brdrcf0
\clvertalt \clshdrawnil \clbrdrt\brdrs\brdrw10\brdrcf6 \clbrdrl\brdrs\brdrw10\brdrcf6 \clbrdrb\brdrs\brdrw10\brdrcf6 \clbrdrr\brdrs\brdrw10\brdrcf6 \clpadt72 \clpadl72 \clpadb72 \clpadr72 \gaph\cellx2160
\clvertalt \clshdrawnil \clbrdrt\brdrs\brdrw10\brdrcf6 \clbrdrl\brdrs\brdrw10\brdrcf6 \clbrdrb\brdrs\brdrw10\brdrcf6 \clbrdrr\brdrs\brdrw10\brdrcf6 \clpadt72 \clpadl72 \clpadb72 \clpadr72 \gaph\cellx4320
\clvertalt \clshdrawnil \clbrdrt\brdrs\brdrw10\brdrcf6 \clbrdrl\brdrs\brdrw10\brdrcf6 \clbrdrb\brdrs\brdrw10\brdrcf6 \clbrdrr\brdrs\brdrw10\brdrcf6 \clpadt72 \clpadl72 \clpadb72 \clpadr72 \gaph\cellx6480
\clvertalt \clshdrawnil \clbrdrt\brdrs\brdrw10\brdrcf6 \clbrdrl\brdrs\brdrw10\brdrcf6 \clbrdrb\brdrs\brdrw10\brdrcf6 \clbrdrr\brdrs\brdrw10\brdrcf6 \clpadt72 \clpadl72 \clpadb72 \clpadr72 \gaph\cellx8640
\pard\intbl\itap1\pardeftab720\ri0\partightenfactor0
\ls4\ilvl0\cf4 - ul:
\f0\fs22 \cell
\pard\intbl\itap1\pardeftab720\ri0\partightenfactor0
\ls4\ilvl0
\fs18 \cf4 unordered list
\fs22 \cell
\pard\intbl\itap1\pardeftab720\ri0\partightenfactor0
\ls4\ilvl0
\fs18 \cf4 An unordered (bulleted) list. Each item underneath this ul element becomes a list item, processed like a paragraph or heading element.
\fs22 \cell
\pard\intbl\itap1\pardeftab720\ri0\partightenfactor0
\ls4\ilvl0
\f1\fs18 \cf4 - ul:
\f0\fs22 \
\ls4\ilvl0
\f1\fs18 - "Item."\
- "Another item."\cell \row
\itap1\trowd \taflags1 \trgaph108\trleft-108 \trwWidth12500\trftsWidth2 \trbrdrl\brdrs\brdrw10\brdrcf0 \trbrdrr\brdrs\brdrw10\brdrcf0
\clvertalt \clshdrawnil \clbrdrt\brdrs\brdrw10\brdrcf6 \clbrdrl\brdrs\brdrw10\brdrcf6 \clbrdrb\brdrs\brdrw10\brdrcf6 \clbrdrr\brdrs\brdrw10\brdrcf6 \clpadt72 \clpadl72 \clpadb72 \clpadr72 \gaph\cellx2160
\clvertalt \clshdrawnil \clbrdrt\brdrs\brdrw10\brdrcf6 \clbrdrl\brdrs\brdrw10\brdrcf6 \clbrdrb\brdrs\brdrw10\brdrcf6 \clbrdrr\brdrs\brdrw10\brdrcf6 \clpadt72 \clpadl72 \clpadb72 \clpadr72 \gaph\cellx4320
\clvertalt \clshdrawnil \clbrdrt\brdrs\brdrw10\brdrcf6 \clbrdrl\brdrs\brdrw10\brdrcf6 \clbrdrb\brdrs\brdrw10\brdrcf6 \clbrdrr\brdrs\brdrw10\brdrcf6 \clpadt72 \clpadl72 \clpadb72 \clpadr72 \gaph\cellx6480
\clvertalt \clshdrawnil \clbrdrt\brdrs\brdrw10\brdrcf6 \clbrdrl\brdrs\brdrw10\brdrcf6 \clbrdrb\brdrs\brdrw10\brdrcf6 \clbrdrr\brdrs\brdrw10\brdrcf6 \clpadt72 \clpadl72 \clpadb72 \clpadr72 \gaph\cellx8640
\pard\intbl\itap1\pardeftab720\ri0\partightenfactor0
\ls4\ilvl0\cf4 - ol:
\f0\fs22 \cell
\pard\intbl\itap1\pardeftab720\ri0\partightenfactor0
\ls4\ilvl0
\fs18 \cf4 ordered list
\fs22 \cell
\pard\intbl\itap1\pardeftab720\ri0\partightenfactor0
\ls4\ilvl0
\fs18 \cf4 An ordered (numbered) list. Each item underneath this ol element becomes a list item, processed like a paragraph or heading element.
\fs22 \cell
\pard\intbl\itap1\pardeftab720\ri0\partightenfactor0
\ls4\ilvl0
\f1\fs18 \cf4 - ol:
\f0\fs22 \
\ls4\ilvl0
\f1\fs18 - "Item 1."\
- "Item 2."\
- "Item 3."\cell \row
\itap1\trowd \taflags1 \trgaph108\trleft-108 \trwWidth12500\trftsWidth2 \trbrdrl\brdrs\brdrw10\brdrcf0 \trbrdrb\brdrs\brdrw10\brdrcf0 \trbrdrr\brdrs\brdrw10\brdrcf0
\clvertalt \clshdrawnil \clbrdrt\brdrs\brdrw10\brdrcf6 \clbrdrl\brdrs\brdrw10\brdrcf6 \clbrdrb\brdrs\brdrw10\brdrcf6 \clbrdrr\brdrs\brdrw10\brdrcf6 \clpadt72 \clpadl72 \clpadb72 \clpadr72 \gaph\cellx2160
\clvertalt \clshdrawnil \clbrdrt\brdrs\brdrw10\brdrcf6 \clbrdrl\brdrs\brdrw10\brdrcf6 \clbrdrb\brdrs\brdrw10\brdrcf6 \clbrdrr\brdrs\brdrw10\brdrcf6 \clpadt72 \clpadl72 \clpadb72 \clpadr72 \gaph\cellx4320
\clvertalt \clshdrawnil \clbrdrt\brdrs\brdrw10\brdrcf6 \clbrdrl\brdrs\brdrw10\brdrcf6 \clbrdrb\brdrs\brdrw10\brdrcf6 \clbrdrr\brdrs\brdrw10\brdrcf6 \clpadt72 \clpadl72 \clpadb72 \clpadr72 \gaph\cellx6480
\clvertalt \clshdrawnil \clbrdrt\brdrs\brdrw10\brdrcf6 \clbrdrl\brdrs\brdrw10\brdrcf6 \clbrdrb\brdrs\brdrw10\brdrcf6 \clbrdrr\brdrs\brdrw10\brdrcf6 \clpadt72 \clpadl72 \clpadb72 \clpadr72 \gaph\cellx8640
\pard\intbl\itap1\pardeftab720\ri0\partightenfactor0
\ls4\ilvl0\cf4 - queryExplorer
\f0\fs22 \cell
\pard\intbl\itap1\pardeftab720\ri0\partightenfactor0
\ls4\ilvl0
\fs18 \cf4 query explorer tool
\fs22 \cell
\pard\intbl\itap1\pardeftab720\ri0\partightenfactor0
\ls4\ilvl0
\fs18 \cf4 An interactive query tool from the
\b _explorers.yaml,
\b0 which is named here.
\fs22 \cell
\pard\intbl\itap1\pardeftab720\ri0\partightenfactor0
\ls4\ilvl0
\f1\fs18 \cf4 - queryExplorer: oneEvent
\f0\fs22 \cell \lastrow\row
\pard\pardeftab720\ri0\sl276\slmult1\sb200\partightenfactor0
\ls4\ilvl0
\fs30 \cf2 \
\pard\pardeftab720\ri0\sl276\slmult1\sb200\partightenfactor0
\ls4\ilvl0
\fs22 \cf4 \
\pard\pardeftab720\ri0\sl276\slmult1\sb200\partightenfactor0
\ls4\ilvl0
\fs30 \cf2 _explorers.yaml\
\pard\pardeftab720\ri0\sl276\slmult1\sa200\partightenfactor0
\ls4\ilvl0
\fs22 \cf4 Each item in this list is a named "panel" that will show the user a single API query and present the response in a box. It's the way that programmers can learn about the actual API returns.\
These are typically used on the endpoint basics pages and on API reference pages.\
\pard\pardeftab720\ri0\sl276\slmult1\sb160\sa200\partightenfactor0
\ls4\ilvl0
\fs26 \cf2 Example\
\itap1\trowd \taflags1 \trgaph108\trleft-108 \trwWidth12500\trftsWidth2 \trbrdrt\brdrs\brdrw10\brdrcf0 \trbrdrl\brdrs\brdrw10\brdrcf0 \trbrdrb\brdrs\brdrw10\brdrcf0 \trbrdrr\brdrs\brdrw10\brdrcf0
\clvertalt \clcbpat9 \clbrdrt\brdrs\brdrw10\brdrcf9 \clbrdrl\brdrs\brdrw10\brdrcf9 \clbrdrb\brdrs\brdrw10\brdrcf9 \clbrdrr\brdrs\brdrw10\brdrcf9 \clpadt144 \clpadl144 \clpadb144 \clpadr144 \gaph\cellx8640
\pard\intbl\itap1\pardeftab720\ri0\partightenfactor0
\ls4\ilvl0
\f1\fs22 \cf7 oneReport:
\f0 \cf4 \
\ls4\ilvl0
\f1 \cf7 title:\cf8 One enforcement report\cf7 \
description:\
\cf8 - "This query searches for all records in a certain date range, and asks for a single one."\cf7 \
\pard\intbl\itap1\pardeftab720\ri0\partightenfactor0
\ls4\ilvl0\cf8 - "See the [reference](/drug/enforcement/reference/) for more about report_date. Brackets `[ ]` are used to specify a range for date, number, or string fields."\
\pard\intbl\itap1\pardeftab720\ri0\partightenfactor0
\ls4\ilvl0\cf7 params:\
\cf8 - "Search for all records with report_date between Jan 01, 2004 and Dec 31, 2013."\cf7 \
\pard\intbl\itap1\pardeftab720\ri0\partightenfactor0
\ls4\ilvl0\cf8 - "Limit to 1 record."\
\pard\intbl\itap1\pardeftab720\ri0\partightenfactor0
\ls4\ilvl0\cf7 query: \cf8 'https://api.fda.gov/drug/enforcement.json?search=report_date:[20040101+TO+20131231]&limit=1'\cf7 \cell \lastrow\row
\pard\pardeftab720\ri0\sl276\slmult1\sa200\partightenfactor0
\ls4\ilvl0
\f0 \cf4 \
As with all YAML configuration files, the structure of this one is important and must be followed precisely. Each panel is nested under a name, written in
\i camelCase
\i0 \'97in this example, it's called
\b oneReport
\b0 which is how it would be referred to in the
\b _content.yaml
\b0 : i.e.
\f1 \cf7 queryExplorer: \cf8 oneReport
\f0 \cf4 \
\pard\pardeftab720\ri0\sl276\slmult1\sb160\sa200\partightenfactor0
\ls4\ilvl0
\fs26 \cf2 Elements\
\itap1\trowd \taflags1 \trgaph108\trleft-108 \trwWidth12500\trftsWidth2 \trbrdrt\brdrs\brdrw10\brdrcf0 \trbrdrl\brdrs\brdrw10\brdrcf0 \trbrdrr\brdrs\brdrw10\brdrcf0
\clvertalt \clshdrawnil \clbrdrt\brdrs\brdrw10\brdrcf6 \clbrdrl\brdrs\brdrw10\brdrcf6 \clbrdrb\brdrs\brdrw10\brdrcf6 \clbrdrr\brdrs\brdrw10\brdrcf6 \clpadt72 \clpadl72 \clpadb72 \clpadr72 \gaph\cellx2160
\clvertalt \clshdrawnil \clbrdrt\brdrs\brdrw10\brdrcf6 \clbrdrl\brdrs\brdrw10\brdrcf6 \clbrdrb\brdrs\brdrw10\brdrcf6 \clbrdrr\brdrs\brdrw10\brdrcf6 \clpadt72 \clpadl72 \clpadb72 \clpadr72 \gaph\cellx4320
\clvertalt \clshdrawnil \clbrdrt\brdrs\brdrw10\brdrcf6 \clbrdrl\brdrs\brdrw10\brdrcf6 \clbrdrb\brdrs\brdrw10\brdrcf6 \clbrdrr\brdrs\brdrw10\brdrcf6 \clpadt72 \clpadl72 \clpadb72 \clpadr72 \gaph\cellx6480
\clvertalt \clshdrawnil \clbrdrt\brdrs\brdrw10\brdrcf6 \clbrdrl\brdrs\brdrw10\brdrcf6 \clbrdrb\brdrs\brdrw10\brdrcf6 \clbrdrr\brdrs\brdrw10\brdrcf6 \clpadt72 \clpadl72 \clpadb72 \clpadr72 \gaph\cellx8640
\pard\intbl\itap1\pardeftab720\ri0\partightenfactor0
\ls4\ilvl0
\fs18 \cf3 Field
\fs22 \cf4 \cell
\pard\intbl\itap1\pardeftab720\ri0\partightenfactor0
\ls4\ilvl0
\fs18 \cf3 Type
\fs22 \cf4 \cell
\pard\intbl\itap1\pardeftab720\ri0\partightenfactor0
\ls4\ilvl0
\fs18 \cf3 Description
\fs22 \cf4 \cell
\pard\intbl\itap1\pardeftab720\ri0\partightenfactor0
\ls4\ilvl0
\fs18 \cf3 Examples
\fs22 \cf4 \cell \row