API documentation

Back to main page

Overview

The status API has four endpoints:

Note, you can omit the "v1" component of the URL, but it is recommended to keep it (and update URLs that don't include it) so that future breaking API changes do not automatically affect you. Omitting the version in the URL will use the latest version of the API.

A status will have the following components:

Should you request a nonexistant site ID with api/getstatus/byid or name with api/getstatus/byname, the returned JSON will have a single field (error) and the status code will be 406.

Examples

  1. Get all sites, identified by their site ID:
  2. $ curl https://parkfalls.gps.caltech.edu/car/opstat/api/v1/getstatusall/byid
    
     {
      "ae": {
        "id": "ae",
        "name": "Ascension_Island",
        "status": "No",
        "descr": "Solar tracker dome failed. Unclear how this can be fixed under the current Covid-19 restrictions.",
        "user": "dfeist",
        "date": "20200813", "display_descr": "Solar tracker dome failed. Unclear how this can be fixed under the current Covid-19 restrictions. [dfeist 20200813]"
        },
      "an": {
        "id": "an",
        "name": "Anmyeondo",
        "status": "Yes",
        "descr": "Normal operation on August 19",
        "user": "y_soh",
        "date": "20200915",
        "display_descr": "Normal operation on August 19 [y_soh 20200915]"
        },
      "bi": {
        "id": "bi",
        "name": "Bialystok",
        "status": "No",
        "descr": "Dismounted on 2018/10/01. System will be moved to Cyprus/Greece, first measurements expected in February 2019",
        "user": "christof",
        "date": "20181001",
        "display_descr": "Dismounted on 2018/10/01. System will be moved to Cyprus/Greece, first measurements expected in February 2019 [christof 20181001]"
        },
      ...
    }
            
  3. Get all sites, identified by their site names:
  4. $ curl https://parkfalls.gps.caltech.edu/car/opstat/api/v1/getstatusall/byname
    
    {
      "Ascension_Island": {
        "id": "ae",
        "name": "Ascension_Island",
        "status": "No",
        "descr": "Solar tracker dome failed. Unclear how this can be fixed under the current Covid-19 restrictions.",
        "user": "dfeist",
        "date": "20200813",
        "display_descr": "Solar tracker dome failed. Unclear how this can be fixed under the current Covid-19 restrictions. [dfeist 20200813]"
        },
      "Anmyeondo": {
        "id": "an",
        "name": "Anmyeondo",
        "status": "Yes",
        "descr": "Normal operation on August 19",
        "user": "y_soh",
        "date": "20200915",
        "display_descr": "Normal operation on August 19 [y_soh 20200915]"
        },
      "Bialystok": {
        "id": "bi",
        "name": "Bialystok",
        "status": "No",
        "descr": "Dismounted on 2018/10/01. System will be moved to Cyprus/Greece, first measurements expected in February 2019",
        "user": "christof",
        "date": "20181001",
        "display_descr": "Dismounted on 2018/10/01. System will be moved to Cyprus/Greece, first measurements expected in February 2019 [christof 20181001]"
        },
      ...
    }
            
  5. Get one site (here, Park Falls) by its site ID:
  6. $ curl https://parkfalls.gps.caltech.edu/car/opstat/api/v1/getstatus/byid/pa
    
    {
        "id": "pa",
        "name": "Park_Falls",
        "status": "Yes",
        "descr": "(Fingers crossed) Still working fine!",
        "user": "coleen",
        "date": "20220222",
        "display_descr": "(Fingers crossed) Still working fine! [coleen 20220222]"
    }
            
  7. Get one site (here, Park Falls) by its site name:
  8. $ curl https://parkfalls.gps.caltech.edu/car/opstat/api/v1/getstatus/byname/Park_Falls
    
    {
        "id": "pa",
        "name": "Park_Falls",
        "status": "Yes",
        "descr": "(Fingers crossed) Still working fine!",
        "user": "coleen",
        "date": "20220222",
        "display_descr": "(Fingers crossed) Still working fine! [coleen 20220222]"
    }
            

Back to main page