D&D 5e APIIntroduction Welcome to the dnd5eapi, the Dungeons & Dragons 5th Edition API! This documentation should help you familiarize yourself with the resources available and how to consume them with HTTP requests. Read through the getting started section before you dive in. Most of your problems should be solved just by reading through it. Getting Started Let's make our first API request to the D&D 5th Edition API! Open up a terminal and use [curl](http://curl.haxx.se/) or [httpie](http://httpie.org/) to make an API request for a resource. You can also scroll through the definitions below and send requests directly from the endpoint documentation! For example, if you paste and run this curl command: bash curl -X GET "https://www.dnd5eapi.co/api/ability-scores/cha" -H "Accept: application/json" We should see a result containing details about the Charisma ability score: bash { "index": "cha", "name": "CHA", "full name": "Charisma", "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." ], "skills": [ { "name": "Deception", "index": "deception", "url": "/api/skills/deception" }, { "name": "Intimidation", "index": "intimidation", "url": "/api/skills/intimidation" }, { "name": "Performance", "index": "performance", "url": "/api/skills/performance" }, { "name": "Persuasion", "index": "persuasion", "url": "/api/skills/persuasion" } ], "url": "/api/ability-scores/cha" } Authentication The dnd5eapi is a completely open API. No authentication is required to query and get data. This also means that we've limited what you can do to just GET -ing the data. If you find a mistake in the data, feel free to [message us](https://discord.gg/TQuYTv7). GraphQL This API supports [GraphQL](https://graphql.org/). The GraphQL URL for this API is https://www.dnd5eapi.co/graphql . Most of your questions regarding the GraphQL schema can be answered by querying the endpoint with the Apollo sandbox explorer. Schemas Definitions of all schemas will be accessible in a future update. Two of the most common schemas are described here. APIReference Represents a minimal representation of a resource. The detailed representation of the referenced resource can be retrieved by making a request to the referenced URL . APIReference { index string name string url string } DC Represents a difficulty check. DC { dc type APIReference dc value number success type "none" "half" "other" } Damage Represents damage. Damage { damage type APIReference damage dice string } Choice Represents a choice made by a player. Commonly seen related to decisions made during character creation or combat (e.g.: the description of the cleric class, under Proficiencies , states "Skills: Choose two from History, Insight, Medicine, Persuasion, and Religion" [[SRD p15]](https://media.wizards.com/2016/downloads/DND/SRD-OGL V5.1.pdf page=15)) Choice { desc string choose number type string from OptionSet } OptionSet The OptionSet structure provides the options to be chosen from, or sufficient data to fetch and interpret the options. All OptionSets have an option set type attribute that indicates the structure of the object that contains the options. The possible values are options array , equipment category , and reference list . Other attributes on the OptionSet depend on the value of this attribute. - options array - options (array): An array of Option objects. Each item in the array represents an option that can be chosen. - equipment category - equipment category (APIReference): A reference to an EquipmentCategory. Each item in the EquipmentCategory's equipment…
번역은 이해를 돕기 위한 미검수 초벌 또는 구조화 안내입니다. 계약·의료·법률 판단에는 원문을 확인하세요.