0
votes

I want to create GitHub Enterprise Service - service connection using azure DevOps rest api.

I found this rest api in Microsoft Docs -

POST https://dev.azure.com/{organization}/_apis/serviceendpoint/endpoints?api-version=6.0-preview.4

When I create service connection manually It asks me for url , connection name and GitHub token

enter image description here

How Can I pass this in json ?

What Json Data do I need to use for creating service connection ?

1

1 Answers

0
votes

You could capture the request body by pressing F12 while you manually create GitHub Enterprise Server service connection. After pressing "Verify and save", it's supposed to get the request body under Network tab. Check my following screenshots, I have circled the useful part:

enter image description here

enter image description here