kees-z / DuplicatiDocs

Duplicati User's Manual
GNU Lesser General Public License v2.1
80 stars 68 forks source link

Missing API Documentation #114

Open TheGameProfi opened 2 months ago

TheGameProfi commented 2 months ago

Hey there,

I noticed that the Duplicati docs don’t really cover the API, which can make things tricky for anyone trying to work with it programmatically. I’ve been digging into the Pectojin/duplicati-client repo and collected some info on the API that I think could be useful if added to the main docs.

What I’m Proposing:

What I Need:

I think this could really help devs who are looking to integrate Duplicati into their setups. Let me know what you think!

Cheers!

kenkendk commented 2 months ago

Hi @TheGameProfi, I have recently updated the API slightly to be a bit more modern. To aid in developing a client, you can now get a Swagger API overview: https://github.com/duplicati/duplicati/pull/5470

I think this overview can at least serve as a starting point for the documentation.

kees-z commented 2 months ago

Hi @TheGameProfi, your contribution is much appreciated! There are no strict guidelines, but I'd guess the best option is to create a new file something like 09-application-programming-interface.md and update the content similar to the layout in other chapters. You can use Info/Warning blocks and blocks that contain OS-specific info, see this section (Raw version) for more info.

TheGameProfi commented 2 months ago

There are no strict guidelines, but I'd guess the best option is to create a new file something like 09-application-programming-interface.md and update the content similar to the layout in other chapters.

My idea is to create a new set of files like api-example.md and api-auth.md, and then add another drop-down menu for the API, similar to the Manual and Articles sections.

To aid in developing a client, you can now get a Swagger API overview: duplicati/duplicati#5470

Thanks for the information! That seems like a good starting point. I haven't quite figured out how to enter Debug Mode to access the Swagger UI. Could you guide me on how to get there?

kees-z commented 2 months ago

I would prefer making the API-documentation part of the manual, creating a new chapter for describing the API. In that chapter, you can create as many subsections as you like. The main chapters will be displayed at the left side of the documentation, at the right side all subsections (API examples, API auithentication etc.) will be displayed for quick navigation. That's about how the current layout is set up. Is there any reason for keeping the API-documentation outside the manual?

TheGameProfi commented 2 months ago

Not directly, but it’s more of a personal preference to have the API documentation separate from the manual and visible at first glance when accessing the documentation.

kees-z commented 1 month ago

I can't think of any reason why the API documentation should be treated differently than other parts of the manual. I agree that it deserves its own chapter, but I prefer to keep the main page clean and try to avoid more sections than the current Manual and Articles sections. I guess the API documentation fits better in Manual than in the Articles section.

TheGameProfi commented 3 weeks ago

It was some time since there was some Activity. I now started writing the "Documentation". One Trouble i wanted to talk with you about, there are Some API Routes I retrieved from the Source-Code but when I tried to call it, it doesn't Work. Should I mention these or just leave them out?