I am struggling a little bit with the Stack Exchange API since there seems to be no formal specification for the individual endpoints of the API.
Example:
Endpoint: https://api.stackexchange.com/2.2/questions/add
Documentation Link: https://api.stackexchange.com/docs/create-question
On the screenshot you can see all the information I get for the endpoint. A few things weren't clear at first sight:
- Is this a
POST
request or wouldGET
also work? - What is the
Content-Type
(x-www-form-urlencoded
orjson
?) - Which fields are required which are optional
- Description of all the fields:
- What is
preview
for. What is the format: [true,false], ["true","false"], [0,1]? - How to format the list of tags?
- What is the
key
, where to get it - How do responses look like (e.g. HTTP headers)
- How would an example request look like
- What is
I did find out all of this information eventually but I had to make assumptions and do quite a bit of trial and error.
In contrast, the GitHub API for example has a different structure and provides most of the data at a glance. Example: Create an GitHub Issue