Root API call's Q:?

Can I call the api to return a png?

I don’t see any documentation on the api.

I would like to get more precise with the return. specifically the most recent “payload_demod”: “” from my NOAA apt pass’s.

Is it better to just write a post pass script to uploads it to my server?

There isn’t an API to return directly the image. You need to use the observations API endpoint and check the field demoddata to get the link to the image.

is there a document on the observations API endpoint?

Documentation is a work in progress. However browsing the endpoint and using filters can give you some hints on how it works. If something is not very clear, let me know to help you.

I see the field demoddata Just wish I could use the api to return that field, so I can Wget files. Do you have any examples of code that uses the api’s return to find and download the file in the “payload_demod” field?

Q; think that :
“Start is greater than or equal to”
“End is less than or equal to”

Implies a date? in what format?

Here is some python example code that checks all the observations of one satellite from now back to a given date and prints all the payload_demod that it finds on these observations (maybe there are better ways to implement this but you can get an idea):

import json
import sys
import requests
import re
from time import sleep, gmtime, strftime
from datetime import datetime

    norad_id = int(sys.argv[1])
    print('Please give a valid norad id')

    date = str(sys.argv[2])
    print('Please give a valid date for example 2018-07-29T07:10:00Z')

status = ''
    status = str(sys.argv[3])

now = datetime.utcnow().strftime("%Y-%m-%d %H:%M:%S")
url = '' + str(norad_id) + '&end=' + now

if status:
    url += '&status=' + status

next_url = url
while next_url is not '':
    print(strftime("%a, %d %b %Y %H:%M:%S +0000", gmtime()))
    print("Requesting " + next_url)
    r = requests.get(next_url)

    if 'Link' in r.headers:
        if 'next' in r.headers['Link']:
            regex = r"<(.*)>.*next.*"
            next_url = matches = re.match(regex, r.headers['Link']).groups()[0]
            next_url = ''
        next_url = ''

    observations = json.loads(r.content.decode('utf8'))
    for observation in observations:
        obs_id = str(observation['id'])
        obs_start = observation['start']
        if obs_start > date:
            if observation['demoddata']:
              for datum in observation['demoddata']:
                  print(datum['payload_demod'], flush=True)
        if obs_start < date:
            print("Stop looking for next observations, last was obs: " + obs_id + "\n")

Example how to run it (it may need to install some python packages):

python 28654 2020-12-24T00:00:00Z good

In the example you can see how the date is formatted.