Skip to main content

Upload and index

Now you are ready to upload your first dataset.

info

The cocktail dataset can be downloaded here:

To upload a new dataset you can use one of the following code snippets (remember to use the Bearer Token that you get at Signin Signup and login):

  curl -X POST \
'https://app.qanswer.ai/api/dataset/upload?dataset=cocktails' \
-H 'Authorization: Bearer eyJhbGciOiJIUz .....' \
-F file=@/path/to/file/cocktails.nt
IMPORTANT

The dataset must be in N-Triple format and must be syntactically correct. You can both check and clean a file using serdi

serdi -i ntriples -o ntriples dump.nt > dump_clean.nt

After uploading the dataset it needs to be indexed. This can be done with the following code snippets:

  curl -X POST \
'https://app.qanswer.ai/api/dataset/index' \
-H 'Authorization: Bearer eyJhbGciOiJIUzUxMi....' \
-H 'Content-Type: application/json' \
-d '{"dataset": "cocktails"}'

The dataset is now ready to be queried!