mirror of
https://github.com/plankanban/planka.git
synced 2026-02-24 19:08:59 +03:00
How do I get list info from the API? #349
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @zezretro on GitHub (Aug 21, 2023).
I am trying to use the API to get back a list of cards in a list.
I can use /api/boards/--boardID- to see the details of a board and get my list ID
However I dont know which api endpoint to call to bring back info on a list. GET on /api/lists/--listID-- doesnt work
I was reviewing the endpoints here and I don't see anything for it
thank you!
@meltyshev commented on GitHub (Aug 22, 2023):
Hi! Currently there is no endpoint to get a specific list. All lists on a board can be retrieved by querying
/api/boards/:boardIdand they will be in theincluded -> listsfield.@zezretro commented on GitHub (Aug 22, 2023):
Thank you for the reply, I see the list info you described.
I will reword my question to better explain my intent
Is there any way to get all cards if I have a list id?
I can use card ID to retrieve card details, however I dont know how to go from list ID to getting the card IDs it contains.
thank you
@meltyshev commented on GitHub (Aug 22, 2023):
In the project this is solved by filtering all cards. So we have
included -> cardsandneededListId, then we can filter all cards withcards.filter((card) => card.listId === neededListId). This has been done because it was a perfect fit for our front-end (since we store all loaded data in normalized way) and there was no need for another way to fetch cards. But we also plan to add fetching cards by list id soon to make the API more complete.@zezretro commented on GitHub (Aug 23, 2023):
Got it, I see the list of cards when I retrieve board info and I can work with this
thank you!