https://tools.pds-rings.seti.org/opus/api/metadata/COISS_2111-1866071296_1866225122-N1866071296_1.json?cols=opusid,instrument,planet,target,time1,observationduration,SURFACEGEOsaturncenterdistance,SURFACEGEOtitancenterdistanceThis returns:
[{"opus_id": "COISS_2111-1866071296_1866225122-N1866071296_1"},Even though we queried on, for example, "opusid", we were returned a field named "opus_id". Worse yet, we have two returned fields called "center_distance" without a way to disambiguate them (and they are incorrectly the same value).
{"instrument_id": "COISS"},
{"planet_id": "SAT"},
{"target_name": "TITAN"},
{"time1": "2017-048T23:59:39.059"},
{"observation_duration": 46.0},
{"center_distance": 272061.836},
{"center_distance": 272061.836}
]
A second problem is that some of the returned values, such as "COISS" or "SAT", are internal representations, not the values normally shown to the user such as "Cassini ISS" or "Saturn".
To fix these problems while still providing backwards compatibility, we have introduced a second version of this API:
/opus/api/metadata_v2/<OPUSID>.jsonThis version fixes all of the problems mentioned above. For example, the similar query:
https://tools.pds-rings.seti.org/opus/api/metadata_v2/COISS_2111-1866071296_1866225122-N1866071296_1.json?cols=opusid,instrument,planet,target,time1,observationduration,SURFACEGEOsaturncenterdistance,SURFACEGEOtitancenterdistancereturns:
[{"opusid": "COISS_2111-1866071296_1866225122-N1866071296_1"},Note that the labels are the same as the requested slugs, and the values are the same as seen in the main OPUS web UI.
{"instrument": "Cassini ISS"},
{"planet": "Saturn"},
{"target": "Titan"},
{"time1": "2017-048T23:59:39.059"},
{"observationduration": 46.0},
{"SURFACEGEOsaturncenterdistance": 1284796.671},
{"SURFACEGEOtitancenterdistance": 272061.836}
]
We strongly suggest that you use the new version of the metadata API going forward to avoid these problems.
No comments:
Post a Comment