Share via

How to fix 400 error when using api "POST https://dev.azure.com/{organization}/{project}/_apis/git/repositories/{repositoryId}/importRequests?api-version=7.1-preview.1"

sona pawar 0 Reputation points
2024-09-05T12:47:08.7533333+00:00

I have followed the following steps :

  1. Created a service connection endpoint with the following request format :https://dev.azure.com/{org}/_apis/serviceendpoint/endpoints?api-version=7.1-preview. In the body have put this data as JSON :
       {
         "data": {},
         "name": "ServiceEndpoint-1",
         "type": "github",
         "url": "https://github.com/",
         "authorization": {
           "parameters": {
             "username": "XYX",
             "password": 
    
Community Center | Not monitored

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.