Before you start using REST API, you must get your username and secret key.
curl -F "document=@path/file.tif" -F "key=secret_key" https://datacapture.io/api/username/document/upload/
import requests, json with open('path/file.tif', 'rb') as f: r = requests.post("https://datacapture.io/api/username/document/upload/", data={'key': 'secret_key'}, files={'document': ('file.tif', f)}) if r.status_code == 200: data = json.loads(r.text) for key, value in data.items(): print(key, value)
JSON string with the following fields:
curl -F "key=secret_key" https://datacapture.io/api/username/document/get/document_id
import requests, json r = requests.post("https://datacapture.io/api/username/document/get/document_id", data={'key': 'secret_key'}) if r.status_code == 200: data = json.loads(r.text) for key, value in data.items(): print(key, value)
JSON string with the following fields:
curl -F "key=secret_key" https://datacapture.io/api/username/document/delete/document_id
import requests, json r = requests.post("https://datacapture.io/api/username/document/delete/document_id", data={'key': 'secret_key'}) if r.status_code == 200: data = json.loads(r.text) for key, value in data.items(): print(key, value)
JSON string with the following fields:
Error | Description |
---|---|
0 | OK |
1 | Invalid image size or format |
2 | Invalid username or secret key |
3 | Document not found |
4 | Inactive upload credit |
Status | Description |
---|---|
0 | OK |
1 | Queued / Processing |
2 | Failed |
Our site saves small pieces of text information (cookies) on your device in order to deliver better content and for statistical purposes. You can disable the usage of cookies by changing the settings of your browser. By browsing our website without changing the browser settings you grant us permission to store that information on your device.