Skip to content

Automatically test APIs in registry and report on ones that are no longer functioning #4

Open

Description

@cmungall

It looks like some entries are no longer functional, e.g.
http://smart-api.info/ui/?url=/api/metadata/da745f0b6c95ce27e9769a4a0d8d0a15#/

It would be useful to poll the APIs periodically to determine which ones are up, and which ones do not provide 200 responses to example queries

Activity

  1. micheldumontier commented on Dec 20, 2017

    @micheldumontier

    Actually, this does work. it's just that there is a 301 redirect, and seems like the web ui does not follow it

    curl -v -L -X GET "http://www.disease-ontology.org/api/metadata/DOID:678"
    
    Note: Unnecessary use of -X or --request, GET is already inferred.
    *   Trying 134.192.156.200...
    * TCP_NODELAY set
    * Connected to www.disease-ontology.org (134.192.156.200) port 80 (#0)
    > GET /api/metadata/DOID:678 HTTP/1.1
    > Host: www.disease-ontology.org
    > User-Agent: curl/7.52.1
    > Accept: */*
    >
    < HTTP/1.1 301 MOVED PERMANENTLY
    < Date: Wed, 20 Dec 2017 16:00:10 GMT
    < Server: Apache/2.4
    < Location: http://www.disease-ontology.org/api/metadata/DOID%3A678/
    < Content-Length: 0
    < Content-Type: text/html; charset=utf-8
    <
    * Curl_http_done: called premature == 0
    * Connection #0 to host www.disease-ontology.org left intact
    * Issue another request to this URL: 'http://www.disease-ontology.org/api/metadata/DOID%3A678/'
    * Found bundle for host www.disease-ontology.org: 0x2307d9074e0 [can pipeline]
    * Re-using existing connection! (#0) with host www.disease-ontology.org
    * Connected to www.disease-ontology.org (134.192.156.200) port 80 (#0)
    > GET /api/metadata/DOID%3A678/ HTTP/1.1
    > Host: www.disease-ontology.org
    > User-Agent: curl/7.52.1
    > Accept: */*
    >
    < HTTP/1.1 200 OK
    < Date: Wed, 20 Dec 2017 16:00:11 GMT
    < Server: Apache/2.4
    < Transfer-Encoding: chunked
    < Content-Type: application/json
    <
    {"definition": "\"A movement disease characterized by serious and progressive problems with control of gait and balance, along with complex eye movement and thinking problems. It involves gradual deterioration and death of specific volumes of the brain.\" [url:http\\://en.wikipedia.org/wiki/Progressive_supranuclear_palsy, url:http\\://www.ninds.nih.gov/disorders/psp/psp.htm]", "xrefs": ["ICD10CM:G23.1", "MESH:D013494", "NCI:C85028", "OMIM:601104", "OMIM:609454", "OMIM:610898", "ORDO:683", "SNOMEDCT_US_2016_03_01:192975003", "SNOMEDCT_US_2016_03_01:192976002", "SNOMEDCT_US_2016_03_01:28978003", "UMLS_CUI:C0038868"], "name": "progressive supranuclear palsy", "subsets": ["DO_rare_slim"], "synonyms": ["progressive supranuclear ophthalmoplegia EXACT MTHICD9_2006:333.0", "Steele-Richardson-Olszewski syndrome EXACT "], "parents": [["is_a", "movement disease", "DOID:480"]], "id": "DOID:678"}* Curl_http_done: called premature == 0
    * Connection #0 to host www.disease-ontology.org left intact
    
  2. micheldumontier commented on Dec 20, 2017

    @micheldumontier

    @newgene is there anyway to get the webui to follow 301 redirects?

  3. cmungall commented on Dec 20, 2017

    @cmungall
    Author

    A good catch

    Shouldn't the 301 response be explicitly documented in the swagger?

    Not a big deal.

    Besides this example that is not a good one for these purposes, there may be other cases where APIs get stale, might be useful to have some kind of periodic check - is this something that could be done with a simple python script over the SmartAPI API? I could take a crack at it

  4. micheldumontier commented on Dec 20, 2017

    @micheldumontier

    sure - i think it would be useful to get uptime. take a look at this site that monitors sparql endpoints: http://yummydata.org/ what do you think?

  5. newgene commented on Dec 22, 2017

    @newgene
    Contributor

    @cmungall @micheldumontier in this case, I would rather the API metadata updated with the correct API endpoint path (with the slash). Not the issue for UI web app.

  6. newgene commented on Dec 22, 2017

    @newgene
    Contributor

    btw @cmungall @micheldumontier, we should create issues in SmartAPI repo instead.

    This repo meant to be a default place for people to put their API metadata if they need a place to host.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions