简体   繁体   English

从 azure devops Boards 查询导出到 csv 查询 API

[英]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.

相关问题 Azure DevOps 个人资料图片未显示在板上 - Azure DevOps profile pictures not displayed on boards 如何从 schema.graphql 生成查询和突变字符串导出 - How to generate queries and mutation string export from schema.graphql 对 Azure App Insights API 的查询返回数据的最大大小是否有限制? - Is there a limit to the Maximum size of data returned of queries to the Azure App Insights API? 如何使用 Bash 将多个 gcloud 查询的 output 导出到一个 CSV 文件中的相邻工作表中? - How to export the output of multiple gcloud queries into adjacent sheets within one CSV file, using Bash? Azure 运维专区 API - Azure Devops Area API Azure 开发运营 API 认证 - Azure DevOps API Authentication 如何从yaml管道访问Azure Devops API? - How to access Azure Devops API from yaml pipeline? 导出和编辑 Azure Devops 中的工作项 - Export and edit work items in Azure Devops 将 CSV 从 Azure Automation 导出到 Microsoft Teams 而不是 blob 存储? - Export a CSV from Azure Automation to Microsoft Teams instead of blob storage? Azure DevOps:如何使用 REST API 从 git 下载文件? - Azure DevOps: How to download a file from git using REST API?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM