sdrangel/swagger/sdrangel/api/swagger/swagger.yaml

279 lines
8.2 KiB
YAML
Raw Normal View History

2017-11-14 19:38:11 -05:00
swagger: "2.0"
info:
2017-11-15 12:52:11 -05:00
description: "This is the web API of SDRangel SDR software. SDRangel is an Open Source Qt5/OpenGL 3.0+ GUI and server Software Defined Radio and signal analyzer in software. It supports Airspy, BladeRF, HackRF, LimeSDR, PlutoSDR, RTL-SDR, SDRplay RSP1 and FunCube"
2017-11-14 19:38:11 -05:00
version: "4.0.0"
title: SDRangel
2017-11-15 12:52:11 -05:00
contact:
url: "https://github.com/f4exb/sdrangel"
email: "f4exb06@gmail.com"
2017-11-14 19:38:11 -05:00
# during dev, should point to your local machine
host: localhost:10010
# basePath prefixes all resource paths
basePath: /
#
schemes:
# tip: remove http to make production-grade
- http
- https
# format of bodies a client can send (Content-Type)
consumes:
- application/json
# format of the responses to the client (Accepts)
produces:
- application/json
paths:
/sdrangel:
# binds a127 app logic to a route
x-swagger-router-controller: instance
get:
description: SDRangel instance summary
# used as the method name of the controller
operationId: instanceSummary
# parameters:
# - name: name
# in: query
# description: The name of the person to whom to say hello
# required: false
# type: string
responses:
"200":
description: Success
schema:
# a pointer to a definition
$ref: "#/definitions/InstanceSummaryResponse"
# responses may fall through to errors
default:
description: Error
schema:
$ref: "#/definitions/ErrorResponse"
/sdrangel/devices:
x-swagger-router-controller: instance
get:
2017-11-15 12:52:11 -05:00
description: Get a list of sampling devices that can be used to take part in a device set
2017-11-14 19:38:11 -05:00
operationId: instanceDevices
parameters:
- name: direction
in: query
2017-11-15 12:52:11 -05:00
description: Gives Rx (rx or none) or Tx (tx) direction
2017-11-14 19:38:11 -05:00
required: false
type: string
responses:
"200":
description: Success
schema:
$ref: "#/definitions/InstanceDevicesResponse"
default:
description: Error
schema:
$ref: "#/definitions/ErrorResponse"
/sdrangel/channels:
x-swagger-router-controller: instance
get:
2017-11-15 12:52:11 -05:00
description: Get a list of channel plugins available in this instance
2017-11-14 19:38:11 -05:00
operationId: instanceChannels
parameters:
- name: direction
in: query
2017-11-15 12:52:11 -05:00
description: gives Rx (rx or none) or Tx (tx) direction
2017-11-14 19:38:11 -05:00
required: false
type: string
responses:
"200":
description: Success
schema:
$ref: "#/definitions/InstanceChannelsResponse"
default:
description: Error
schema:
$ref: "#/definitions/ErrorResponse"
/swagger:
x-swagger-pipe: swagger_raw
# complex objects have schema definitions
definitions:
InstanceSummaryResponse:
2017-11-15 12:52:11 -05:00
description: "Summarized information about this SDRangel instance"
2017-11-14 19:38:11 -05:00
required:
- version
- devicesetcount
properties:
version:
2017-11-15 12:52:11 -05:00
description: "Current software version"
2017-11-14 19:38:11 -05:00
type: string
logging:
$ref: "#/definitions/LoggingInfo"
devicesetcount:
2017-11-15 12:52:11 -05:00
description: "Number of device sets currently opened"
2017-11-14 19:38:11 -05:00
type: integer
devicesets:
type: array
items:
$ref: "#/definitions/DeviceSet"
user:
2017-11-15 12:52:11 -05:00
$ref: "http://localhost:8081/User.yaml#/User"
2017-11-14 19:38:11 -05:00
InstanceDevicesResponse:
2017-11-15 12:52:11 -05:00
description: "Summarized information about logical devices from hardware devices attached to this SDRangel instance"
2017-11-14 19:38:11 -05:00
required:
- devicecount
properties:
devicecount:
2017-11-15 12:52:11 -05:00
description: "Number of devices attached"
2017-11-14 19:38:11 -05:00
type: integer
devices:
type: array
items:
$ref: "#/definitions/DeviceListItem"
InstanceChannelsResponse:
2017-11-15 12:52:11 -05:00
description: "Summarized information about channel plugins available in this SDRangel instance"
2017-11-14 19:38:11 -05:00
required:
- channelcount
properties:
channelcount:
2017-11-15 12:52:11 -05:00
description: "Number of plugins available"
2017-11-14 19:38:11 -05:00
type: integer
channels:
type: array
items:
$ref: "#/definitions/ChannelListItem"
ErrorResponse:
required:
- message
properties:
message:
type: string
LoggingInfo:
2017-11-15 12:52:11 -05:00
description: "Logging parameters setting"
2017-11-14 19:38:11 -05:00
required:
- consoleLevel
- fileLevel
- dumpToFile
properties:
consoleLevel:
2017-11-15 12:52:11 -05:00
description: "Minimum level of messages printed to console: debug, info, warning, error"
2017-11-14 19:38:11 -05:00
type: string
fileLevel:
2017-11-15 12:52:11 -05:00
description: "Minimum level of messages written to file: debug, info, warning, error"
2017-11-14 19:38:11 -05:00
type: string
dumpToFile:
2017-11-15 12:52:11 -05:00
description: "True if messages are written to file else false to log to console only"
2017-11-14 19:38:11 -05:00
type: boolean
fileName:
2017-11-15 12:52:11 -05:00
description: "Name of the log file"
2017-11-14 19:38:11 -05:00
type: string
DeviceListItem:
2017-11-15 12:52:11 -05:00
description: "Summarized information about attached hardware device"
2017-11-14 19:38:11 -05:00
required:
- hwType
- rx
- streamIndex
- sequence
- serial
properties:
hwType:
2017-11-15 12:52:11 -05:00
description: "Key to identify the type of hardware device"
2017-11-14 19:38:11 -05:00
type: string
rx:
2017-11-15 12:52:11 -05:00
description: "True if this is an Rx device else false for Tx"
2017-11-14 19:38:11 -05:00
type: boolean
2017-11-15 12:52:11 -05:00
nbStreams:
description: "Number of channels or streams in the device"
type: integer
2017-11-14 19:38:11 -05:00
streamIndex:
2017-11-15 12:52:11 -05:00
description: "Index of the channel in the device"
2017-11-14 19:38:11 -05:00
type: integer
sequence:
2017-11-15 12:52:11 -05:00
description: "Sequence in the enumeration of same device types"
2017-11-14 19:38:11 -05:00
type: integer
serial:
2017-11-15 12:52:11 -05:00
description: "Serial number of the hardware device"
2017-11-14 19:38:11 -05:00
type: string
ChannelListItem:
2017-11-15 12:52:11 -05:00
description: "Summarized information about channel plugin"
2017-11-14 19:38:11 -05:00
required:
- name
- id
- rx
properties:
name:
2017-11-15 12:52:11 -05:00
description: "Displayable name of the channel plugin"
2017-11-14 19:38:11 -05:00
type: string
id:
2017-11-15 12:52:11 -05:00
description: "Key to identify the channel plugin type"
2017-11-14 19:38:11 -05:00
type: string
rx:
2017-11-15 12:52:11 -05:00
description: "True if this is an Rx channel else false for Tx"
2017-11-14 19:38:11 -05:00
type: boolean
version:
2017-11-15 12:52:11 -05:00
description: "Channel plugin version number"
2017-11-14 19:38:11 -05:00
type: string
DeviceSet:
2017-11-15 12:52:11 -05:00
description: "Sampling device and its associated channels"
2017-11-14 19:38:11 -05:00
required:
- samplingDevice
- channelcount
properties:
samplingDevice:
$ref: "#/definitions/SamplingDevice"
channelcount:
2017-11-15 12:52:11 -05:00
description: "Number of channels in the set"
2017-11-14 19:38:11 -05:00
type: integer
channels:
2017-11-15 12:52:11 -05:00
description: "Channels list"
2017-11-14 19:38:11 -05:00
type: array
items:
$ref: "#/definitions/Channel"
SamplingDevice:
2017-11-15 12:52:11 -05:00
description: "Information about a logical device available from an attached hardware device that can be used as a sampling device"
2017-11-14 19:38:11 -05:00
required:
- index
- hwType
- rx
- streamIndex
- sequence
- serial
- centerFrequency
- bandwidth
properties:
index:
type: integer
hwType:
2017-11-15 12:52:11 -05:00
description: "Key to identify the type of hardware device"
2017-11-14 19:38:11 -05:00
type: string
rx:
2017-11-15 12:52:11 -05:00
description: "True if this is an Rx device else false for Tx"
2017-11-14 19:38:11 -05:00
type: boolean
2017-11-15 12:52:11 -05:00
nbStreams:
description: "Number of channels or streams in the device"
type: integer
2017-11-14 19:38:11 -05:00
streamIndex:
2017-11-15 12:52:11 -05:00
description: "Index of the channel in the device"
2017-11-14 19:38:11 -05:00
type: integer
sequence:
2017-11-15 12:52:11 -05:00
description: "Sequence in the enumeration of same device types"
2017-11-14 19:38:11 -05:00
type: integer
serial:
2017-11-15 12:52:11 -05:00
description: "Serial number of the hardware device"
2017-11-14 19:38:11 -05:00
type: string
centerFrequency:
2017-11-15 12:52:11 -05:00
description: "Center frequency in Hz at which the device is tuned possibly taking NCO into account"
2017-11-14 19:38:11 -05:00
type: integer
2017-11-15 12:52:11 -05:00
format: int64
2017-11-14 19:38:11 -05:00
bandwidth:
2017-11-15 12:52:11 -05:00
description: "Bandwidth in Hz or complex S/s of baseband"
2017-11-14 19:38:11 -05:00
type: integer
Channel:
2017-11-15 12:52:11 -05:00
description: "Channel summarized information"
2017-11-14 19:38:11 -05:00
required:
- index
- id
- deltaFrequency
properties:
index:
2017-11-15 12:52:11 -05:00
description: "Index in the list of channels"
2017-11-14 19:38:11 -05:00
type: integer
id:
2017-11-15 12:52:11 -05:00
description: "Key to identify the type of channel"
2017-11-14 19:38:11 -05:00
type: string
deltaFrequency:
2017-11-15 12:52:11 -05:00
description: "Channel shift frequency in Hz from the center of baseband"
2017-11-14 19:38:11 -05:00
type: integer