API publishing

When wis2box starts, the API provisioning environment is initialized. At this stage, the following steps are required:

  • station metadata has been configured

  • discovery metadata has been created

  • data pipelines are configured and running

Let’s dive into publishing the data and metadata:

wis2box provides an API supporting the OGC API standards using pygeoapi.

Station metadata API publishing

The first step is to publish our station metadata to the API. The command below will generate local station collection GeoJSON for pygeoapi publication.

wis2box metadata station publish-collection

Note

run the command wis2box metadata station sync /path/to/station_list.csv to both cache stations from OSCAR/Surface and publish station as a collection to the wis2box API

See also

Station metadata

Discovery metadata API publishing

This step will publish dataset discovery metadata to the API.

wis2box metadata discovery publish /path/to/discovery-metadata.yml

Dataset collection API publishing

The below command will add the dataset collection to pygeoapi from the discovery metadata MCF created as described in the Discovery metadata section.

wis2box data add-collection $WIS2BOX_DATADIR/data/config/foo/bar/baz/discovery-metadata.yml

To delete the colection from the API backend and configuration:

wis2box api delete-collection foo.bar.baz

Note

Changes to the API configuration are reflected and updated automatically.

Summary

At this point, you have successfully published the required data and metadata collections to the API.