Ticket #322 (new problem)

Opened 2 months ago

Last modified 2 weeks ago

API for keywords

Reported by: niles Owned by: niles
Priority: normal Milestone:
Component: (unassigned) Version: 1.4
Severity: blocker Keywords: Keywords
Cc:

Description

It would be nice if the keywords file was made available to the public through some interface. At the moment users (like Stuart) are having to parse HTML. Stuart Mumford says that this :

https://sdac.virtualsolar.org/cgi/show_details?keyword=PHYSOBS

Is similar to what he wants.

This may lead to the keywords being in a database rather than a file. It's similar to the discussion we had a while ago about if the registry should go into a mongoDB rather than being a set of xml files. Keyword HTML would then be generated on the fly from a DB.

At the moment we're pretty heavily committed but this is a nice idea from Stuart that I wanted to capture - Niles.

Change History

comment:1 Changed 2 months ago by niles

Emailed Stuart and asked him how he saw this being used.

comment:2 Changed 2 weeks ago by joe

It already exists, sort of.

in CVS :

vso/Core/cgi/registry.cgi
vso/Core/cgi/registry_json.cgi
vso/Core/cgi/registry_json_lax.cgi

I wrote it for Tom Narock (when he was w/ VHO) and then forked it to serve JSON so that Keith could use it on the VSO WebUI rewrite he did. Keith's work got pulled due to Gurman's PHP ban on our network, and VHO went down a few years back due to a hack (they were using PHP), and I don't know if it ever went back up. The only folks who might be using it are from SVO (Solar Virtual Observatory, a SolarNet? (ESA) project headed up by Stein Vidar Hagfors Haugan)

What it actually does is accept a query, and a list of terms you're interested in, and it'll send you back a list of terms that match that query. If you enter an empty query, it'll send you back a list of all values that we have data for (so only ones that might return something).

To get it to also give the expanded name, you need to place a '+' ahead of the field (eg, '+instrument'). If you give it more than one field, it'll give you all of the permutations (eg, ['+instrument','+detector']). There's an example of how to use it at https://vso1.nascom.nasa.gov/jquery/test_registry.html

Note: See TracTickets for help on using tickets.