Project ID (optional, defaults to user's 'active project')
Satelligence API (v1)
The satelligence API provides 4 capabilities to synchronize data to and from the platform:
- Bulk uploads new!
A full fledged set of endpoints to manage supply chain data in the platform. Use this endpoint to set up automated data synchronization of supply chain data to the Satelligence platform and fully leverage the risk assessment and mitigation features inside the platform.
- Plot downloads new!
An endpoint that can serve to sync plot data from the platform into your own systems. It can serve both plot metadata, geometries, and risk assessments from the platform.
- Get Risk Info
A lightweight endpoint to access geospatial risk information for a given boundary without uploading supply chain data to the platform. Use this endpoint to leverage the Satelligence geospatial data but build your own risk assessment and mitigation strategies outside of the Satelligence platform.
- Detections export
To fetch all deforestation and fire detections in shapefile format. Use this endpoint to gather the raw Satelligence real time data and build your own archive of detections for fully custom workflows.
Authentication requires an API token, contact support@satelligence.com to request one. To authenticate your requests, set the Authorization: Bearer $token
header in your requests.
The token is connected to a personal account, it will have the same permissions as the account that created it. If the linked user belongs to multiple projects, the token will default to the 'active project' for that user.
https://docs.satelligence.com/_mock/api/
https://api.satelligence.com/
Bulk Uploads - New!
These endpoints give full control over supply chain data uploads and ingestion.
For a bulk upload, plots must be formatted as a GeoJSON file and uploaded to a secure location in Satelligence's Google Cloud Storage bucket through a signed URL. The complete process consists of three steps:
- Create a bulk upload with the POST
/bulk-uploads
endpoint, which generates signed URLs for each file you want to upload. - Use the signed URLs to upload the files to the required place for this upload.
- Start the bulk upload with the POST
/bulk-uploads/start
endpoint.
The process can be automated with the scripts linked here.
Request
This endpoint generates signed URLs needed to upload plot files. The signed URLs are valid for 60 minutes. Any uploaded files for which an upload is not started within the 60 minute timeframe are deleted.
After calling this endpoint, you need to upload each file to the provided Google Cloud Storage URLs. To do this with cURL, you can use:
curl -X PUT --upload-file $path_to_file $your_signed_url -H 'Content-Type: application/octet-stream'
Examples showing how to do this in Python and Javascript can be found in the example scripts.
The endpoint returns an uploadId
that needs to be given to the /bulk-uploads/start
endpoint to trigger the upload, after uploading the plot files to the signed URLs.
Supplier name. Currently bulk uploads are only supported for one supplier at a time.
- Mock server
https://docs.satelligence.com/_mock/api/v1/bulk-uploads
- Production server
https://api.satelligence.com/v1/bulk-uploads
- Python
- JavaScript
- curl
- C#
- Go
- Java
- Payload
import requests
url = "https://docs.satelligence.com/_mock/api/v1/bulk-uploads"
payload = {
"projectId": "string",
"supplier": "Lumon Industries",
"fileNames": [
"string"
]
}
headers = {
"Content-Type": "application/json",
"Authorization": "Bearer <YOUR_TOKEN_HERE>"
}
response = requests.post(url, json=payload, headers=headers)
data = response.json()
print(data)
{ "uploadId": "556cd039-90c6-4091-9720-c761746f5972", "signedUrls": [ { … } ] }
Request
Start processing a bulk upload with a given upload ID. Allows choosing whether to overwrite existing data or not.
This endpoint validates constraint on the uploaded files:
- Less than 100 files can be uploaded at a time
- Total size of all files must be less than 2GB
Note: only one upload can be in progress for a given supplier at a time. If you try to start an upload for a supplier that already has an upload in progress, you will get a '429 Too Many Requests' error, and will have to retry later.
- Mock server
https://docs.satelligence.com/_mock/api/v1/bulk-uploads/start
- Production server
https://api.satelligence.com/v1/bulk-uploads/start
- Python
- JavaScript
- curl
- C#
- Go
- Java
- Payload
import requests
url = "https://docs.satelligence.com/_mock/api/v1/bulk-uploads/start"
payload = {
"uploadId": "ef523ba8-509e-47af-8e2c-5fa751596497",
"overwrite": True
}
headers = {
"Content-Type": "application/json",
"Authorization": "Bearer <YOUR_TOKEN_HERE>"
}
response = requests.post(url, json=payload, headers=headers)
data = response.json()
print(data)
{ "status": "string", "uploadId": "string", "message": "string" }
Request
Retrieves the status of a particular bulk upload, or lists all the ongoing uploads in the given project.
If an uploadId
is provided, this endpoint returns information about that upload: what stage it is at, if any errors were encountered.
If no uploadId
is provided, this endpoint returns a list of the ongoing uploads for the given project, which can be useful to get a view of everything currently uploading in a given project. If the projectId
is not set this uses the user's active project.
- Mock server
https://docs.satelligence.com/_mock/api/v1/bulk-uploads/status
- Production server
https://api.satelligence.com/v1/bulk-uploads/status
- Python
- JavaScript
- curl
- C#
- Go
- Java
- Payload
import requests
url = "https://docs.satelligence.com/_mock/api/v1/bulk-uploads/status"
query = {
"uploadId": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"projectId": "497f6eca-6276-4993-bfeb-53cbbbba6f08"
}
headers = {"Authorization": "Bearer <YOUR_TOKEN_HERE>"}
response = requests.get(url, headers=headers, params=query)
data = response.json()
print(data)
{ "status": "string", "createdAt": "string", "errorMessages": [ "string" ], "isOverwrite": true }