new API - endpoint syntax to run project issues CSV exports
Hi,
after checking the content of the new REST API reference, I couldn't figure out which endpoint is equivalent to what I saw with the old REST API: /api/reports/<report_id>/export/csv
Example of post mentioning that old requests, for reference:
- https://youtrack-support.jetbrains.com/hc/en-us/community/posts/360010637480-Download-report-via-REST-API-or-get-data-in-some-other-way-
- https://youtrack-support.jetbrains.com/hc/en-us/community/posts/8357222397842-Rest-API-endpoint-api-reports-report-id-export-csv-responds-with-409
Just to clarify, the use case I'm trying to achieve here is running an export to CSV, to export issues from a specific project, either to XLSX or CSV format. It corresponds to clicking manually on the button I screenshot below:
Thanks in advance for your help
Please sign in to leave a comment.
You need to use a POST request to a `/youtrack/api/export/issues` endpoint. The body of the request should list the needed issues' IDs like this: `{"issues":[{"id":"2-5256"},{"id":"2-7296"}]}`.
Hi Alisa,
Could you please provide the exact syntax of the request when applied to the following use case:
I want to export all of the issues contained in My Project. Is there a way to query this in the export request directly, after 'export/issues', something like :
POST ... youtrack/api/export/issues?query=project:%7BMy+Project%7D
Thank you in advance for your help,
Have a nice day
I'm afraid, it is needed to post the IDs of all issues, so there is no easy way to export all issues from some project via REST API.