Command line interface

CLI scripts can be used perform all actions available in the UI

Find the CLI scripts on GitHub.

LinkedDataHub CLI wraps the HTTP API into a set of shell scripts with convenient parameters. The scripts can be used for testing, automation, scheduled execution and such. It is usually much quicker to perform actions using CLI rather than the user interface, as well as easier to reproduce.

Some scripts correspond to a single request to LinkedDataHub, others combine others into tasks with multiple interdependent requests, such as CSV import.

You will need to supply a .pem file of your WebID certificate as well as its password as script arguments, among others.

Scripts

Currently supported:

Purpose Script
General
Create document create-document.sh
Update document update-document.sh
Create container create-container.sh
Create item create-item.sh
Create result set chart create-result-set-chart.sh
Create SELECT query create-select.sh
Imports
Create file imports/create-file.sh
Create query imports/create-query.sh
Create CSV import imports/create-csv-import.sh
Import CSV data imports/import-csv.sh
Administration
Add owl:import to ontology admin/add-ontology-import.sh
Clear and reload ontology admin/clear-ontology.sh
Access control
Add agent to group admin/acl/add-agent-to-group.sh
Create authorization admin/acl/create-authorization.sh
Create group admin/acl/create-group.sh
Model
Create class admin/model/create-class.sh
Create CONSTRUCT query admin/model/create-construct.sh
Create property constraint admin/model/create-property-constraint.sh
Create restriction admin/model/create-restriction.sh
Import ontology admin/model/import-ontology.sh
Sitemap
Create CONSTRUCT query admin/sitemap/create-construct.sh
Create DESCRIBE query admin/sitemap/create-describe.sh
Create template admin/sitemap/create-template.sh
Create template parameter admin/sitemap/create-parameter.sh

Usage example:

./create-file.sh https://linkeddatahub.com/my-context/my-dataspace/ \
-f linkeddatahub.pem \
-p CertPassword \
--title "Friends" \
--file-slug 646af756-a49f-40da-a25e-ea8d81f6d306 \
--file friends.csv \
--file-content-type text/csv

See also the Import CSV data tutorial.