Reference implementations for uploading files to TriplyDB using the TUS resumable upload protocol.
| Language | Directory |
|---|---|
| Java | java/ |
| Python | python/ |
Both implementations follow the same 4-step upload workflow:
- Create Job --
POST /datasets/{account}/{dataset}/jobs - Upload File -- TUS protocol upload to
{jobUrl}/add(5MB chunks) - Start Job --
POST {jobUrl}/start - Poll Status -- Exponential backoff until
finished,canceled, orerror
Both implementations accept the same CLI arguments:
| Parameter | Required | Description |
|---|---|---|
--file |
Yes | Path to the file to upload |
--account |
Yes | TriplyDB account name |
--dataset |
Yes | TriplyDB dataset name |
--token |
Yes | TriplyDB API token |
--api-url |
No | API URL (default: https://api.triplydb.com) |
--default-graph |
No | Default graph name for imported triples |
--overwrite-all |
No | Overwrite all existing graphs in the dataset |
--merge-graphs |
No | Merge data into existing graphs |
cd python
./build.sh
./upload.sh --file data.ttl --account myaccount --dataset mydataset --token YOUR_TOKENcd java
./build.sh
./upload.sh --file data.ttl --account myaccount --dataset mydataset --token YOUR_TOKEN- TUS Protocol -- Resumable upload specification
- TriplyDB OpenAPI specification
- TriplyDB API Documentation