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": 
    
Not Monitored
Not Monitored
Tag not monitored by Microsoft.
39,202 questions
{count} votes

Your answer

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