Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

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

2024.05.15


View file
nameapi-diagram.pdf
height250


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

2024.01.05

Added "corr_integ_time_sec" and "slew_sec" ods_data attribute descriptions to the public documentation page.

On 11/1/23 13:54, Daniel Faes wrote:

Hi Bang and all,

I inform you that the VLA data sender is already generating two new JSON fields:

- "corr_integ_time_sec": correlator integration time (float type). Currently, the field is only generated if "src_is_pulsar_bool=false"

- "slew_sec": the time taken for the array to reach the source (counted from "src_start_utc"; float type)

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

2023.10.17

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:8191/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 above)

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:

...