0
votes

I am trying to get an Item from VSTS using the REST API as per this documentation.

While Invoking the API from Postman I am getting the below error

{ "$id": "1", "innerException": null, "message": "Wildcards are not allowed.", "typeName": "Microsoft.TeamFoundation.InvalidPathException, Microsoft.TeamFoundation.Common", "typeKey": "InvalidPathException", "errorCode": 0, "eventId": 0 }

API url I am trying

https://something.visualstudio.com//DefaultCollection/_apis/tfvc/items?path=$/Teams/Photos/Img/Hester.jpg?api-version=1.0

1
The parameters format is xxx?p1=xx&p2=xx, so your API url is incorrect, what's the result after trying my solution?starian chen-MSFT
@starianchen-MSFT, Yes your answer helped me solve it Thanks :) Forgot to upvote, I have done it nowCSharped

1 Answers

1
votes

using this url instead (replace ? to &):

https://something.visualstudio.com//DefaultCollection/_apis/tfvc/items?path=$/Teams/Photos/Img/Hester.jpg&api-version=1.0

or

https://something.visualstudio.com//DefaultCollection/_apis/tfvc/items/$/Teams/Photos/Img/Hester.jpg?api-version=1.0