Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Updated URLs and port numbers.

...

This is to summarize the current state of the 'helloworld' version of this API.

The ODS REST/API server now listens on two ports:

8191 - is the HTTPS port that SpaceX and other external entities will use.  It uses the URL:
https://obs.vla.nrao.edu:8191/ and is limited to the following paths only:
- /ods_data     -- for only the upcoming observations, no date-range fetches allowed.
- /docs         -- sends the document page (that only documents external functions)
- /openapi.yaml -- semds the raw openapi yaml file

8192 - is the HTTP port that will be used internally and has wider access to the ODS database.  It uses the URL: http://turing.aoc.nrao.edu:8192/ and can do all things that the server supports which is currently the following paths:
- /ods_data     -- as above but also includes time-range fetches.
- /ods_put      -- facilitates adding data to the database
- /docs         -- sends the document page (that only documents external functions)
- /openapi.yaml -- semds the raw openapi yaml file
- /openapi.json -- semds the raw openapi json file

See below for more detailed descriptions of the 'ods_data' and 'ods_put' operations.

-----------------------------------

...

To get all database entries with a src_end_utc greater than now:

http://wirthturing.aoc.nrao.edu:8192/ods_data

or

https://obs.vla.nrao.edu:81918192/ods_data

Example Response:

{"ods_data":[

...

http://turing.aoc.nrao.edu:81918192/ods_data?from='2023-10-04 21:00:00'&to='2023-10-04 23:00:00' 

...

if 'from' & 'to' are absent - the ods_data for 'src_end_utc' >= now() are fetched (the same as described)

if 'from' & 'to' are both present - fetch ods_data that was entered into the database between those times

...

1) HTTP GET where the JSON is in the URL:

http://wirthturing.aoc.nrao.edu:81918192/ods_put?{"notes":"inAdv:True","src_id":"FRB121102A","src_ra":82.99458333333334,"site_id":"vla","src_dec":33.14791666666667,"freq_lower":1000000000,"freq_upper":2000000000,"src_end_utc":"2023-06-28T14:22:48.000632","trk_rate_ra":0,"trk_rate_dec":0,"src_start_utc":"2023-06-28T14:11:02.000504","site_lat":34.07861,"site_lon":-107.61806,"site_elev":2115}]}

...

2) HTTP POST where the JSON is in the HTTP Request body:

http://wirthturing.aoc.nrao.edu:81918192/ods_put

If the PUTs worked properly, you should get the following JSON response:

...