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.
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
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.