r2server API 1.0.0

This is an API definition for https://r2server.ru. It can be used to store r2cloud observations or share them with third party applications

Read satellite data in JSON format
GET    Get supported satellites

Responses

Code Description
200

List of NORAD ids

[ null ]
GET    Get list of telemetry beacons

Use the value from the returned 'Link' header to do pagination

Parameters

Name Value
satellite * required
string  (path)

Satellite NORAD id

limit (query)

Number of entries to return. Maximum is 50

Responses

Code Description
400

If required parameters are missing or invalid

{
  "general" : "Internal server error",
  "fieldName" : "Cannot be empty"
}
200

List of telemetry data. Each Telemetry has 'id' field and satellite-specific fields.

[ {
  "id" : 119875
} ]
Headers
Name Description Type
Link Link to the next page of results string
Manage observations
  POST    Upload meta data from the new observation

Request body * required

Observation meta data

{
  "groundStation" : {
    "lon" : 38.13,
    "lat" : 56.31
  },
  "aURL" : "string",
  "data" : "string",
  "bandwidth" : 140000,
  "start" : 0,
  "numberOfDecodedPackets" : 14,
  "tle" : {
    "line3" : "2 40069  98.5901 334.4030 0004544 256.4188 103.6490 14.20654800221188",
    "line2" : "1 40069U 14037A   18286.52491495 -.00000023  00000-0  92613-5 0  9990",
    "line1" : "METEOR-M2 2"
  },
  "spectogramURL" : "string",
  "sampleRate" : 144000,
  "actualFrequency" : 137900000,
  "frequency" : 137900000,
  "gain" : "14.5",
  "end" : 0,
  "channelA" : "3/3B (mid infrared)",
  "id" : 119875,
  "satellite" : "44387",
  "channelB" : "4 (thermal infrared)",
  "inputSampleRate" : 288000
}

Responses

Code Description
200

On success

{
  "errorMessage" : "string",
  "id" : 0,
  "status" : "string"
}
401

If Authorization header is invalid or missing

{
  "errorMessage" : "string",
  "id" : 0,
  "status" : "string"
}
GET    Get public observations

Use the value from the returned 'Link' header to do pagination

Parameters

Name Value
satellite * required
(query)

NORAD id. Unique satellite id

limit (query)

Number of observations to return. Maximum is 50

Responses

Code Description
400

If required parameters are missing or invalid

{
  "general" : "Internal server error",
  "fieldName" : "Cannot be empty"
}
200

List of observations

[ {
  "groundStation" : {
    "lon" : 38.13,
    "lat" : 56.31
  },
  "aURL" : "string",
  "data" : "string",
  "bandwidth" : 140000,
  "start" : 0,
  "numberOfDecodedPackets" : 14,
  "tle" : {
    "line3" : "2 40069  98.5901 334.4030 0004544 256.4188 103.6490 14.20654800221188",
    "line2" : "1 40069U 14037A   18286.52491495 -.00000023  00000-0  92613-5 0  9990",
    "line1" : "METEOR-M2 2"
  },
  "spectogramURL" : "string",
  "sampleRate" : 144000,
  "actualFrequency" : 137900000,
  "frequency" : 137900000,
  "gain" : "14.5",
  "end" : 0,
  "channelA" : "3/3B (mid infrared)",
  "id" : 119875,
  "satellite" : "44387",
  "channelB" : "4 (thermal infrared)",
  "inputSampleRate" : 288000
} ]
Headers
Name Description Type
Link Link to the next page of results string
GET    Get data from the public observation

Parameters

Name Value
id * required
integer  (int64)
(path)

Observation id

Responses

Code Description
401

if observation is no longer public

404

if data was not found

200

Binary data

  PUT    Upload observation data

Data should be serialized binary data. Format depends on the satellite. For example, METEOR-M satellite data is a concatenated representation of VCDU

Parameters

Name Value
id * required
integer  (int64)
(path)

Observation id of the previously uploaded meta data

Content-Encoding string  (header)

If uploaded data is gzipped, then set this header to 'gzip'

Content-Type string  (header)

If 'application/octet-stream', then data is binary. Other supported content types: 'image/jpeg'

Responses

Code Description
200

On success

{
  "errorMessage" : "string",
  "id" : 0,
  "status" : "string"
}
401

If Authorization header is invalid or missing

{
  "errorMessage" : "string",
  "id" : 0,
  "status" : "string"
}
GET    Get NOAA image from the public observation

Parameters

Name Value
id * required
integer  (int64)
(path)

Observation id

Responses

Code Description
401

if observation is no longer public

404

if data was not found

200

NOAA image in the JPEG format

GET    Get spectogram from the public observation

Parameters

Name Value
id * required
integer  (int64)
(path)

Observation id

Responses

Code Description
401

if observation is no longer public

404

if data was not found

200

Image of the spectogram in the PNG format

  PUT    Upload spectogram for observation

Spectogram can be any of these formats: image/png, image/jpeg

Parameters

Name Value
id * required
integer  (int64)
(path)

Observation id of the previously uploaded meta data

Content-Encoding string  (header)

If uploaded data is gzipped, then set this header to 'gzip'

Responses

Code Description
200

On success or error

{
  "errorMessage" : "string",
  "id" : 0,
  "status" : "string"
}
401

If Authorization header is invalid or missing

{
  "errorMessage" : "string",
  "id" : 0,
  "status" : "string"
}
Manage metrics from base stations
  POST    Upload all base station metrics

Request body * required

Array of metrics

[ {
  "name" : "string",
  "value" : 0.0
} ]

Responses

Code Description
200

On success

{
  "errorMessage" : "string",
  "id" : 0,
  "status" : "string"
}
401

If Authorization header is invalid or missing

{
  "errorMessage" : "string",
  "id" : 0,
  "status" : "string"
}

Schemas


{
  "name" : {
    "type" : "string",
    "description" : "Metric name. Supported values: temperature, heap, load-average, ram-used, disk-used, ppm"
  },
  "value" : {
    "type" : "number",
    "description" : "Metric value"
  }
}
{
  "status" : {
    "type" : "string",
    "description" : "Enum. Can be any of: ERROR, SUCCESS"
  },
  "errorMessage" : {
    "type" : "string",
    "description" : "Returned in case of status=ERROR"
  },
  "id" : {
    "type" : "integer",
    "description" : "Returned in case of status=SUCCESS and any insert operations",
    "format" : "int64"
  }
}
{
  "line1" : {
    "type" : "string",
    "example" : "METEOR-M2 2"
  },
  "line2" : {
    "type" : "string",
    "example" : "1 40069U 14037A   18286.52491495 -.00000023  00000-0  92613-5 0  9990"
  },
  "line3" : {
    "type" : "string",
    "example" : "2 40069  98.5901 334.4030 0004544 256.4188 103.6490 14.20654800221188"
  }
}
{
  "lat" : {
    "type" : "number",
    "description" : "Latitude of the base station",
    "format" : "double",
    "example" : 56.31
  },
  "lon" : {
    "type" : "number",
    "description" : "Longitude of the base station",
    "format" : "double",
    "example" : 38.13
  }
}
{
  "general" : {
    "type" : "string",
    "description" : "If general error occur",
    "example" : "Internal server error"
  },
  "fieldName" : {
    "type" : "string",
    "description" : "Error related to the particular fieldName",
    "example" : "Cannot be empty"
  }
}
{
  "id" : {
    "type" : "integer",
    "description" : "Unique telemetry identifier within GroundStation",
    "format" : "int64",
    "example" : 119875
  }
}
{
  "id" : {
    "type" : "integer",
    "description" : "Unique observation identifier",
    "format" : "int64",
    "example" : 119875
  },
  "satellite" : {
    "type" : "string",
    "description" : "NORAD Id. Unique satellite id",
    "example" : "44387"
  },
  "start" : {
    "type" : "integer",
    "description" : "UNIX timestamp",
    "format" : "int64"
  },
  "end" : {
    "type" : "integer",
    "description" : "UNIX timestamp",
    "format" : "int64"
  },
  "sampleRate" : {
    "type" : "integer",
    "description" : "Samples per second",
    "format" : "int64",
    "example" : 144000
  },
  "inputSampleRate" : {
    "type" : "integer",
    "description" : "Samples per second in the raw file",
    "format" : "int64",
    "example" : 288000
  },
  "frequency" : {
    "type" : "integer",
    "description" : "Satellite frequency",
    "format" : "int64",
    "example" : 137900000
  },
  "actualFrequency" : {
    "type" : "integer",
    "description" : "Actual frequency used while receiving satellite data. Frequency of the raw file",
    "format" : "int64",
    "example" : 137900000
  },
  "bandwidth" : {
    "type" : "integer",
    "description" : "Signal bandwidth. Used by demodulator",
    "format" : "int64",
    "example" : 140000
  },
  "tle" : {
    "$ref" : "#/components/schemas/TLE"
  },
  "numberOfDecodedPackets" : {
    "type" : "integer",
    "description" : "Number of decoded packets during this observation",
    "format" : "int64",
    "example" : 14
  },
  "groundStation" : {
    "$ref" : "#/components/schemas/GroundStation"
  },
  "gain" : {
    "type" : "string",
    "description" : "Average gain reported during observation",
    "example" : "14.5"
  },
  "channelA" : {
    "type" : "string",
    "description" : "Type of A channel from NOAA satellite image",
    "example" : "3/3B (mid infrared)"
  },
  "channelB" : {
    "type" : "string",
    "description" : "Type of B channel from NOAA satellite image",
    "example" : "4 (thermal infrared)"
  },
  "aURL" : {
    "type" : "string",
    "description" : "URL to the decoded image"
  },
  "data" : {
    "type" : "string",
    "description" : "URL to the raw data"
  },
  "spectogramURL" : {
    "type" : "string",
    "description" : "URL to the spectogram image"
  }
}