Notes

Dates

The API only uses UTC time, and returns dates in an ISO-8601 format. When sending a date any of the following formats are valid:

2015-10-22 [Same as 2015-10-22T00:00:00Z] 2015-10-22T15:27:40+00:00 2015-10-22T15:27:40Z

/api/v0/packets

POST

Submit one or many SSDV packets to the live page. The server will return with the ID of the image the packets where assigned to, or an error on failure.

POST Body (Single Packet)
{ "type": "packet", "packet": "packet data", [The SSDV packet, encoded as per below] "encoding": "base64", [Use "base64" or "hex"] "received": "2015-10-21T15:41:36Z", [Time the packet was received] "receiver": "MI0VIM", [Receivers callsign] "fixes": 2 [Optional, number of bytes corrected by the FEC] }
Response

Returns the ID of the image the packet was assigned to.

POST Body (Multiple Packets)
{ "type": "packets", "packets": [ { "type": "packet", "packet": "packet data", [The SSDV packet, up to 256 bytes encoded as per below] "encoding": "base64", [Use "base64" or "hex"] "received": "2015-10-21T15:41:36Z", [Time the packet was received] "receiver": "MI0VIM", [Receivers callsign] "fixes": 2 [Optional, number of bytes corrected by the FEC] }, ... ] }
Response

Returns the ID of each image the submitted packets where assigned to.


/api/v0/images

GET

Fetch information for images.

ParameterDescriptionDefault
callsignReturn images with this callsign
idReturns images with this image ID
fromReturn images created on or after this time (Eg.: 2015-10-23T00:00:00Z)
untilReturn images created up to but not including this time
last_idReturn images updated since this packet ID
include_packetsInclude details on each packet receivedfalse
missing_packetsInclude a list of known missing packetsfalse
sortSet the order of the results (asc / desc)asc
limitLimit the number of images returned
Response

Returns an array of images matched by the parameters. See below for an example of the JSON returned.


/api/v0/images/:id

OptionDescription
:idThe ID of the image being queried

GET

Fetch information for an individual image.

ParameterDescriptionDefault
include_packetsInclude details on each packet receivedfalse
missing_packetsInclude a list of known missing packetsfalse
Response
{ "type": "image", "id": 5164, [The unique identifier for this image] "callsign": "EAGLE", [The callsign of the image sender] "image_id": 2, [The image ID set by the sender] "width": 512, [Width of the image in pixels] "height": 288, [Height of the image in pixels] "subsampling": "2x2", [JPEG subsampling mode used] "packet_type": "normal", [SSDV packet type, "normal", or "nofec"] "packet_length": 256, [SSDV packet length in bytes, normally 256] "packets_received": 2, [Number of packets received] "packets_missing": 2, [Number of packets known to be missing] "last_packet": 3, [The highest packet ID received] "received_eoi": true, [True if a packet has the EOI flag set] "created": "2015-10-21T15:41:36Z", [Time the first packet was submitted] "updated": "2015-10-21T15:43:53Z", [Time the last packet was submitted] "received_by": [ "MI0VIM", "Bob", "Lunar_Lander" ], [List of receivers who uploaded data for this image] "image_href": "http://ssdv.sanslogic.co.uk/images/20151021-154136-EAGLE-2.jpeg?u=2", [A link to the decoded JPEG image] "data_href": "http://ssdv.sanslogic.co.uk/images/20151021-154136-EAGLE-2.bin?u=2", [A link to the received SSDV data] "packets": [ [An optional array containing details on each packet received] { "packet_id": 0, [Packet number] "eoi": false, [True if the EOI flag was set in this packet] "received_by": [ "MI0VIM", "Bob", "Lunar_Lander" ] [List of receivers who uploaded this packet] }, { "packet_id": 3, "eoi": true, "received_by": [ "MI0VIM", "Bob" ] } ], "missing_packets": [ 1, 2 ] [An optional array listing the ID of each packet known to be missing] }

/latest.php

GET

ParameterDescriptionDefault
callsignReturn images with this callsign
Response

Returns a 302 redirect to the latest image for the specified callsign, or a 404 error if no matching image was found.