Setting up Monitoring Orders

The Planet Tasking API is a REST based API, which can be integrated into any service, regardless of the language used. Below are some examples of how to create and maintain Monitoring orders.

A Monitoring order is a Tasking Order that takes images of a location over a period of time at a defined cadence. For example, a Monitoring Order could be set up to have an active time span of 30 days and a cadence of 7 days, which means that in the end 4 images would be produced for that order, once a week for the duration of the order.

With that in mind, let's see what is involved in creating a Monitoring Order.

Creating a Monitoring Order

If you are already familiar with creating a standard Tasking Order, then setting a Monitoring Order isn't much different, it only takes one more field to make the change. (If you are not familiar with setting up a Tasking Order, you can take a look at Tasking Orders)

curl --request POST \
  --url https://api.planet.com/tasking/v2/orders/ \
  --header 'authorization: api-key <YOUR_API_KEY>' \
  --header 'content-type: application/json' \
  --data '{
    "geometry": {
    "type": "Point",
    "coordinates": [
        149.44135,
        28.49240
    ]
  },
  "start_time": "2020-10-01T09:30:47Z",
  "end_time": "2020-10-30T09:30:47Z",
  "name": "Test Monitoring Order",
  "monitoring_cadence": 7
}'

And that's it! If you want to know how your Monitoring Order is doing, you can set up email notifications so you can be automatically informed when a new capture is taken (see Notification and History)

Checking the status of your monitoring order

If you want to check the status of a monitoring order programitically, the first thing is to make a call to the tasking/v2/orders endpoint with the id of the Monitoring Order that you want to check:

curl --request GET \
  --url https://api.planet.com/tasking/v2/orders/<ORDER_ID_GOES_HERE> \
  --header 'authorization: api-key <YOUR_API_KEY>' \
  --header 'content-type: application/json'

The response from this request contains presenting an overview of the capture status of the order as well as the status of the Tasking Order itself:

{
  "id": "ORDER_ID",
  ...
  ...
  ...
  "status": "IN PROGRESS",
  "capture_count": 1,
  "capture_status_queued_count": 0,
  "capture_status_processing_count": 0,
  "capture_status_published_count": 1,
  "monitoring_cadence": 7,
  ...
  ...
  ...
}

To view the captures themeslves, the following call can be made to the tasking/v2/captures endpoint, which will return all of the captures for the given Tasking Order ID:

curl --request GET \
  --url 'https://api.planet.com/tasking/v2/captures/?order_id=<ORDER_ID_GOES_HERE>' \
  --header 'authorization: api-key  <YOUR_API_KEY>' \
  --header 'content-type: application/json'