API Endpoints
GET /satellites
Returns all taskable satellites and their supported window types and payloads. See the example JSON response to the right.
- Bash
- Python
curl -X GET -H "${AUTH_HEADER}" "${HOST}/tasking/satellites"
{
"data": [
{
"id": "FM123",
"norad_id": "12345",
"supported_windows": [
"PAYLOAD_SDR",
"PAYLOAD_SABERTOOTH"
],
"supported_payloads": [
"SDR",
"SABERTOOTH"
]
}
]
}
api = host + '/tasking/satellites'
r = requests.get(api, headers=auth)
r.raise_for_status()
r.json()
{
"data": [
{
"id": "FM123",
"norad_id": "12345",
"supported_windows": [
"PAYLOAD_SDR",
"PAYLOAD_SABERTOOTH"
],
"supported_payloads": [
"SDR",
"SABERTOOTH"
]
}
]
}
GET /availability
Return time ranges between start and end during which the user may schedule a window of the specified type. See the example JSON response to the right.
Arguments
Name | Type | Required | Description |
---|---|---|---|
satellite_id | string | yes | |
window_type | string | yes | See Supported Windows |
start | integer | yes | epoch time |
duration | integer | yes | seconds |
paired_satellite_id | string | no | For window types that involve a pair of satellites (such as LEASE_ISL) this is the other satellite's satellite_id |
Response
Name | Type | Description |
---|---|---|
available | list | list of periods window can be scheduled within |
- Bash
- Python
SATELLITE_ID="satellite_id=FM123"
WINDOW_TYPE="window_type=PAYLOAD_SDR"
START="start=$(date -u +%s)"
DURATION="duration=86400" # One day
QUERY_PARAMS="${SATELLITE_ID}&${WINDOW_TYPE}&${START}&${DURATION}"
curl -X GET -H "${AUTH_HEADER}" "${HOST}/tasking/availability?${QUERY_PARAMS}"
{
"data": {
"available": [
{ "start": 1599445000, "end": 1599473800 },
{ "start": 1599474400, "end": 1599503200 },
{ "start": 1599503800, "end": 1599531400 }
]
}
}
api = host + '/tasking/availability'
params = {
'satellite_id': 'FM123',
'window_type': 'PAYLOAD_SDR',
'start': 1599445000,
'duration': 24 * 60 * 60
}
r = requests.get(api, headers=auth, params=params)
r.raise_for_status()
r.json()
{
"data": {
"available": [
{ "start": 1599445000, "end": 1599473800 },
{ "start": 1599474400, "end": 1599503200 },
{ "start": 1599503800, "end": 1599531400 }
]
}
}
POST /upload
Submit a file for upload to target satellite. The response is a JSON payload containing the ID of the upload request. See the example JSON response to the right.
No assumptions should be made regarding the structure of the ID.
Arguments
Name | Type | Required | Description |
---|---|---|---|
satellite_id | string | yes | |
payload | string | yes | See Supported Payloads |
destination_path | string | yes | path on payload |
executable | boolean | yes | |
file | multipart-encoded file | yes | |
itar | boolean | no | ITAR-tagged uploads will only be uploaded through US-based ground stations (default: false) |
- Bash
- Python
SATELLITE_ID="satellite_id=FM123"
PAYLOAD="payload=SABERTOOTH"
DESTINATION_PATH="destination_path=/persist/bin/phase1"
EXECUTABLE="executable=true"
QUERY_PARAMS="${SATELLITE_ID}&${PAYLOAD}&${DESTINATION_PATH}&${EXECUTABLE}"
# Create test file to upload
echo "test" > phase1
curl -X POST "${HOST}/tasking/upload?${QUERY_PARAMS}" \
-H "${AUTH_HEADER}" \
-F "file=@phase1"
{"data": {"id": "8f76a939-609e-4042-8c97-079031af0320"}}
api = host + '/tasking/upload'
files = { 'file': open('phase1', 'rb') }
params = {
'satellite_id': 'FM123',
'payload': 'SABERTOOTH',
'destination_path': '/persist/bin/phase1',
'executable': True
}
r = requests.post(api, headers=auth, params=params, files=files)
r.raise_for_status()
r.json()
{"data": {"id": "8f76a939-609e-4042-8c97-079031af0320"}}
GET /uploads
Returns information on files previously submitted for uploading. See the example JSON response to the right.
Additional Response Fields
Name | Type | Description |
---|---|---|
id | string | identifer for upload |
status | string | "PENDING", "UPLOADING", or "UPLOADED" |
last_update | float | timestamp of the last time the record has been updated (file has started/finished uploading, or a new segment has been uploaded) |
progress | float | Current file progress (in percent) |
- Bash
- Python
curl -X GET -H "${AUTH_HEADER}" "${HOST}/tasking/uploads"
{
"data": [
{
"satellite_id": "FM123",
"payload": "SDR",
"destination_path": "/persist/bin/phase1",
"executable": true,
"status": "PENDING",
"id": "71c92e3c57bc440ea89d76c94cdf387f",
"progress": 0,
"last_update": 1659700499.978814
},
{
"satellite_id": "FM123",
"payload": "SABERTOOTH",
"destination_path": "/persist/bin/phase2",
"executable": true,
"status": "UPLOADING",
"id": "796392e80df14f46b07b86e13d3240ec",
"progress": 13.33456773,
"last_update": 1659702459.978814
},
{
"satellite_id": "FM123",
"payload": "SDR",
"destination_path": "/persist/config/fir.txt",
"executable": false,
"status": "UPLOADED",
"id": "45c59b08df97477a84af75ca2882859a",
"progress": 100,
"last_update": 1659730499.938517
}
]
}
api = host + '/tasking/uploads'
r = requests.get(api, headers=auth)
r.raise_for_status()
r.json()
{
"data": [
{
"satellite_id": "FM123",
"payload": "SDR",
"destination_path": "/persist/bin/phase1",
"executable": true,
"status": "PENDING",
"id": "71c92e3c57bc440ea89d76c94cdf387f",
"progress": 0,
"last_update": 1659700499.978814
},
{
"satellite_id": "FM123",
"payload": "SABERTOOTH",
"destination_path": "/persist/bin/phase2",
"executable": true,
"status": "UPLOADING",
"id": "796392e80df14f46b07b86e13d3240ec",
"progress": 13.33456773,
"last_update": 1659702459.978814
},
{
"satellite_id": "FM123",
"payload": "SDR",
"destination_path": "/persist/config/fir.txt",
"executable": false,
"status": "UPLOADED",
"id": "45c59b08df97477a84af75ca2882859a",
"progress": 100,
"last_update": 1659730499.938517
}
]
}
POST /window
Schedule a new operation window. Each window type supports specific tuning arguments via the parameters
field. The set of available payload window types and their supported parameters can be found at Supported Windows.
The server will respond to the request with the ID of the scheduled window in a JSON payload. See the example JSON response to the right.
No assumptions should be made regarding the structure of the ID.
Note that if a window is meant to have a paired window scheduled on a paired satellite (e.g. LEASE_ISL), it will be automatically scheduled, as well.
Arguments
Name | Type | Required | Description |
---|---|---|---|
type | string | yes | See Supported Windows |
satellite_id | string | yes | |
start | integer | yes | epoch time |
duration | integer | yes | seconds |
parameters | parameters | yes | See window parameters |
Response
Name | Type | Description |
---|---|---|
id | string | identifier for window |
- Bash
- Python
curl -X POST "${HOST}/tasking/window" \
-H "${AUTH_HEADER}" \
-H "Content-Type: application/json" \
-d @- << EOF
{
"type": "PAYLOAD_SABERTOOTH",
"satellite_id": "FM123",
"start": 1599503800,
"duration": 600,
"parameters": {
"downlink_budget": 0,
"user_command": {
"executable": "/persist/bin/generate_waveform",
"executable_arguments": [
"--period", "100",
"--amplitude", "200"
]
}
}
}
EOF
{"data": {"id": "3014288"}}
api = host + '/tasking/window'
json = {
'type': 'PAYLOAD_SABERTOOTH',
'satellite_id': 'FM123',
'start': 1599503800,
'duration': 600,
'parameters': {
'downlink_budget': 0,
'user_command': {
'executable': '/persist/bin/generate_waveform',
'executable_arguments': [
'--period', '100',
'--amplitude', '200'
]
}
}
}
r = requests.post(api, headers=auth, json=json)
r.raise_for_status()
r.json()
{"data": {"id": "3014288"}}
GET /contacts
List the latest contacts for a given satellite. The json object returned has two elements:
- "data": a list of contact windows
- "next": if there are additional contacts available beyond the requested time bounds, a link to the next page will be provided. If no more data is available, this field will have a value of null See the example JSON response.
Valid statuses
Status | Description |
---|---|
PENDING_SYNC | The contact has been accepted by the API but not yet transferred to the satellite |
SYNCED | The contact has been transferred to the satellite |
Valid Types
Status | Description |
---|---|
BIDIR | The contact involves two-way transmissions between the satellite and a receiver |
TXO | The contact involves only one-way satellite to receiver transmissions |
RXO | The contact involves only one-way receiver to satellite transmissions |
Arguments
Name | Type | Required | Description |
---|---|---|---|
satellite_id | string | yes | |
start_lt | float (epoch timestamp) | no | An "upper" bound, returns all contacts with start time less than the provided epoch. May be used with or without the start_gt argument |
start_gt | float (epoch timestamp) | no | A "lower" bound, returns all contacts with start time greater than the provided epoch. May be used with or without the start_lt argument |
Response
Name | Type | Description |
---|---|---|
id | string | identifier for contact |
- Bash
- Python
SATELLITE_ID="satellite_id=FM123"
START_LT="start_lt=1648684800" # 2022-03-31 00:00 UTC
QUERY_PARAMS="${SATELLITE_ID}&${START_LT}"
curl -X GET -H "${AUTH_HEADER}" "${HOST}/tasking/contacts?${QUERY_PARAMS}"
If more values are available, next
will contain the URL to the next page
{
"data": [{
"id": "5f7770a7984c4b30856a3a810c1b3e2f",
"type": "BIDIR",
"satellite_id": "FM123",
"state": "PENDING_SYNC",
"start": 1599503800,
"duration": 600,
},
//...
],
"next": "https://api.orb.spire.com/tasking/contacts?satellite_id=FM123&start_lt=1599553800"
}
If there are no more values available, next
will be null
{
"data": [{
"id": "5f7770a7984c4b30856a3a810c1b3e2f",
"type": "BIDIR",
"satellite_id": "FM123",
//...
}
],
"next": null
}
api = host + '/tasking/contacts'
params = { 'satellite_id': 'FM123', start_lt: 1648684800} # 2022-03-31 00:00 UTC
r = requests.get(api, headers=auth, params=params)
r.raise_for_status()
r.json()
If more values are available, next
will contain the URL to the next page
{
"data": [{
"id": "5f7770a7984c4b30856a3a810c1b3e2f",
"type": "BIDIR",
"satellite_id": "FM123",
"state": "PENDING_SYNC",
"start": 1599503800,
"duration": 600,
},
//...
],
"next": "https://api.orb.spire.com/tasking/contacts?satellite_id=FM123&start_lt=1599553800"
}
If there are no more values available, next
will be null
{
"data": [{
"id": "5f7770a7984c4b30856a3a810c1b3e2f",
"type": "BIDIR",
"satellite_id": "FM123",
//...
}
],
"next": null
}
GET /windows
List the latest windows for a given satellite. The json object returned has two elements:
- "data": a list of payload windows
- "next": if there are additional windows available beyond the requested time bounds, a link to the next page will be provided. If no more data is available, this field will have a value of null
See the example JSON response.
Valid Synchronization States
Status | Description |
---|---|
PENDING_SYNC | The window has been accepted by the API but not yet transferred to the satellite |
SYNCED | The window has been transferred to the satellite |
FAILED_SYNC | The window has not been transferred to the satellite in time for execution and will not execute |
PENDING_DELETION | A request to delete the window has been accepted by the API but not yet confirmed |
UNKNOWN | The window is in an unknown state, contact a Spire representative to resolve |
Once a window is in the PENDING_DELETION state, its interval is no longer considered unavailable, so it will be possible to schedule a new window overlapping this interval, provided other conditions for the new window are met.
Once deletion of the window is confirmed, it is no longer listed in the GET /windows response.
Arguments
Name | Type | Required | Description |
---|---|---|---|
satellite_id | string | yes | |
plw_start_lt | float (epoch timestamp) | no | An "upper" bound, returns all windows with start time less than the provided epoch. May be used with or without the plw_start_gt argument |
plw_start_gt | float (epoch timestamp) | no | A "lower" bound, returns all windows with start time greater than the provided epoch. May be used with or without the plw_start_lt argument |
Response
Name | Type | Description | Log Time |
---|---|---|---|
id | string | identifier for window | Generated when window POST command is called to create a new window |
exit_status | string | A success indicator for the given window, reading either "FAILED"/"SUCCESSFUL", and null if not yet logged | Updated when associated logged telemetry is downloaded upon window completion |
ran_duration | float | the delta between the observed payload power on and the initiated window end. "null" if not yet logged |
- Bash
- Python
SATELLITE_ID="satellite_id=FM123"
PLW_START_LT="plw_start_lt=1648684800" # 2022-03-31 00:00 UTC
QUERY_PARAMS="${SATELLITE_ID}&${PLW_START_LT}"
curl -X GET -H "${AUTH_HEADER}" "${HOST}/tasking/windows?${QUERY_PARAMS}"
If more values are available, next
will contain the URL to the next page
{
"data": [{
"id": "5260382",
"type": "PAYLOAD_SABERTOOTH",
"satellite_id": "FM123",
"state": "PENDING_SYNC",
"start": 1599503800,
"duration": 600,
"parameters": {
"user_command": {
"executable": "/persist/bin/generate_waveform.sh",
"executable_arguments": [
"--period", "100",
"--amplitude", "200"
],
}
},
"exit_status": null,
"ran_duration": null,
},
//...
],
"next": "https://api.orb.spire.com/tasking/windows?satellite_id=FM123&plw_start_lt=1599553800"
}
If there are no more values available, next
will be null
{
"data": [{
"id": "5f7770a7984c4b30856a3a810c1b3e2f",
"type": "PAYLOAD_SABERTOOTH",
"satellite_id": "FM123",
//...
}
],
"next": null
}
api = host + '/tasking/windows'
params = { 'satellite_id': 'FM123', plw_start_lt: 1648684800} # 2022-03-31 00:00 UTC
r = requests.get(api, headers=auth, params=params)
r.raise_for_status()
r.json()
If more values are available, next
will contain the URL to the next page
{
"data": [{
"id": "5260382",
"type": "PAYLOAD_SABERTOOTH",
"satellite_id": "FM123",
"state": "PENDING_SYNC",
"start": 1599503800,
"duration": 600,
"parameters": {
"user_command": {
"executable": "/persist/bin/generate_waveform.sh",
"executable_arguments": [
"--period", "100",
"--amplitude", "200"
],
}
},
"exit_status": null,
"ran_duration": null,
},
//...
],
"next": "https://api.orb.spire.com/tasking/windows?satellite_id=FM123&plw_start_lt=1599553800"
}
If there are no more values available, next
will be null
{
"data": [{
"id": "5f7770a7984c4b30856a3a810c1b3e2f",
"type": "PAYLOAD_SABERTOOTH",
"satellite_id": "FM123",
//...
}
],
"next": null
}
GET /window
List the synchronization information for a given satellite window, keyed off the requested window "id". The json object returned has the same structure as a given window element in the GET /windows return.
In addition to displaying all synchronization information available via GET /windows, the GET /window endpoint will offer additional information and statistics about the files generated during a window, post-capture.
Response
Name | Type | Description | Log Time |
---|---|---|---|
file_output | dictionary | A dictionary whose keys are all files generated by an associated capture, along with select file and download metrics mapped to those keys (detailed below) | Logged as telemetry when a file is received on the OBC for download from a given payload agent. This telemetry, too, will need to download prior to display |
file_output Schema
The "file_output" entry will return a dictionary, the keys of which are the names of files generated by a customers requested payload capture. Stored under each filename key entry will be another dictionary with file statistics.
Name | Type | Description | Empty Value |
---|---|---|---|
size | int | the size of the generated file in question, measured in kB | 0 |
update_time | Date & Timestamp | A human readable timestamp indicating the log time of the most recent telemery message. | None |
See the example JSON response.
- Bash
- Python
ID=5260382
QUERY_PARAMS="${WINDOW_ID}"
curl -X GET -H "${AUTH_HEADER}" "${HOST}/tasking/window?${QUERY_PARAMS}"
{
"data": {
"id": "5260382",
"type": "PAYLOAD_SABERTOOTH",
"satellite_id": "FM123",
"state": "SYNCED",
"start": 1599503800,
"duration": 600,
"parameters": {
"user_command": {
"executable": "/persist/bin/generate_waveform.sh",
"executable_arguments": [
"--period", "100",
"--amplitude", "200"
],
}
},
"exit_status": "SUCCESSFUL",
"ran_duration": 590.026757,
"file_output": {
"path1": {"size": 1180, "update_time": "2024-07-31 22:46:13"},
"path2": {"size": 7920, "update_time": "2024-07-31 22:46:13"},
"path3": {"size": 8532, "update_time": "2024-07-31 22:46:13"},
}
}
}
api = host + '/tasking/window'
params = { 'id': 5260382}
r = requests.get(api, headers=auth, params=params)
r.raise_for_status()
r.json()
{
"data": {
"id": "5260382",
"type": "PAYLOAD_SABERTOOTH",
"satellite_id": "FM123",
"state": "SYNCED",
"start": 1599503800,
"duration": 600,
"parameters": {
"user_command": {
"executable": "/persist/bin/generate_waveform.sh",
"executable_arguments": [
"--period", "100",
"--amplitude", "200"
],
}
},
"exit_status": "SUCCESSFUL",
"ran_duration": 590.026757,
"file_output": {
"path1": {"size": 1180, "update_time": "2024-07-31 22:46:13"},
"path2": {"size": 7920, "update_time": "2024-07-31 22:46:13"},
"path3": {"size": 8532, "update_time": "2024-07-31 22:46:13"},
}
}
}
DELETE /window
Request for a window to be deleted. If the window is in a PENDING_SYNC
or SYNCED
state this will move it to the PENDING_DELETION
state. The deletion request may be rejected if there is no opportunity to confirm deletion with the satellite. Once deletion is confirmed the window will no longer appear in the GET /windows
response. If deletion cannot be confirmed the window may still execute. If the window has a paired window that was automatically scheduled on a paired satellite, the deletion of the paired window will be attempted during this request, too. Only both windows will be deleted if they both meet the deletion requirement outlined above.
If the request is successful, the endpoint will return the id of the deleted window.
Arguments
Name | Type | Required | Description |
---|---|---|---|
id | string | yes | identifier for window to delete |
- Bash
- Python
ID="id=3014288"
QUERY_PARAMS="${ID}"
curl -X DELETE -H "${AUTH_HEADER}" "${HOST}/tasking/window?${QUERY_PARAMS}"
{"data": {"id": "3014288"}}
api = host + '/tasking/window'
params = { 'id': '5f7770a7984c4b30856a3a810c1b3e2f' }
r = requests.delete(api, headers=auth, params=params)
r.raise_for_status()
r.json()
{"data": {"id": "3014288"}}
DELETE /upload
Remove a previously-requested upload from the upload queue.
If the specified file has already been uploaded to the satellite, an error will be throw.
If the upload is in progress, no further attempts to complete the file will be made.
If the request is successful, the endpoint will return the id of the deleted window.
Arguments
Name | Type | Required | Description |
---|---|---|---|
id | string | yes | identifier for upload to delete |
- Bash
- Python
ID="id=796392e80df14f46b07b86e13d3240ec"
QUERY_PARAMS="${ID}"
curl -X DELETE -H "${AUTH_HEADER}" "${HOST}/tasking/upload?${QUERY_PARAMS}"
{"data": {"id": "796392e80df14f46b07b86e13d3240ec"}}
api = host + '/tasking/upload'
params = { 'id': '796392e80df14f46b07b86e13d3240ec' }
r = requests.delete(api, headers=auth, params=params)
r.raise_for_status()
r.json()
{"data": {"id": "796392e80df14f46b07b86e13d3240ec"}}
GET /quota
List the quota usage within an interval. Usage for each individual quota is returned for each quota "period" that overlaps with the request interval. Where a per-satellite quota exists, individual usage is detailed for each satellite. GLOBAL quotas are cummulative across satellites.
See the example JSON response.
Arguments
Name | Type | Required | Description |
---|---|---|---|
start | integer | yes | epoch time |
duration | integer | yes | seconds |
Response
Name | Type | Description |
---|---|---|
scope | string | "PER_SATELLITE", "GLOBAL" |
resource | string | "TASKING_DURATION", "DATA_GENERATION_VOLUME" |
usage | float | quota usage in the associated quota period |
quota | float | quota allowance in the associated quota period |
unit | string | unit of measurement of the usage and quota |
quota_start | string | epoch time of the start of the quota period |
quota_end | string | epoch time of the end of the quota period |
basis | string | quota period basis - only "PER_DAY" is currently supported |
window_type | string | if the quota is specific to a window type |
satellite_id | string | if scope is "PER_SATELLITE" |
- Bash
- Python
START="start=1707782400" # 2024-02-13 00:00 UTC
DURATION="duration=10"
QUERY_PARAMS="${START}&${DURATION}"
curl -X GET -H "${AUTH_HEADER}" "${HOST}/tasking/quota?${QUERY_PARAMS}"
{
"data": {
"quotas": [
{
"scope": "PER_SATELLITE",
"resource": "TASKING_DURATION",
"usage": 0.5,
"quota": 1,
"unit": "hour",
"quota_start": 1707782400,
"quota_end": 1707868799,
"basis": "PER_DAY",
"window_type": "PAYLOAD_SDR",
"satellite_id": "FM123"
},
{
"scope": "GLOBAL",
"resource": "TASKING_DURATION",
"usage": 0.5,
"quota": 1,
"unit": "hour",
"quota_start": 1707782400,
"quota_end": 1707868799,
"basis": "PER_DAY",
"window_type": "PAYLOAD_SDR"
},
{
"scope": "PER_SATELLITE",
"resource": "DATA_GENERATION_VOLUME",
"usage": 0.2,
"quota": 1,
"unit": "GB",
"quota_start": 1707782400,
"quota_end": 1707868799,
"basis": "PER_DAY",
"window_type": "PAYLOAD_SDR",
"satellite_id": "FM123"
},
]
}
}
api = host + '/tasking/quota'
params = { 'start': 1707782400, 'duration': 10} # 2024-02-13 00:00 UTC
r = requests.get(api, headers=auth, params=params)
r.raise_for_status()
r.json()
{
"data": {
"quotas": [
{
"scope": "PER_SATELLITE",
"resource": "TASKING_DURATION",
"usage": 0.5,
"quota": 1,
"unit": "hour",
"quota_start": 1707782400,
"quota_end": 1707868799,
"basis": "PER_DAY",
"window_type": "PAYLOAD_SDR",
"satellite_id": "FM123"
},
{
"scope": "GLOBAL",
"resource": "TASKING_DURATION",
"usage": 0.5,
"quota": 1,
"unit": "hour",
"quota_start": 1707782400,
"quota_end": 1707868799,
"basis": "PER_DAY",
"window_type": "PAYLOAD_SDR"
},
{
"scope": "PER_SATELLITE",
"resource": "DATA_GENERATION_VOLUME",
"usage": 0.2,
"quota": 1,
"unit": "GB",
"quota_start": 1707782400,
"quota_end": 1707868799,
"basis": "PER_DAY",
"window_type": "PAYLOAD_SDR",
"satellite_id": "FM123"
},
]
}
}