ankicommunity / ankicommunity-api-server

Django-based Anki Sync and API server
GNU Affero General Public License v3.0
45 stars 14 forks source link

Is there an api to add deck and cards #34

Open sibambaspec opened 1 week ago

sibambaspec commented 1 week ago

How to send api request Is there an api to add deck and cards

VikashKothary commented 1 week ago

I think I have an openapi spec for the API locally. Let me find it and upload it.

But you can see the routes here: https://github.com/ankicommunity/ankicommunity-api-server/blob/develop/src/djankiserv_api/urls.py

sibambaspec commented 1 week ago

Thank you….

On Thu, 5 Sep 2024 at 3:37 PM, Vikash Kothary @.***> wrote:

I think I have an openapi spec for the API locally. Let me find it and upload it.

— Reply to this email directly, view it on GitHub https://github.com/ankicommunity/ankicommunity-api-server/issues/34#issuecomment-2331127819, or unsubscribe https://github.com/notifications/unsubscribe-auth/APXKH45YZQJKXYUYEH74IJTZVAUNJAVCNFSM6AAAAABNQGKYF6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGMZRGEZDOOBRHE . You are receiving this because you authored the thread.Message ID: @.***>

VikashKothary commented 1 week ago

Hi @sibambaspec,

I had a look and unfortunately I don't have an openapi spec for this API. While I do plan on writing one in the future, I can try and provide you a rough list of endpoints that have currently been implemented:

GET /health
GET /api/v1/auth/token
GET /api/v1/auth/refresh
POST /api/v1/notes/add
POST /api/v1/notes
POST /api/v1/notes/delete
GET /api/v1/decks
GET /api/v1/decks/conf
GET /api/v1/tags
GET /api/v1/models

There's also an GET /admin which is the Django Admin page.

There are also the sync endpoints but I assume that's not what you're looking for.

Is there any specific endpoints you're looking for? The long term vision is to have CRUD endpoints for all resources but it looks like we're not there yet.

I'm a bit busy right now but if you want to contribute or request features, I'm happy to work with you to make it happen.