1
votes

I'm trying to run this request

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"
}'

but I keep getting this error

{"count":1,"value":{"Message":"A value is required but was not present in the request.\r\n"}}

It works as expected on Postman, so I think the request and the server are OK.

I'm trying to follow the first example shown here: https://www.visualstudio.com/en-us/docs/integrate/api/wit/wiql

Am I missing something?

1

1 Answers

0
votes

The URL is wrong, remove =& from the REST API url and the url will be like this:

https://*****.visualstudio.com/DefaultCollection/_apis/wit/wiql?api-version=1.