EarthRanger API

Updated at May 3rd, 2024

Additional details will be coming later



EarthRanger API is designed to empower every user with seamless access to real-time tracking and data. 

Getting Started:

Python Library: Dive into our Python library available on GitHub. Find it here:


Full REST API Documentation: Once logged in to the EarthRanger admin portal, you can access the full REST API, documented here:

Interactive Documentation: Replace "sandbox" in the URL with your server name to interact with the API directly:



Super-Short Quick Start Version


We use OAuth2 tokens for authentication.  You can create a long-lived one here:


Create an observation (track location or sensor reading)

The general concept is that a source provider is a service that describes one or more sources that provide location information for a subject.  For example, a tracking device manufacturer is a source provider, a rhino tracker is a source and the rhino itself the subject.  With that in mind...


As is typical, API headers:

               Authorization: Bearer <token>

               Accept: application/json

               Content-Disposition: attachment; filename={}

               Content-Type: application/json


The body of a location request looks like:        


               "location": {






               "subject_name":"Car 4",



               "model_name":"Land Cruiser",


               "additional": {

“anykey”: “anyvalue”




Note that if you pass in an observation where the system hasn’t seen that source-provider / manufacturer_id combination before it’ll create sources and subjects as necessary.


Create an event

For posting events, here are some sample API calls:





·         Authorization: Bearer xxxxxxxx

·         Accept: application/json

·         Content-Disposition: attachment; filename={}

·         Content-Type: application/json


Body example:


               "event_type": "mist_rep",

              "time": "2019-01-17T06:18:44.056439",

"priority": 100,

              "location": {

"latitude": 47.123,

"longitude": -122.123


              "event_details": {

               "mistrep_Method": "Air Evac",

                           "mistrep_Injury": "Malaria",

                                "mistrep_Symptoms": "Fever and sweating",

                                "mistrep_Treatment": "Anti malarial medicine"




Note that event_type and the fields for event_details correspond to the entry in the Django admin’s Activity > Event types page