BASH for Uploading Documents in Rossum API

This Bash script shows how to upload a document automatically using Rossum API to a particular Rossum queue.

This Bash code example demonstrates how to upload a document using Rossum API to a particular Rossum queue. Set the options at the beginning of the code – they store your credentials, and also the identifier of the queue to upload in. You can find out the queue id by looking at your main screen URL, it is the number 12345 in https://elis.rossum.ai/annotations/12345.

See the reference API documentation for more details about how to use the upload API.

#!/usr/bin/env bash
# Simple script to login and upload a document to Rossum.
# Required tools: curl

[email protected]
PASSWORD=EiRu5lhgUx1Pho0r
QUEUE_ID=12345
FILE=document.pdf

curl -u "$USERNAME:$PASSWORD" -F [email protected]$FILE "https://api.elis.rossum.ai/v1/queues/$QUEUE_ID/upload"