PRIDE-Archive / pride-archive-api

PRIDE Archive public Restful API
https://www.ebi.ac.uk/pride/ws/archive/v2/swagger-ui.html
0 stars 3 forks source link

Disfunctional/redundant endpoints #65

Closed mwalzer closed 4 years ago

mwalzer commented 4 years ago

With curl -X GET --header 'Accept: application/json' 'https://wwwdev.ebi.ac.uk/pride/ws/archive/v2/files/PXD005011' I get this (same for www.ebi.ac.uk):

{
  "timestamp" : 1578929288967,
  "status" : 500,
  "error" : "Internal Server Error",
  "message" : "No value present",
  "path" : "/pride/ws/archive/v2/files/PXD005011"
}
mwalzer commented 4 years ago

@chakrabandla showed me this url works https://www.ebi.ac.uk/pride/ws/archive/v2/projects/PXD005011/files Since the response should be the same (?) and the first API path is not working, why not immediately deprecate it (and remove it from swagger and the documentation)?

mwalzer commented 4 years ago

maybe a

{
  "timestamp" : 1578929288967,
  "status" : 410,
  "error" : "Gone",
  "message" : "API endpoint deprecated; use /pride/ws/archive/v2/projects/PXD005011/files",
  "path" : "/pride/ws/archive/v2/files/*"
}

HTTP status code 410:

6.5.9.  410 Gone
   The 410 (Gone) status code indicates that access to the target
   resource is no longer available at the origin server and that this
   condition is likely to be permanent.  If the origin server does not
mwalzer commented 4 years ago

Aha, so there is a subtlety to the accession in the '/pride/ws/archive/v2/files' takes a PXDF accession, which designates a single file. Reading accession, I immediately jumped to conclude a submission PXD.