English 中文(简体)
Why am I getting error 404 when I try to call an api using query ID?
原标题:

I am using this api call to retrieve a list of flat workitems:

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

I was able to get the list, so now I am trying to use this api call so I can retrieve the workitemrelations:

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

I was using the id that I get from my result in the post api call, say in this example is 300.

enter image description here

But I am getting error 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%;
        }

Any idea how to fix this? Thank you

I also tried using this api call, but I still having error 404, but without that html result.

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

问题回答

You should be using this API to get WIT information in latest revision.

GET https://dev.azure.com/{organization}/{project}/_apis/wit/workitems/{id}?api-version=7.1-preview.3




相关问题
Team foundation server in the cloud?

We have been using TFS on our own server for a while. We would like to move it in the cloud. Is there any good hosted service? Note: we would like to import all our source and projects

热门标签