Jotta E
Jotta E

Reputation: 302

GitHub-API - get latest api version return "Not Found"


I am using GitHub-API to get the latest version for my used API's e.g. "Parse-SDK-Android" & "parse-server".

Querying "https://api.github.com/repos/ParsePlatform/Parse-SDK-Android/releases/latest" returns the wright JSON data.

Querying "https://api.github.com/repos/ParsePlatform/parse-server/releases/latest" returns JSON "message": "Not Found".

According to the docs it could be an authentication problem.

So i have run the queries using a generated access_token and it's still give me "message": "Not Found", so it's not an authentication problem.

As i see parse-server repository isn't private.

Does anybody have an idea?

Thanks

Upvotes: 4

Views: 3868

Answers (2)

DenisKolodin
DenisKolodin

Reputation: 15081

If you have this issue check:

  1. The Repository is public
  2. The Release is public as well
  3. No mistakes in user's or repo's names
  4. Don't put a trailing slash: USE /releases, NOT /releases/

If everything is fine, try to request the following link to get a JSON response:

https://api.github.com/repos/{OWNER}/{REPO}/releases

Upvotes: 1

Anton Sizikov
Anton Sizikov

Reputation: 9240

There is nothing wrong with your request.

GET: https://api.github.com/repos/ParsePlatform/parse-server/releases

Gives you an empty result:

[]

They just don't have releases created for this repository. Compare it with

GET: https://api.github.com/repos/ParsePlatform/Parse-SDK-Android/releases

As a workaround you can use

GET: https://api.github.com/repos/ParsePlatform/parse-server/tags

And look at the latest tag.

    {
       "name": "2.1.2",
       "zipball_url": "https://api.github.com/repos/ParsePlatform/parse-server/zipball/2.1.2",
       "tarball_url": "https://api.github.com/repos/ParsePlatform/parse-server/tarball/2.1.2",
       "commit": {
          "sha": "01f4bcc3e3f259f2e6e763584e764ed036a657fe",
          "url": "https://api.github.com/repos/ParsePlatform/parse-server/commits/01f4bcc3e3f259f2e6e763584e764ed036a657fe"
       }
     }

Upvotes: 5

Related Questions