MicrosoftDocs / feedback

📢 docs.microsoft.com site feedback
https://learn.microsoft.com
Creative Commons Attribution 4.0 International
239 stars 160 forks source link

Question. Azure DevOps Services REST API docs : Git Items Get #1065

Open max-zaytsev opened 5 years ago

max-zaytsev commented 5 years ago

Hello Guys,

I'm trying to get metadata for a single file in Git repo using Azure DevOps Services REST API 5.1 but I always get content of the file in the response instead of json like in documentation, e.g. :

{
  "count": 1,
  "value": [
    {
      "objectId": "61a86fdaa79e5c6f5fb6e4026508489feb6ed92c",
      "gitObjectType": "blob",
      "commitId": "23d0bc5b128a10056dc68afece360d8a0fabb014",
      "path": "/MyWebSite/MyWebSite/Views/Home/_Home.cshtml",
      "url": "https://dev.azure.com/fabrikam/_apis/git/repositories/278d5cd2-584d-4b63-824a-2ba458937249/items/MyWebSite/MyWebSite/Views/Home/_Home.cshtml?versionType=Branch&versionOptions=None"
    }
  ]
}

I'm using different sets of parameters ( e.g. download=false, includeContentMetadata=true) but as a result I have just a string with content of the file.

Could you please advise whether it is by design or am I missing something?

Thanks, Max

welcome[bot] commented 5 years ago

Thank you for creating the issue! One of our team members will get back to you shortly with additional information.