How do I get list info from the API? #349

Closed
opened 2026-02-04 18:39:00 +03:00 by OVERLORD · 4 comments
Owner

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!

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](https://github.com/plankanban/planka/blob/master/server/config/routes.js) and I don't see anything for it thank you!
OVERLORD added the question label 2026-02-04 18:39:00 +03:00
Author
Owner

@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/:boardId and they will be in the included -> lists field.

@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/:boardId` and they will be in the `included -> lists` field.
Author
Owner

@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

@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
Author
Owner

@meltyshev commented on GitHub (Aug 22, 2023):

In the project this is solved by filtering all cards. So we have included -> cards and neededListId, then we can filter all cards with cards.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.

@meltyshev commented on GitHub (Aug 22, 2023): In the project this is solved by filtering all cards. So we have `included -> cards` and `neededListId`, then we can filter all cards with `cards.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.
Author
Owner

@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!

@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!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/planka#349