Newbie wuestion: how to view complete list of endpoints supported by Akkoma 3.5.0?

Sorry for the newbie question. Is there a way to view all the supported api endpoints in Akkoma 3.5.0? If it’s a matter of learning Erlang to understand the code, I understand and will try to learn what I can.

The driver for this question is to check is this endpoint was added for hashtag following. I suspect it was but I’m just too unfamiliar with the code to know how to verify.

mhh there is swagger if this helps you: Frontend Management - Akkoma Documentation

i can speed it up for you and say “no, that doesn’t exist yet”

Thank you. That’s a no to both the viewable API and that particular endpoint? (I.e. neither exist yet)

as rick says, there’s openapi (swagger) served at /api/openapi

view that as you will, any openapi viewer will work

1 Like

Do you know of any public Akkoma servers that enable the OpenAPI docs viewer? I’m looking at adding Akkoma-specific API support to Feditext and I’m hoping for a way to get the currently shipping OpenAPI schema document without first having to install and configure my own Akkoma instance.

Alternatively, I’d hoped to find the schema doc in the Akkoma repo itself, but it looks like it’s generated at runtime from internal spec structures, and not dumped and saved as part of a release package.

(Sorry to necro this thread, but it seemed politer than opening a redundant new one.)

i just tried to enable it on my instance, but it isn’t working :confused:

The endpoints are defined here, but it wont tell you responses or w/e akkoma/router.ex at develop - akkoma - Akkoma Development

1 Like

Sounds like it’ll take a little work to get Akkoma’s OpenAPI support back to operable. Bummer, but thanks for having a look.

I’m not sure how to properly fix it, but I’ve been able to work around it, you can find it at https://ilja.space/pleroma/swaggerui/ (note that you need to also use the last slash).

For anyone who can spend the time looking further into this problem, it seems that the /akkoma route isn’t properly used for some reason + it also seems to need a slash at the end (at least I have to when using the pleroma route, as I have done now). Here’s the diff I did to get it working on /pleroma/swaggerui/

diff --git a/lib/pleroma/web/endpoint.ex b/lib/pleroma/web/endpoint.ex
index e3a251ca1..440142f25 100644
--- a/lib/pleroma/web/endpoint.ex
+++ b/lib/pleroma/web/endpoint.ex
@@ -66,10 +66,10 @@ defmodule Pleroma.Web.Endpoint do
     }
   )
 
-  plug(Plug.Static.IndexHtml, at: "/akkoma/swaggerui")
+  plug(Plug.Static.IndexHtml, at: "/pleroma/swaggerui/")
 
   plug(Pleroma.Web.Plugs.FrontendStatic,
-    at: "/akkoma/swaggerui",
+    at: "/pleroma/swaggerui",
     frontend_type: :swagger,
     gzip: true,
     if: &Pleroma.Web.Swagger.ui_enabled?/0,
1 Like