No running subscriptions via API

Following the instructions on the website, I try to access my Planet subscriptions:

  client = BackendApplicationClient(client_id=client_id)

oauth = OAuth2Session(client=client)

token = oauth.fetch_token(
token_url=token_url,
client_id=client_id,
client_secret=client_secret
)
def sentinelhub_compliance_hook(response):
response.raise_for_status()
return response

oauth.register_compliance_hook(“access_token_response”, sentinelhub_compliance_hook)

url = “https://services.sentinel-hub.com/api/v1/dataimport/subscriptions”

response = oauth.get(url)

response.raise_for_status()

With this, I am able to see our subscriptions that are created and completed. However, we have a few Running subscriptions as well, and they are not shown in the response. They are visible if I try to access each subscription directly as:

url = f"https://services.sentinel-hub.com/api/v1/dataimport/subscriptions/"

I can also see these Running subscriptions on our dashboard on the sentinelhub website.
Could someone please clue me in on what the issue might be and how to resolve it?

Hi,
a single call to https://services.sentinel-hub.com/api/v1/dataimport/subscriptions only returns up to a certain number of subscriptions, and in your case it just so happens that this does not include any RUNNING ones. Please check the “links” field in the response: if it contains a “next” URL, call it to get the next “page”. You can also get just the RUNNING subscriptions, please see API reference.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.