对VSTS REST API的请求仅适用于Postman

时间:2017-12-07 00:23:38

标签: azure-devops postman azure-devops-rest-api

我试图运行此请求

RuntimeError

但我一直收到此错误

curl -X POST \
  'https://*****.visualstudio.com/DefaultCollection/_apis/wit/wiql?=&api-version=1.0' \
  -H 'authorization: Basic *****' \
  -H 'cache-control: no-cache' \
  -H 'content-type: application/json' \
  -H 'postman-token: *****' \
  -d '{
  "query": "SELECT [System.Id] FROM WorkItems"
}'

它在Postman上按预期工作,所以我认为请求和服务器都没问题。

我试图按照此处显示的第一个示例:https://www.visualstudio.com/en-us/docs/integrate/api/wit/wiql

我错过了什么吗?

1 个答案:

答案 0 :(得分:0)

网址错误,从REST API网址中删除public class UserBean implements Serializable { private int id; private String emailAddress; private ArrayList<DeviceBean> devices = new ArrayList<>(); // ... some getter setters etc. } public class DeviceBean { private String uuid; } ,网址将如下所示:

=&