mirror of
https://github.com/f4exb/sdrangel.git
synced 2024-11-26 01:39:05 -05:00
REST API device and channel actions: Swagger files
This commit is contained in:
parent
61274c4ee0
commit
6d47e65aa6
21
swagger/sdrangel/api/swagger/include/ChannelActions.yaml
Normal file
21
swagger/sdrangel/api/swagger/include/ChannelActions.yaml
Normal file
@ -0,0 +1,21 @@
|
||||
ChannelActions:
|
||||
description: Base channel actions. Only the channel actions corresponding to the channel specified in the channelType field is or should be present.
|
||||
discriminator: channelType
|
||||
required:
|
||||
- channelType
|
||||
- direction
|
||||
properties:
|
||||
channelType:
|
||||
description: Channel type code
|
||||
type: string
|
||||
direction:
|
||||
description: 0 for Rx only, 1 for Tx only or 2 for any number and direction (default 0)
|
||||
type: integer
|
||||
originatorDeviceSetIndex:
|
||||
description: Optional for reverse API. This is the device set index from where the message comes from.
|
||||
type: integer
|
||||
originatorChannelIndex:
|
||||
description: Optional for reverse API. This is the channel index from where the message comes from.
|
||||
type: integer
|
||||
FileSourceActions:
|
||||
$ref: "http://localhost:8081/api/swagger/include/FileSource.yaml#/FileSourceActions"
|
18
swagger/sdrangel/api/swagger/include/DeviceActions.yaml
Normal file
18
swagger/sdrangel/api/swagger/include/DeviceActions.yaml
Normal file
@ -0,0 +1,18 @@
|
||||
DeviceActions:
|
||||
description: Base device actions. Only the device actions corresponding to the device specified in the deviceHwType field is or should be present.
|
||||
discriminator: deviceHwType
|
||||
required:
|
||||
- deviceHwType
|
||||
- direction
|
||||
properties:
|
||||
deviceHwType:
|
||||
description: Device hardware type code
|
||||
type: string
|
||||
direction:
|
||||
description: 0 for Rx only, 1 for Tx only or 2 for any number and direction (default 0)
|
||||
type: integer
|
||||
originatorIndex:
|
||||
description: Optional for reverse API. This is the device set index from where the message comes from.
|
||||
type: integer
|
||||
rtlSdrActions:
|
||||
$ref: "http://localhost:8081/api/swagger/include/RtlSdr.yaml#/RtlSdrActions"
|
@ -59,3 +59,13 @@ FileSourceReport:
|
||||
description: power transmitted in channel (dB)
|
||||
type: number
|
||||
format: float
|
||||
|
||||
FileSourceActions:
|
||||
description: FileSource
|
||||
properties:
|
||||
play:
|
||||
type: integer
|
||||
description: >
|
||||
Play or Pause stream
|
||||
* 0 - Pause
|
||||
* 1 - Play
|
||||
|
@ -52,3 +52,13 @@ RtlSdrReport:
|
||||
type: array
|
||||
items:
|
||||
$ref: "http://localhost:8081/api/swagger/include/Structs.yaml#/Gain"
|
||||
|
||||
RtlSdrActions:
|
||||
description: RTLSDR
|
||||
properties:
|
||||
record:
|
||||
type: integer
|
||||
description: >
|
||||
Record IQ stream action
|
||||
* 0 - stop recording
|
||||
* 1 - start recording
|
||||
|
@ -1382,6 +1382,42 @@ paths:
|
||||
"501":
|
||||
$ref: "#/responses/Response_501"
|
||||
|
||||
/sdrangel/deviceset/{deviceSetIndex}/device/actions:
|
||||
x-swagger-router-controller: deviceset
|
||||
post:
|
||||
description: post an action on a device
|
||||
operationId: devicesetDeviceActionsPost
|
||||
tags:
|
||||
- Deviceset
|
||||
parameters:
|
||||
- in: path
|
||||
name: deviceSetIndex
|
||||
type: integer
|
||||
required: true
|
||||
description: Index of device set in the device set list
|
||||
- name: body
|
||||
in: body
|
||||
description: Action(s) to apply to the device
|
||||
required: true
|
||||
schema:
|
||||
$ref: "http://localhost:8081/api/swagger/include/DeviceActions.yaml#/DeviceActions"
|
||||
responses:
|
||||
"202":
|
||||
description: Message to perform action was sent successfully
|
||||
schema:
|
||||
$ref: "#/definitions/SuccessResponse"
|
||||
"400":
|
||||
description: Invalid device set index
|
||||
schema:
|
||||
$ref: "#/definitions/ErrorResponse"
|
||||
"404":
|
||||
description: Device not found
|
||||
schema:
|
||||
$ref: "#/definitions/ErrorResponse"
|
||||
"500":
|
||||
$ref: "#/responses/Response_500"
|
||||
"501":
|
||||
$ref: "#/responses/Response_501"
|
||||
|
||||
/sdrangel/deviceset/{deviceSetIndex}/channel:
|
||||
x-swagger-router-controller: deviceset
|
||||
@ -1605,6 +1641,48 @@ paths:
|
||||
"501":
|
||||
$ref: "#/responses/Response_501"
|
||||
|
||||
/sdrangel/deviceset/{deviceSetIndex}/channel/{channelIndex}/actions:
|
||||
x-swagger-router-controller: deviceset
|
||||
post:
|
||||
description: post an action or actions on a channel
|
||||
operationId: devicesetChannelActionsPost
|
||||
tags:
|
||||
- Deviceset
|
||||
parameters:
|
||||
- in: path
|
||||
name: deviceSetIndex
|
||||
type: integer
|
||||
required: true
|
||||
description: Index of device set in the device set list
|
||||
- in: path
|
||||
name: channelIndex
|
||||
type: integer
|
||||
required: true
|
||||
description: Index of the channel in the channels list for this device set
|
||||
- name: body
|
||||
in: body
|
||||
description: Action(s) to apply to the channel
|
||||
required: true
|
||||
schema:
|
||||
$ref: "http://localhost:8081/api/swagger/include/ChannelActions.yaml#/ChannelActions"
|
||||
responses:
|
||||
"202":
|
||||
description: Message to perform action was sent successfully
|
||||
schema:
|
||||
$ref: "#/definitions/SuccessResponse"
|
||||
"400":
|
||||
description: Invalid device set or channel index
|
||||
schema:
|
||||
$ref: "#/definitions/ErrorResponse"
|
||||
"404":
|
||||
description: Device or channel not found
|
||||
schema:
|
||||
$ref: "#/definitions/ErrorResponse"
|
||||
"500":
|
||||
$ref: "#/responses/Response_500"
|
||||
"501":
|
||||
$ref: "#/responses/Response_501"
|
||||
|
||||
/swagger:
|
||||
x-swagger-pipe: swagger_raw
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user