datasets icon indicating copy to clipboard operation
datasets copied to clipboard

Many REST API examples fail on the documentation page

Open ialbert opened this issue 2 months ago • 1 comments

If one goes to the REST API documentation for this tool

  • https://www.ncbi.nlm.nih.gov/datasets/docs/v2/reference-docs/rest-api/

It contains a comprehensive list of links on how to use the REST API.

Try the first example:

/genome/accession/{accession}/annotation_report

Click TRY, or use the CURL example

Produces the error

{
  "error": "Not Found",
  "code": 404,
  "message": "Your request is invalid. (For more help, see the NCBI Datasets Documentation at https://www.ncbi.nlm.nih.gov/datasets/docs/)"
}

then I noticed the query is empty, I fill in with a GCF_000001635.27 I get another error:

{
  "error": "Bad Request",
  "code": 400,
  "message": "Invalid argument provided: 'invalid path: \"sort\" is not a message'. (For more help, see the NCBI Datasets Documentation at https://www.ncbi.nlm.nih.gov/datasets/docs/)"
}

I randomly tried a number of other example, some failed, some produced no output, a few succeed.

ialbert avatar Apr 10 '24 21:04 ialbert