2

I'm trying to search through repositories, but I can't seem to figure it out with github enterprise edition. I have tried the following with no results. Any suggestions?

curl -i http://my.domain.com/api/v3/repositories "If-Modified-Since: Mon, 16 Jun 2014 01:01:01 CST"      

curl -i http://my.domain.com/api/v3/search/repos?q=pushed:2014-06-17 


HTTP/1.1 404 Not Found
Server: GitHub.com
Date: Wed, 18 Jun 2014 16:45:58 GMT
Content-Type: application/json; charset=utf-8
Connection: keep-alive
Status: 404 Not Found
X-GitHub-Media-Type: github.beta
X-Content-Type-Options: nosniff
Content-Length: 29
Access-Control-Allow-Credentials: true
Access-Control-Expose-Headers: ETag, Link, X-RateLimit-Limit, X-RateLimit-Remaining, X-    RateLimit-Res
et, X-OAuth-Scopes, X-Accepted-OAuth-Scopes
Access-Control-Allow-Origin: *
X-GitHub-Request-Id: b4eec0e7-1b1a-48b7-81d8-d63c28b55b37

{
  "message": "Not Found"
}
Busch
  • 857
  • 10
  • 29
  • What does "with no results" mean? Do you get an empty response? No response? An error code? – ChrisGPT was on strike Jun 18 '14 at 16:18
  • it returns "message": "Not found" – Busch Jun 18 '14 at 16:21
  • 1
    Can you provide the full output of a curl -v request? Also, check the answer on this question: http://stackoverflow.com/questions/22388228/how-to-search-using-github-api-in-private-organizations – Ivan Zuzak Jun 18 '14 at 16:27
  • @IvanZuzak I have inserted the response to the second curl call above. The first one return every single repository, which is not correct. I am on windows, but have downloaded cURL. I tested it separately and it does work, so that is not the issue. – Busch Jun 18 '14 at 16:46

1 Answers1

10

One of the nice things of Github's API both public and Enterprise, is if you go to the API root, it will tell you what endpoints are available. On an enterprise instance it is: http://my.domain.com/api/v3/. Looking at my company's enterprise instance (sorry not sure of the version), I only see the legacy search API endpoints.

As a result: http://my.domain.com/api/v3/legacy/repos/search/pushed:2014-06-17 is likely the search URL you are wanting.

Charlie
  • 7,181
  • 1
  • 35
  • 49