[英]Export to csv queries API from azure devops Boards Queries
I am currently working on automate a process where i manualy download a CSV from azure devops queries,then, i convert it into xlsx file and upload it manually to google drive This is where i export to CSV.我目前正在自动化一个过程,我从 azure devops 查询中手动下载 CSV,然后,我将其转换为 xlsx 文件并手动上传到谷歌驱动器这是我导出到 CSV 的地方。
To automate this process i need to build a script that downloads the file, convert it into xlsx and push it into google drive.为了使这个过程自动化,我需要构建一个脚本来下载文件,将其转换为 xlsx 并将其推送到谷歌驱动器。
I have the last 2 steps covered, but i need to know if theres an api where i can download this CSV file from Azure.我已经涵盖了最后两个步骤,但我需要知道是否有一个 api,我可以从 Azure 下载这个 CSV 文件。
I have not found anything online.我没有在网上找到任何东西。
*UPDATE: Another option that i have is getting the items of the query with a get request and then format them as xlsx. *更新:我的另一个选择是通过获取请求获取查询项,然后将它们格式化为 xlsx。
I've been looking into the azure devops queries api documentation but this just list queries information but not the conten of them.我一直在查看azure devops 查询 api 文档,但这只是列出查询信息,而不是它们的内容。
Any suggestion on how to the the workitems of a query?关于如何查询工作项的任何建议?
If you are able to execute a REST call and have already defined query for your purpose, just have a look at this calls, this should do the trick:如果您能够执行 REST 调用并且已经为您的目的定义了查询,只需看看这个调用,这应该可以解决问题:
GET https://dev.azure.com/{YourOrganization}/{YourProject}/_apis/wit/queries/{query}?api-version=6.0
in the response you will find a field called ID.在响应中,您会发现一个名为 ID 的字段。
With this ID you can retrieve the query result by使用此 ID,您可以通过以下方式检索查询结果
HEAD https://dev.azure.com/{YourOrganization}/{YourProject}/{team}/_apis/wit/wiql/{id}?api-version=6.0
look here for docu在这里寻找文档
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.