Search code examples
azureazure-devopspostman

Error on calling Azure Get blobs zip API, parameter blobsID


I tried to called the API from Azure like this on Postman: enter image description here

On headers i have:

  • Authorization : Basic AAAAAAAAAAAAAAAAAAAAAA
  • Content-Type : application/json
  • Accept : application/zip

Whith everything like this i all get is the error that blobIds is null but its right there. I dont understand what am i doing wrong.

Can somebody explain what is happening to the blobIds parameter?


Solution

  • In order to use Get Blobs Zip Rest API, you need to invoke the below URL with given request body.

    URL :-

    POST https://dev.azure.com/{organization}/{project}/_apis/git/repositories/{repositoryId}/blobs?filename={filename}&api-version=7.1
    

    Request Body :-

    Pass the Blob Ids as given below.

    [
      "783cf*****782837",
      "0ca446*****c458"
    ]
    

    You will get a binary file response which can later be downloaded as zip file.

    enter image description here