Topic: [Feature] Add more in-depth API documentation

Posted under Site Bug Reports & Feature Requests

Requested feature overview description.
Add documentation for undocumented endpoints like:

  • POST /post_sets/setid/add_posts.json
  • POST /post_sets/setid/remove_posts.json
  • GET /post_sets/for_select.json
  • POST /users/userid
  • [...] and so on

Why would it be useful?
Because it would make it easier to develop userscripts or browser addons that aims to improve account management
Currently the API page is seemingly only catered towards people who want to develop their own frontend and its really time consuming to intercept http requests to figure out what to send to the server

What part(s) of the site page(s) are affected?
The API page on the help section

lavenderdrainer said:
Currently the API page is seemingly only catered towards people who want to develop their own frontend and its really time consuming to intercept http requests to figure out what to send to the server

User Donovan_DMC maintains a page with unofficial documentation of the e621 API at https://docs.e621.ws/ . It goes into a bit more detail than the API help page here. I agree that it would be a good idea to improve the API help page here.

They also offer an e621 API status page at https://status.e621.ws/ ; it periodically queries e621's API and reports whether the query worked. If a bunch of your queries are failing, that site can be helpful in figuring out whether it's your query or e621 that is having a problem.

This isn't a new idea, just no one wants to take the time to do it
writing api documentation is incredibly time consuming
If you know how (or learn how) rails works, reading the code will be much more fruitful than doing things here and working off of request bodies and responses

kora_viridian said:
User Donovan_DMC maintains a page with unofficial documentation of the e621 API at https://docs.e621.ws/ . It goes into a bit more detail than the API help page here. I agree that it would be a good idea to improve the API help page here.

I've been meaning to overhaul that with a full OpenAPI definition, but it is a lot of work. One project of relatively the same size took 3 straight days (doing nothing but documenting and sleeping) and ~13,000 lines of YAML
Editing huge YAML files also wreak havoc on any editor, taking up a ton of resources and slowing everything down
For example

donovan_dmc said:
I've been meaning to overhaul that with a full OpenAPI definition, but it is a lot of work. One project of relatively the same size took 3 straight days (doing nothing but documenting and sleeping) and ~13,000 lines of YAML
Editing huge YAML files also wreak havoc on any editor, taking up a ton of resources and slowing everything down
For example

I took the plunge and 11,000 lines later: topic #46279

  • 1