Creating/Reading boards per issue
Hello, I would like to programmatically be able to see which agile boards an issue belongs to, and to set the list of boards.
The API for issue doesn't seem like it has a the list of boards for the issue as part of the fields.
I also looked at the network requests the webclient does, and it uses a command to set the board.
What is the recommended way to GET something like `boards(issue)` and to POST something like `add_board(issue)` (or remove_board).
Please sign in to leave a comment.
Hello,
Please accept my apologies for the delayed response. In urgent cases, please feel free to submit a support request: https://youtrack-support.jetbrains.com/hc/en-us/requests/new?ticket_form_id=66282
You're absolutely right about using commands to add an issue to a board. Please give the following REST endpoint a try: https://www.jetbrains.com/help/youtrack/standalone/resource-api-commands.html. It applies a command to an issue and there is an example of how to use the endpoint. The required command is as follows: `add board <boardname>`.
As for getting a list of issue's boards, I'm afraid the correct endpoint is not documented yet, so you can refer to the requests YouTrack does itself in the browser console. Something like this should work: `/api/issues/<issue database id>/sprints?$top=-1&fields=agile(id,name,sprintsSettings(disableSprints)),id,name`.
Hope it helps.