为什么当我尝试使用查询 ID 调用 api 时会收到错误 404?

问题描述 投票:0回答:1

我正在使用此 api 调用来检索平面工作项列表:

POST https://dev.azure.com/{organization}/{project}/{team}/_apis/wit/wiql?api-version=7.1-preview.2

我能够获取列表,所以现在我尝试使用此 api 调用,以便我可以检索工作项关系:

获取https://dev.azure.com/{organization}/{project}/{team}/_apis/wit/wiql/{id}?api-version=7.1-preview.2

我在 API 调用后使用了从结果中获得的 id,在本例中为 300。

enter image description here

但我收到错误 404。

<!DOCTYPE html>
<html>

<head>
    <title>The controller for path &#39;/{organization}/{project}/{team}/_apis/wit/wiql/300&#39; was not found or
        does not implement IController.</title>
    <style type="text/css">
        html {
            height: 100%;
        }

知道如何解决这个问题吗?谢谢你

我也尝试使用这个api调用,但仍然有错误404,但没有那个html结果。

HEAD https://dev.azure.com/{organization}/{project}/{team}/_apis/wit/wiql/{id}?api-version=7.1-preview.2

azure-devops postman azure-api-management azure-rest-api wiql
1个回答
0
投票

您应该使用这个 API 来获取每个版本中的 WIT 信息。

GET https://dev.azure.com/{organization}/{project}/_apis/wit/workitems/{id}?api-version=7.1-preview.3
© www.soinside.com 2019 - 2024. All rights reserved.