-
Notifications
You must be signed in to change notification settings - Fork 5
/
openapi.json
6202 lines (6202 loc) · 208 KB
/
openapi.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
{
"openapi": "3.0.1",
"info": {
"title": "D&D 5e API",
"description": "",
"version": "0.1",
"license": {
"name": "MIT License",
"url": "https://github.com/5e-bits/5e-srd-api/blob/main/LICENSE.md"
},
"contact": {
"name": "5eBits",
"url": "https://github.com/5e-bits"
}
},
"servers": [
{
"url": "https://www.dnd5eapi.co",
"description": "Production"
},
{
"url": "http://localhost:3000",
"description": "Local Development"
}
],
"tags": [
{
"name": "Common"
},
{
"name": "Character Data"
}
],
"paths": {
"/api": {
"get": {
"summary": "Get all resource URLs.",
"description": "Making a request to the API's base URL returns an object containing available endpoints.",
"tags": [
"Common"
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
},
"example": {
"ability-scores": "/api/ability-scores",
"alignments": "/api/alignments",
"backgrounds": "/api/backgrounds",
"classes": "/api/classes",
"conditions": "/api/conditions",
"damage-types": "/api/damage-types",
"equipment-categories": "/api/equipment-categories",
"equipment": "/api/equipment",
"feats": "/api/feats",
"features": "/api/features",
"languages": "/api/languages",
"magic-items": "/api/magic-items",
"magic-schools": "/api/magic-schools",
"monsters": "/api/monsters",
"proficiencies": "/api/proficiencies",
"races": "/api/races",
"rules": "/api/rules",
"rule-sections": "/api/rule-sections",
"skills": "/api/skills",
"spells": "/api/spells",
"subclasses": "/api/subclasses",
"subraces": "/api/subraces",
"traits": "/api/traits",
"weapon-properties": "/api/weapon-properties"
}
}
}
}
}
}
},
"/api/{endpoint}": {
"get": {
"summary": "Get list of all available resources for an endpoint.",
"description": "Currently only the [`/spells`](#get-/api/spells) and [`/monsters`](#get-/api/monsters) endpoints support filtering with query parameters. Use of these query parameters is documented under the respective [Spells](#tag--Spells) and [Monsters](#tag--Monsters) sections.\n",
"tags": [
"Common"
],
"parameters": [
{
"$ref": "#/components/parameters/base-endpoint-index"
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/APIReferenceList"
}
}
}
}
}
}
},
"/api/ability-scores/{index}": {
"get": {
"summary": "Get an ability score by index.",
"description": "# Ability Score\n\nRepresents one of the six abilities that describes a creature's physical and mental characteristics. The three main rolls of the game - the ability check, the saving throw, and the attack roll - rely on the ability scores. [[SRD p76](https://media.wizards.com/2016/downloads/DND/SRD-OGL_V5.1.pdf#page=76)]\n",
"tags": [
"Character Data"
],
"parameters": [
{
"$ref": "#/components/parameters/ability-score-index"
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/AbilityScore"
},
"example": {
"index": "cha",
"name": "CHA",
"url": "/api/ability-scores/cha",
"desc": [
"Charisma measures your ability to interact effectively with others. It includes such factors as confidence and eloquence, and it can represent a charming or commanding personality.",
"A Charisma check might arise when you try to influence or entertain others, when you try to make an impression or tell a convincing lie, or when you are navigating a tricky social situation. The Deception, Intimidation, Performance, and Persuasion skills reflect aptitude in certain kinds of Charisma checks."
],
"full_name": "Charisma",
"skills": [
{
"index": "deception",
"name": "Deception",
"url": "/api/skills/deception"
},
{
"index": "intimidation",
"name": "Intimidation",
"url": "/api/skills/intimidation"
},
{
"index": "performance",
"name": "Performance",
"url": "/api/skills/performance"
},
{
"index": "persuasion",
"name": "Persuasion",
"url": "/api/skills/persuasion"
}
]
}
}
}
}
}
}
},
"/api/alignments/{index}": {
"get": {
"summary": "Get an alignment by index.",
"description": "# Alignment\n\nA typical creature in the game world has an alignment, which broadly describes its moral and personal attitudes. Alignment is a combination of two factors: one identifies morality (good, evil, or neutral), and the other describes attitudes toward society and order (lawful, chaotic, or neutral). Thus, nine distinct alignments define the possible combinations.[[SRD p58](https://media.wizards.com/2016/downloads/DND/SRD-OGL_V5.1.pdf#page=58)]\n",
"tags": [
"Character Data"
],
"parameters": [
{
"$ref": "#/components/parameters/alignment-index"
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Alignment"
},
"example": {
"index": "chaotic-neutral",
"name": "Chaotic Neutral",
"url": "/api/alignments/chaotic-neutral",
"desc": "Chaotic neutral (CN) creatures follow their whims, holding their personal freedom above all else. Many barbarians and rogues, and some bards, are chaotic neutral.",
"abbreviation": "CN"
}
}
}
}
}
}
},
"/api/backgrounds/{index}": {
"get": {
"summary": "Get a background by index.",
"description": "# Background\n\nEvery story has a beginning. Your character's background reveals where you came from, how you became an adventurer, and your place in the world. Choosing a background provides you with important story cues about your character's identity. [[SRD p60](https://media.wizards.com/2016/downloads/DND/SRD-OGL_V5.1.pdf#page=60)]\n\n_Note:_ acolyte is the only background included in the SRD.\n",
"tags": [
"Character Data"
],
"parameters": [
{
"$ref": "#/components/parameters/background-index"
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Background"
},
"example": {
"index": "acolyte",
"name": "Acolyte",
"starting_proficiencies": [
{
"index": "skill-insight",
"name": "Skill: Insight",
"url": "/api/proficiencies/skill-insight"
},
{
"index": "skill-religion",
"name": "Skill: Religion",
"url": "/api/proficiencies/skill-religion"
}
],
"language_options": {
"choose": 2,
"type": "languages",
"from": {
"option_set_type": "resource_list",
"resource_list_url": "/api/languages"
}
},
"starting_equipment": [
{
"equipment": {
"index": "clothes-common",
"name": "Clothes, common",
"url": "/api/equipment/clothes-common"
},
"quantity": 1
},
{
"equipment": {
"index": "pouch",
"name": "Pouch",
"url": "/api/equipment/pouch"
},
"quantity": 1
}
],
"starting_equipment_options": [
{
"choose": 1,
"type": "equipment",
"from": {
"option_set_type": "equipment_category",
"equipment_category": {
"index": "holy-symbols",
"name": "Holy Symbols",
"url": "/api/equipment-categories/holy-symbols"
}
}
}
],
"feature": {
"name": "Shelter of the Faithful",
"desc": [
"As an acolyte, you command the respect of those who share your faith, and you can perform the religious ceremonies of your deity. You and your adventuring companions can expect to receive free healing and care at a temple, shrine, or other established presence of your faith, though you must provide any material components needed for spells. Those who share your religion will support you (but only you) at a modest lifestyle.",
"You might also have ties to a specific temple dedicated to your chosen deity or pantheon, and you have a residence there. This could be the temple where you used to serve, if you remain on good terms with it, or a temple where you have found a new home. While near your temple, you can call upon the priests for assistance, provided the assistance you ask for is not hazardous and you remain in good standing with your temple."
]
},
"personality_traits": {
"choose": 2,
"type": "personality_traits",
"from": {
"option_set_type": "options_array",
"options": [
{
"option_type": "string",
"string": "I idolize a particular hero of my faith, and constantly refer to that person's deeds and example."
},
{
"option_type": "string",
"string": "I can find common ground between the fiercest enemies, empathizing with them and always working toward peace."
},
{
"option_type": "string",
"string": "I see omens in every event and action. The gods try to speak to us, we just need to listen."
},
{
"option_type": "string",
"string": "Nothing can shake my optimistic attitude."
},
{
"option_type": "string",
"string": "I quote (or misquote) sacred texts and proverbs in almost every situation."
},
{
"option_type": "string",
"string": "I am tolerant (or intolerant) of other faiths and respect (or condemn) the worship of other gods."
},
{
"option_type": "string",
"string": "I've enjoyed fine food, drink, and high society among my temple's elite. Rough living grates on me."
},
{
"option_type": "string",
"string": "I've spent so long in the temple that I have little practical experience dealing with people in the outside world."
}
]
}
},
"ideals": {
"choose": 1,
"type": "ideals",
"from": {
"option_set_type": "options_array",
"options": [
{
"option_type": "ideal",
"desc": "Tradition. The ancient traditions of worship and sacrifice must be preserved and upheld.",
"alignments": [
{
"index": "lawful-good",
"name": "Lawful Good",
"url": "/api/alignments/lawful-good"
},
{
"index": "lawful-neutral",
"name": "Lawful Neutral",
"url": "/api/alignments/lawful-neutral"
},
{
"index": "lawful-evil",
"name": "Lawful Evil",
"url": "/api/alignments/lawful-evil"
}
]
},
{
"option_type": "ideal",
"desc": "Charity. I always try to help those in need, no matter what the personal cost.",
"alignments": [
{
"index": "lawful-good",
"name": "Lawful Good",
"url": "/api/alignments/lawful-good"
},
{
"index": "neutral-good",
"name": "Neutral Good",
"url": "/api/alignments/neutral-good"
},
{
"index": "chaotic-good",
"name": "Chaotic Good",
"url": "/api/alignments/chaotic-good"
}
]
},
{
"option_type": "ideal",
"desc": "Change. We must help bring about the changes the gods are constantly working in the world.",
"alignments": [
{
"index": "chaotic-good",
"name": "Chaotic Good",
"url": "/api/alignments/chaotic-good"
},
{
"index": "chaotic-neutral",
"name": "Chaotic Neutral",
"url": "/api/alignments/chaotic-neutral"
},
{
"index": "chaotic-evil",
"name": "Chaotic Evil",
"url": "/api/alignments/chaotic-evil"
}
]
},
{
"option_type": "ideal",
"desc": "Power. I hope to one day rise to the top of my faith's religious hierarchy.",
"alignments": [
{
"index": "lawful-good",
"name": "Lawful Good",
"url": "/api/alignments/lawful-good"
},
{
"index": "lawful-neutral",
"name": "Lawful Neutral",
"url": "/api/alignments/lawful-neutral"
},
{
"index": "lawful-evil",
"name": "Lawful Evil",
"url": "/api/alignments/lawful-evil"
}
]
},
{
"option_type": "ideal",
"desc": "Faith. I trust that my deity will guide my actions. I have faith that if I work hard, things will go well.",
"alignments": [
{
"index": "lawful-good",
"name": "Lawful Good",
"url": "/api/alignments/lawful-good"
},
{
"index": "lawful-neutral",
"name": "Lawful Neutral",
"url": "/api/alignments/lawful-neutral"
},
{
"index": "lawful-evil",
"name": "Lawful Evil",
"url": "/api/alignments/lawful-evil"
}
]
},
{
"option_type": "ideal",
"desc": "Aspiration. I seek to prove myself worthy of my god's favor by matching my actions against his or her teachings.",
"alignments": [
{
"index": "lawful-good",
"name": "Lawful Good",
"url": "/api/alignments/lawful-good"
},
{
"index": "neutral-good",
"name": "Neutral Good",
"url": "/api/alignments/neutral-good"
},
{
"index": "chaotic-good",
"name": "Chaotic Good",
"url": "/api/alignments/chaotic-good"
},
{
"index": "lawful-neutral",
"name": "Lawful Neutral",
"url": "/api/alignments/lawful-neutral"
},
{
"index": "neutral",
"name": "Neutral",
"url": "/api/alignments/neutral"
},
{
"index": "chaotic-neutral",
"name": "Chaotic Neutral",
"url": "/api/alignments/chaotic-neutral"
},
{
"index": "lawful-evil",
"name": "Lawful Evil",
"url": "/api/alignments/lawful-evil"
},
{
"index": "neutral-evil",
"name": "Neutral Evil",
"url": "/api/alignments/neutral-evil"
},
{
"index": "chaotic-evil",
"name": "Chaotic Evil",
"url": "/api/alignments/chaotic-evil"
}
]
}
]
}
},
"bonds": {
"choose": 1,
"type": "bonds",
"from": {
"option_set_type": "options_array",
"options": [
{
"option_type": "string",
"string": "I would die to recover an ancient relic of my faith that was lost long ago."
},
{
"option_type": "string",
"string": "I will someday get revenge on the corrupt temple hierarchy who branded me a heretic."
},
{
"option_type": "string",
"string": "I owe my life to the priest who took me in when my parents died."
},
{
"option_type": "string",
"string": "Everything I do is for the common people."
},
{
"option_type": "string",
"string": "I will do anything to protect the temple where I served."
},
{
"option_type": "string",
"string": "I seek to preserve a sacred text that my enemies consider heretical and seek to destroy."
}
]
}
},
"flaws": {
"choose": 1,
"type": "flaws",
"from": {
"option_set_type": "options_array",
"options": [
{
"option_type": "string",
"string": "I judge others harshly, and myself even more severely."
},
{
"option_type": "string",
"string": "I put too much trust in those who wield power within my temple's hierarchy."
},
{
"option_type": "string",
"string": "My piety sometimes leads me to blindly trust those that profess faith in my god."
},
{
"option_type": "string",
"string": "I am inflexible in my thinking."
},
{
"option_type": "string",
"string": "I am suspicious of strangers and expect the worst of them."
},
{
"option_type": "string",
"string": "Once I pick a goal, I become obsessed with it to the detriment of everything else in my life."
}
]
}
},
"url": "/api/backgrounds/acolyte"
}
}
}
}
}
}
},
"/api/classes/{index}": {
"get": {
"summary": "Get a class by index.",
"description": "# Class\n\nA character class is a fundamental part of the identity and nature of\ncharacters in the Dungeons & Dragons role-playing game. A character's\ncapabilities, strengths, and weaknesses are largely defined by its class.\nA character's class affects a character's available skills and abilities. [[SRD p8-55](https://media.wizards.com/2016/downloads/DND/SRD-OGL_V5.1.pdf#page=8)]\n",
"tags": [
"Class"
],
"parameters": [
{
"$ref": "#/components/parameters/class-index"
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Class"
},
"example": {
"class_levels": "/api/classes/barbarian/levels",
"hit_die": 12,
"index": "barbarian",
"multi_classing": {
"prerequisites": [
{
"ability_score": {
"index": "str",
"name": "STR",
"url": "/api/ability-scores/str"
},
"minimum_score": 13
}
],
"proficiencies": [
{
"index": "shields",
"name": "Shields",
"url": "/api/proficiencies/shields"
},
{
"index": "simple-weapons",
"name": "Simple Weapons",
"url": "/api/proficiencies/simple-weapons"
},
{
"index": "martial-weapons",
"name": "Martial Weapons",
"url": "/api/proficiencies/martial-weapons"
}
],
"proficiency_choices": []
},
"name": "Barbarian",
"proficiencies": [
{
"index": "light-armor",
"name": "Light Armor",
"url": "/api/proficiencies/light-armor"
},
{
"index": "medium-armor",
"name": "Medium Armor",
"url": "/api/proficiencies/medium-armor"
},
{
"index": "shields",
"name": "Shields",
"url": "/api/proficiencies/shields"
},
{
"index": "simple-weapons",
"name": "Simple Weapons",
"url": "/api/proficiencies/simple-weapons"
},
{
"index": "martial-weapons",
"name": "Martial Weapons",
"url": "/api/proficiencies/martial-weapons"
}
],
"proficiency_choices": [
{
"desc": "Choose two from Animal Handling, Athletics, Intimidation, Nature, Perception, and Survival",
"choose": 2,
"type": "proficiencies",
"from": {
"option_set_type": "options_array",
"options": [
{
"option_type": "reference",
"item": {
"index": "skill-animal-handling",
"name": "Skill: Animal Handling",
"url": "/api/proficiencies/skill-animal-handling"
}
},
{
"option_type": "reference",
"item": {
"index": "skill-athletics",
"name": "Skill: Athletics",
"url": "/api/proficiencies/skill-athletics"
}
},
{
"option_type": "reference",
"item": {
"index": "skill-intimidation",
"name": "Skill: Intimidation",
"url": "/api/proficiencies/skill-intimidation"
}
},
{
"option_type": "reference",
"item": {
"index": "skill-nature",
"name": "Skill: Nature",
"url": "/api/proficiencies/skill-nature"
}
},
{
"option_type": "reference",
"item": {
"index": "skill-perception",
"name": "Skill: Perception",
"url": "/api/proficiencies/skill-perception"
}
},
{
"option_type": "reference",
"item": {
"index": "skill-survival",
"name": "Skill: Survival",
"url": "/api/proficiencies/skill-survival"
}
}
]
}
}
],
"saving_throws": [
{
"index": "str",
"name": "STR",
"url": "/api/ability-scores/str"
},
{
"index": "con",
"name": "CON",
"url": "/api/ability-scores/con"
}
],
"starting_equipment": [
{
"equipment": {
"index": "explorers-pack",
"name": "Explorer's Pack",
"url": "/api/equipment/explorers-pack"
},
"quantity": 1
},
{
"equipment": {
"index": "javelin",
"name": "Javelin",
"url": "/api/equipment/javelin"
},
"quantity": 4
}
],
"starting_equipment_options": [
{
"desc": "(a) a greataxe or (b) any martial melee weapon",
"choose": 1,
"type": "equipment",
"from": {
"option_set_type": "options_array",
"options": [
{
"option_type": "counted_reference",
"count": 1,
"of": {
"index": "greataxe",
"name": "Greataxe",
"url": "/api/equipment/greataxe"
}
},
{
"option_type": "choice",
"choice": {
"desc": "any martial melee weapon",
"choose": 1,
"type": "equipment",
"from": {
"option_set_type": "equipment_category",
"equipment_category": {
"index": "martial-melee-weapons",
"name": "Martial Melee Weapons",
"url": "/api/equipment-categories/martial-melee-weapons"
}
}
}
}
]
}
},
{
"desc": "(a) two handaxes or (b) any simple weapon",
"choose": 1,
"type": "equipment",
"from": {
"option_set_type": "options_array",
"options": [
{
"option_type": "counted_reference",
"count": 2,
"of": {
"index": "handaxe",
"name": "Handaxe",
"url": "/api/equipment/handaxe"
}
},
{
"option_type": "choice",
"choice": {
"desc": "any simple weapon",
"choose": 1,
"type": "equipment",
"from": {
"option_set_type": "equipment_category",
"equipment_category": {
"index": "simple-weapons",
"name": "Simple Weapons",
"url": "/api/equipment-categories/simple-weapons"
}
}
}
}
]
}
}
],
"subclasses": [
{
"index": "berserker",
"name": "Berserker",
"url": "/api/subclasses/berserker"
}
],
"url": "/api/classes/barbarian"
}
}
}
}
}
}
},
"/api/classes/{index}/subclasses": {
"get": {
"summary": "Get subclasses available for a class.",
"tags": [
"Class Resource Lists"
],
"parameters": [
{
"$ref": "#/components/parameters/class-index"
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/APIReferenceList"
},
"example": {
"count": 1,
"results": [
{
"index": "berserker",
"name": "Berserker",
"url": "/api/subclasses/berserker"
}
]
}
}
}
}
}
}
},
"/api/classes/{index}/spells": {
"get": {
"summary": "Get spells available for a class.",
"tags": [
"Class Resource Lists"
],
"parameters": [
{
"$ref": "#/components/parameters/class-index"
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ClassSpellList"
},
"example": {
"count": 2,
"results": [
{
"index": "power-word-kill",
"name": "Power Word Kill",
"url": "/api/spells/power-word-kill",
"level": 9
},
{
"index": "true-polymorph",
"name": "True Polymorph",
"url": "/api/spells/true-polymorph",
"level": 9
}
]
}
}
}
}
}
}
},
"/api/classes/{index}/spellcasting": {
"get": {
"summary": "Get spellcasting info for a class.",
"tags": [
"Class"
],
"parameters": [
{
"$ref": "#/components/parameters/class-index"
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Spellcasting"
},
"example": {
"level": 1,
"spellcasting_ability": {
"index": "cha",
"name": "CHA",
"url": "/api/ability-scores/cha"
},
"info": [
{
"name": "Cantrips",
"desc": [
"You know two cantrips of your choice from the bard spell list. You learn additional bard cantrips of your choice at higher levels, as shown in the Cantrips Known column of the Bard table."
]
},
{
"name": "Spell Slots",
"desc": [
"The Bard table shows how many spell slots you have to cast your spells of 1st level and higher. To cast one of these spells, you must expend a slot of the spell's level or higher. You regain all expended spell slots when you finish a long rest.",
"For example, if you know the 1st-level spell cure wounds and have a 1st-level and a 2nd-level spell slot available, you can cast cure wounds using either slot."
]
},
{
"name": "Spells Known of 1st Level and Higher",
"desc": [
"You know four 1st-level spells of your choice from the bard spell list.",
"The Spells Known column of the Bard table shows when you learn more bard spells of your choice.",
"Each of these spells must be of a level for which you have spell slots, as shown on the table. For instance, when you reach 3rd level in this class, you can learn one new spell of 1st or 2nd level.",
"Additionally, when you gain a level in this class, you can choose one of the bard spells you know and replace it with another spell from the bard spell list, which also must be of a level for which you have spell slots."
]
},
{
"name": "Spellcasting Ability",
"desc": [
"Charisma is your spellcasting ability for your bard spells. Your magic comes from the heart and soul you pour into the performance of your music or oration. You use your Charisma whenever a spell refers to your spellcasting ability. In addition, you use your Charisma modifier when setting the saving throw DC for a bard spell you cast and when making an attack roll with one.",
"Spell save DC = 8 + your proficiency bonus + your Charisma modifier.",
"Spell attack modifier = your proficiency bonus + your Charisma modifier."
]
},
{
"name": "Ritual Casting",
"desc": [
"You can cast any bard spell you know as a ritual if that spell has the ritual tag."
]
},
{
"name": "Spellcasting Focus",
"desc": [
"You can use a musical instrument (see Equipment) as a spellcasting focus for your bard spells."
]
}
]
}
}
}
},
"404": {
"description": "Not found.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error-response"
},
"example": {
"error": "Not found"
}
}
}
}
}
}
},
"/api/classes/{index}/features": {
"get": {
"summary": "Get features available for a class.",
"tags": [
"Class Resource Lists"
],
"parameters": [
{
"$ref": "#/components/parameters/class-index"
}
],