Help
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Copilot Lvl 2
Message 1 of 2

Github REST API is not working for custom url

Solved! Go to Solution.

I am trying to use the Github API v3 in order to get all the files in the repositories and other details. But in my organization we have the github url as https://github.abc.company_name.com. In this case I keep my REST url as https://abi.github.abc.company_name.com instead of https://abi.github.com. It keep gives "Could not get any response".

 

I tried with different authentication. I am not able to get any 200 response. Please help me.

Ref URL : https://developer.github.com/v3/

1 Reply
Solution
Copilot Lvl 2
Message 2 of 2

Re: Github REST API is not working for custom url

To access APIs on GitHub Enterprise, you need to call the APIs as below:

https://hostname/api/v3/

So if your GitHub url is https://github.abc.company_name.com, then you need to call the APIs with the base url as below:

https://github.abc.company_name.com/api/v3/

Also note that you would need to add Basic Auth header when you make the API call since the APIs would be secured.