Get Jira cloud Project/Board columns

How to get a list of Columns like To Do, Done and other?
I have seen the link:

And it seems like i need to use GET /rest/agile/1.0/board/{boardId}/configuration, but how can i get {boardId} by project or issue.
I want to retrieve board columns on atl.jira.view.issue.right.context

Hello @TaaviTilgre,

Given a projectId, you can try using Get all boards
From the result set, you then need to choose the relevant boards you need and their respective boardIds.

@ iragudo

So i need to call:
GET /rest/agile/1.0/board
and then for every board call:
GET /rest/agile/1.0/board/{boardId}/issue
Then figure out by result what board do i actually need.

Thats a lot of rest calls if i have about 50 projects…

Isn’t there a more optimal way?