Feeds and Subscriptions
List subscriptions
https://api.planet.com/analytics/subscriptions
The subscriptions endpoint returns all the subscriptions enabled for a particular API key. Each item within this response describes a specific subscription including its spatial area of interest and its temporal start-time and end-time. The subscription dictates over what time period and area a particular computer vision operation will be performed.
Example
- CURL
- Python
curl "https://api.planet.com/analytics/subscriptions" \
-H "Authorization: api-key $PL_API_KEY"
import os
import requests
from requests.auth import HTTPBasicAuth
API_KEY = os.getenv("PL_API_KEY")
if not API_KEY:
raise ValueError(
"Please set the PL_API_KEY environment variable as your Planet API key"
)
def list_analytic_subscriptions():
auth = HTTPBasicAuth(API_KEY, "")
resp = requests.get("https://api.planet.com/analytics/subscriptions", auth=auth)
if not resp.ok:
raise Exception(f"Failed to list analytic subscriptions: {resp.text}")
return resp.json()
The table below describes the properties of each collection of responses returned by the subscriptions endpoint.
Table 1: subscription response
Metadata Field | Description | Sample |
---|---|---|
created | Timestamp when the subscription was created (in UTC) | 2019-03-08T18:11:57.488Z |
description | Description of the subscription as entered by the Planet Analytics Admin | Building Detection in New Cairo |
id | UUID for the subscription | f301b8c9-04e1-49f6-ab31-24a8c25edbd5 |
feedID | UUID for the feed | 1ce86055-cad0-4960-bdf3-32763c17f19b |
startTime | Starting time of the time window for the subscription | 2019-01-01T00:00:00.000Z |
endTime | End time of the time window for the subscription. If the subscription does not have an end time, this field will not be surfaced. | 2019-01-31T00:00:00.000Z |
geometry | Polygon coordinates to the spatial extent of the subscription | { |
links | Links to the individual subscription that the item refers to, the resulting collection of analytic results from the subscription, the feed operation that is associated with the subscription and to the subscriptions endpoint | [ |
title | Title of the subscription as entered by the Planet Analytics Admin | Demo_Subscription_Singapore |
updated | Last update time to the results associated with a subscription | 2019-04-10T04:40:20.261Z |
List Feeds
https://api.planet.com/analytics/feeds
The feeds endpoint returns all of the feeds that are enabled for a particular API key. Each item within this response describes a specific feed including the source of imagery from which the feed operates. The feeds describe the particular computer vision operation that will be performed when applied to the source imagery.
Example
- CURL
- Python
curl "https://api.planet.com/analytics/feeds" \
-H "Authorization: api-key $PL_API_KEY"
import os
import requests
from requests.auth import HTTPBasicAuth
API_KEY = os.getenv("PL_API_KEY")
if not API_KEY:
raise ValueError(
"Please set the PL_API_KEY environment variable as your Planet API key"
)
def list_analytic_feeds():
auth = HTTPBasicAuth(API_KEY, "")
resp = requests.get("https://api.planet.com/analytics/feeds", auth=auth)
if not resp.ok:
raise Exception(f"Failed to list analytic feeds: {resp.text}")
return resp.json()
The table below contains descriptions of the properties of each collection of responses returned by the feeds endpoint.
Table 2: feed response
Metadata Field | Description | Sample |
---|---|---|
created | Timestamp when the feed was created (in UTC) | 2019-03-08T18:11:57.488Z |
description | Description of the feed as entered by the Planet Analytics Admin | Ship detections from rectified PlanetScope imagery |
id | UUID for the feed | f35f37ce-4ba9-4b0d-b7d7-b687834223c3 |
links | Links to the individual feed and to the collection of feeds | [ |
source | Description of the source on which the respective feed operates. Includes source bundle, item type, and query filter parameters | { |
target | Defines the type of output for the feed. This would be a collection for an object detection based feed. For a segmentation based feed, this would be a mosaic with an associated series_id indicating the UUID of the resulting Planet mosaic | Vector output: |
title | Title of the feed as entered by the Planet Analytics Admin | Ship Detections |
updated | Timestamp of the last update from the feed (in UTC) | 2019-04-11T17:51:39.771Z |