Deploying to the Databus - LOD-GEOSS/databus-snippets GitHub Wiki

Deploying to the Databus

The requirement for uploading anything to the Databus is a Databus Account, you can create one at the website.

Option 1: Using the Web UI

The easiest way of deploying data to the Databus is by using the Web UI. It can be accessed here. It provides a straightforward UI for filling out the necessary URIs and other parameters to generate the DataID.

Option 2: Using the API

Step 1: Generating the DataID

If you want to submit content via API you need to create the DataID yourself. An example for the DataID can either be seen in the third step of Option 1 or in the example files in this repository. The following table explains the purpose and restrictions of the key in the JSON-LD file. It is based on the keys used in the example in databus_api_examples/dataset.jsonld.

Level JSON key Description Restrictions
Group (optional) title A name given to the group. In most cases its fine using the same as in label. At least 3 characters long, no further restrictions.
Group (optional) abstract A short description of the group. A not too long, one line sentence about the group. At least 25 characters long.
Group (optional) description A longer and more detailed description of the purpose of the group At least 25 characters long.
Dataset title A name given to the artifact. In most cases its fine using the same as in label. At least 3 characters long, no further restrictions.
Dataset abstract A short description of the artifact A not too long, one line sentence about the group.
Dataset id The identifier for the Version. Commonly a version is identified by time (e.g. 2021-07-01) or with a semantic version (e.g. 1.2.1)
Dataset license A URI of an license (like http://creativecommons.org/licenses/by/4.0/) Needs to be a valid URI
Dataset description A longer and more detailed description of the purpose of the artifact At least 25 characters long.

Step 2: Deploying to the Databus

For this two steps are required:

  1. Finding the API Key: Head over to https://energy.databus.dbpedia.org/$$USER$$#settings and scroll the page down to the heading API Keys. If none has been created yet, a new one needs to be created.
  2. Submitting the data to the Databus: Send a HTTP PUT request to the Identifier of the Dataset (Version IRI) with the HEADER modified with: X-API-KEY being the API Key from Step 1 and Content-Type being application/json.

Example with curl:

curl -H "X-API-Key: $$YOUR_API_KEY$$" -H "Content-Type: application/json" -X PUT $$DatasetIdentifier$$ -d 'DATAID_JSONLD_CONTENT'

Option 3: Using the python3 script

Another alternative is to follow the example shown in databusclient_example.py and use a yaml file similar to the one given in example/new_dataset.yml to create a dataset and deploy it correctly to the Databus.