Publishing to uData¶
DicoGIS publishes metadata to a uData catalog through its API, in two steps: export the metadata as JSON files for uData, then publish the folder holding them.
Export the metadata¶
From the GUI, pick JSON files for uData as output format: at the end of the analysis, the Publish tab points at the output folder. From the command line:
dicogis-cli inventory --input-folder ./my_data --language FR --output-format udata --output-path ./my_datasets
Each dataset makes one JSON file, which becomes a uData dataset: title, description listing its metadata, tags (format, CRS…) and DicoGIS extras. Nothing else is uploaded: the dataset has no resource.
The description and the extras hold the location of the dataset (path, PostgreSQL service): check it can be published.
Publish them¶
The API key is the one of the account, in its profile on the catalog. It’s asked for unless given through --udata-api-key or DICOGIS_UDATA_API_KEY.
dicogis-cli publish --input-folder ./my_datasets --udata-api-url-base https://www.data.gouv.fr/api/
With --udata-organization-id, the datasets are published in the organization instead of the account.
The default API URL is the one of the demo instance of data.gouv.fr, https://demo.data.gouv.fr/api/, to try it out.
From the GUI, pick uData as catalog type in the Publish tab, fill the connection, then Publish. A recap of the catalog, the folder and the number of files to publish asks for confirmation before anything is sent. The report is shown at the bottom of the tab.

Datasets already in the catalog¶
A dataset is published once. A JSON file is ignored when the catalog already has a dataset of the account (or of the organization) with the same slug or the same DicoGIS signature, a hash of its metadata. Datasets changed in the catalog are never overwritten, and changes of the data are never sent: delete the dataset in the catalog to publish it again.
JSON files not exported by DicoGIS are ignored too.