opensensorhub / osh-core

OpenSensorHub Core Modules
http://docs.opensensorhub.org
Mozilla Public License 2.0
32 stars 16 forks source link

Resolve internal SensorML hrefs #135

Open alexrobin opened 4 years ago

alexrobin commented 4 years ago

When a SensorML System or AggregateProcess is presented via OSH APIs, we should be able to configure where href should be used to only expose the first level of the document, and let API consumers drill down to higher levels of details by following the links (e.g. large capabilities sections, events, components, etc.).

When an href is used on a property, an ID will be autogenerated for the property value so it can be referenced later. The href should then be a proper API request that resolves back to the correct section of the document.

For example, we could expose a service on the smlRegistry endpoint that allows fetching only sections of a SensorML document. Example request smlRegistry?uid=uid_of_main_procedure&section=section_ID.

Alternatively, we could just add a section_id vendor parameter to a request for the procedure description (i.e. additional param to a DescribeSensor request in SOS or /procedures/{id}?section_id=AAA in the REST API).