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 suite of 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 API publication.

wis2box metadata station publish-collection


This command also runs automatically at startup and thereafter every 10 minutes to keep your stations up to date.

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

To unpublish discovery metadata from the API:

wis2box metadata discovery unpublish metadata-id


metadata-id is the metadata.identifier value in your /path/to/discovery-metadata.yml file

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

Deleting a dataset

To delete a dataset from the API backend and configuration:

wis2box data delete-collection dataset-id


Changes to the API configuration are reflected and updated automatically.


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