Files
wlan-cloud-owls/openapi/owls.yaml
2023-08-03 10:56:44 -07:00

726 lines
18 KiB
YAML

openapi: 3.0.1
info:
title: OpenWifi Load Simulator
description: An application to test load on an OpenWifi system.
version: 2.10.0
license:
name: BSD3
url: https://github.com/Telecominfraproject/wlan-cloud-ucentralgw/blob/master/LICENSE
contact:
name: Arilia Support
email: ucentralsupport@arilia.com
url: https://www.ucentral.info/support
servers:
- url: 'https://localhost:16007/api/v1'
security:
- bearerAuth: []
- ApiKeyAuth: []
components:
securitySchemes:
ApiKeyAuth:
type: apiKey
in: header
name: X-API-KEY
bearerAuth:
type: http
scheme: bearer
bearerFormat: JWT
responses:
NotFound:
description: The specified resource was not found.
content:
application/json:
schema:
properties:
ErrorCode:
type: integer
ErrorDetails:
type: string
ErrorDescription:
type: string
Unauthorized:
description: The requested does not have sufficient rights to perform the operation.
content:
application/json:
schema:
properties:
ErrorCode:
type: integer
ErrorDetails:
type: string
ErrorDescription:
type: string
Success:
description: The requested operation was performed.
content:
application/json:
schema:
properties:
Operation:
type: string
Details:
type: string
Code:
type: integer
BadRequest:
description: The requested operation was performed.
content:
application/json:
schema:
properties:
Operation:
type: string
Details:
type: string
Code:
type: integer
schemas:
#########################################################################################
##
## These are endpoints that all services in the uCentral stack must provide
##
#########################################################################################
AnyPayload:
type: object
properties:
Document:
type: string
StringList:
type: object
properties:
list:
type: array
items:
type: string
TagValuePair:
type: object
properties:
tag:
type: string
value:
type: string
TagValuePairList:
type: object
properties:
tagList:
type: array
items:
$ref: '#/components/schemas/TagValuePair'
NoteInfo:
type: object
properties:
created:
type: integer
format: int64
createdBy:
type: string
note:
type: string
SystemCommandDetails:
type: object
properties:
command:
type: string
enum:
- setloglevels
- getloglevels
- getSubSystemNames
- getLogLevelNames
- stats
parameters:
oneOf:
- $ref: '#/components/schemas/StringList'
- $ref: '#/components/schemas/TagValuePairList'
SystemInfoResults:
type: object
properties:
version:
type: string
uptime:
type: integer
format: integer64
start:
type: integer
format: integer64
os:
type: string
processors:
type: integer
hostname:
type: string
certificates:
type: array
items:
type: object
properties:
filename:
type: string
expires:
type: integer
format: int64
SystemResources:
type: object
properties:
numberOfFileDescriptors:
type: integer
format: int64
currRealMem:
type: integer
format: int64
peakRealMem:
type: integer
format: int64
currVirtMem:
type: integer
format: int64
peakVirtMem:
type: integer
format: int64
SystemCommandResults:
type: object
oneOf:
- $ref: '#/components/schemas/SystemResources'
- $ref: '#/components/schemas/SystemInfoResults'
- $ref: '#/components/schemas/StringList'
- $ref: '#/components/schemas/TagValuePairList'
SystemCommandSetLogLevel:
type: object
properties:
command:
type: string
enum:
- setloglevel
subsystems:
type: array
items:
$ref: '#/components/schemas/TagValuePair'
SystemCommandReload:
type: object
properties:
command:
type: string
enum:
- reload
subsystems:
type: array
items:
type: string
example: these are the SubSystems names retrieve with the GetSubSystemsNamesResult.
SystemCommandGetLogLevels:
type: object
properties:
command:
type: string
enum:
- getloglevels
SystemGetLogLevelsResult:
type: object
properties:
taglist:
type: array
items:
$ref: '#/components/schemas/TagValuePair'
SystemCommandGetLogLevelNames:
type: object
properties:
command:
type: string
enum:
- getloglevelnames
SystemCommandGetSubsystemNames:
type: object
properties:
command:
type: string
enum:
- getsubsystemnames
SystemCommandGetLogLevelNamesResult:
type: object
properties:
list:
type: array
items:
type: string
SystemGetSubSystemNemesResult:
type: object
properties:
taglist:
type: array
items:
$ref: '#/components/schemas/TagValuePair'
#########################################################################################
##
## End of uCentral system wide values
##
#########################################################################################
SimulationDetails:
type: object
properties:
id:
type: string
format: uuid
name:
type: string
gateway:
type: string
format: uri
certificate:
type: string
key:
type: string
macPrefix:
type: string
minLength: 6
maxLength: 6
devices:
type: integer
minimum: 5
default: 10
maximum: 50000
healthCheckInterval:
type: integer
minimum: 30
maximum: 600
default: 60
stateInterval:
type: integer
minimum: 30
maximum: 600
default: 60
minAssociations:
type: integer
minimum: 0
maximum: 4
default: 2
maxAssociations:
type: integer
minimum: 0
maximum: 64
default: 8
minClients:
type: integer
minimum: 0
maximum: 4
default: 2
maxClients:
type: integer
minimum: 0
maximum: 16
default: 4
simulationLength:
type: integer
minimum: 120
default: 3600
description: in seconds
threads:
type: integer
minimum: 4
default: 16
maximum: 1024
clientInterval:
type: integer
default: 1
minimum: 1
maximum: 60
description: in seconds
keepAlive:
type: integer
minimum: 120
maximum: 3000
default: 300
description: in seconds
reconnectInterval:
type: integer
minimum: 10
maximum: 300
default: 30
description: in seconds
deviceType:
type: string
concurrentDevices:
type: integer
minimum: 1
maximum: 1000
default: 5
SimulationDetailsList:
type: object
properties:
list:
type: array
items:
$ref: '#/components/schemas/SimulationDetails'
SimulationStatus:
type: object
properties:
id:
type: string
format: uuid
simulationId:
type: string
format: uuid
tx:
type: integer
rx:
type: integer
msgsTx:
type: integer
msgsRx:
type: integer
liveDevices:
type: integer
timeToFullDevices:
type: integer
format: int64
startTime:
type: integer
format: int64
endTime:
type: integer
format: int64
errorDevices:
type: integer
state:
type: string
enum:
- running
- stopped
- canceled
- completed
SimulationStatusList:
type: object
properties:
list:
type: array
items:
$ref: '#/components/schemas/SimulationStatus'
paths:
/simulation/{id}:
get:
tags:
- Simulations
operationId: getSimulations
parameters:
- in: path
name: id
description: The UUID of the specific simulation ID
schema:
type: string
format: uuid
required: true
example: Set this to the ID of the running simulation. To get the list of running simulations, set this to '*'
- in: query
name: offset
schema:
type: integer
format: int64
- in: query
name: limit
schema:
type: integer
format: int64
responses:
200:
description: A single or list of simulation definitions
content:
application/json:
schema:
oneOf:
- $ref: '#/components/schemas/SimulationDetailsList'
- $ref: '#/components/schemas/SimulationDetails'
400:
$ref: '#/components/responses/BadRequest'
403:
$ref: '#/components/responses/Unauthorized'
post:
tags:
- Simulations
operationId: createSimulation
parameters:
- in: path
name: id
description: The UUID of the specific simulation ID. Must be set to 0 for a POST
schema:
type: string
format: uuid
required: true
example: must be set to 0 to create a new simulation
requestBody:
description: Simulation details
content:
application/json:
schema:
$ref: '#/components/schemas/SimulationDetails'
responses:
200:
$ref: '#/components/schemas/SimulationDetails'
400:
$ref: '#/components/responses/BadRequest'
403:
$ref: '#/components/responses/Unauthorized'
put:
tags:
- Simulations
operationId: modifySimulation
parameters:
- in: path
name: id
description: The UUID of the specific simulation ID
schema:
type: string
format: uuid
required: true
requestBody:
description: Simulation details
content:
application/json:
schema:
$ref: '#/components/schemas/SimulationDetails'
responses:
200:
$ref: '#/components/schemas/SimulationDetails'
400:
$ref: '#/components/responses/BadRequest'
403:
$ref: '#/components/responses/Unauthorized'
delete:
tags:
- Simulations
operationId: deleteSimulation
parameters:
- in: path
name: id
schema:
type: string
format: uuid
required: true
responses:
200:
$ref: '#/components/responses/Success'
400:
$ref: '#/components/responses/BadRequest'
403:
$ref: '#/components/responses/Unauthorized'
404:
$ref: '#/components/responses/NotFound'
/results/{id}:
get:
tags:
- Results
operationId: getSimulationResults
parameters:
- in: path
name: id
description: The UUID of the Simulation Definition
schema:
type: string
format: uuid
required: true
- in: query
name: offset
schema:
type: integer
format: int64
- in: query
name: limit
schema:
type: integer
format: int64
responses:
200:
$ref: '#/components/schemas/SimulationStatusList'
400:
$ref: '#/components/responses/BadRequest'
403:
$ref: '#/components/responses/Unauthorized'
404:
$ref: '#/components/responses/NotFound'
delete:
tags:
- Results
operationId: deleteSimulationResults
parameters:
- in: path
name: id
description: The UUID of the results to remove.
schema:
type: string
format: uuid
required: true
example: Set this to the ID of the running simulation. To get the list of running simulations, set this to '*'
responses:
200:
$ref: '#/components/responses/Success'
400:
$ref: '#/components/responses/BadRequest'
403:
$ref: '#/components/responses/Unauthorized'
404:
$ref: '#/components/responses/NotFound'
/status/{id}:
get:
tags:
- Status
operationId: getStatusOfRunningSimulation
parameters:
- in: path
name: id
schema:
type: string
required: true
example: Set this to the ID of the running simulation. To get the list of running simulations, set this to '*'
responses:
200:
description: Successfully retrieved status list
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/SimulationStatus'
400:
$ref: '#/components/responses/BadRequest'
403:
$ref: '#/components/responses/Unauthorized'
404:
$ref: '#/components/responses/NotFound'
/operation/{id}:
post:
tags:
- Operations
operationId: createARunningSimulation
parameters:
- in: path
name: id
description: The UUID of the specific simulation definition. Set this to 0 when creating a new running simulation
schema:
type: string
format: uuid
required: true
- in: query
name: operation
schema:
type: string
enum:
- start
- stop
- cancel
required: true
- in: query
name: runningId
description: Must be specified when stop or cancel re used.
schema:
type: string
format: uuid
responses:
200:
$ref: '#/components/schemas/SimulationStatus'
400:
$ref: '#/components/responses/BadRequest'
403:
$ref: '#/components/responses/Unauthorized'
404:
$ref: '#/components/responses/NotFound'
#########################################################################################
## The following calls are restricted to the private system side APIs
#########################################################################################
/system:
post:
tags:
- System Commands
summary: Perform some system wide commands.
operationId: systemCommand
requestBody:
description: Command details
content:
application/json:
schema:
oneOf:
- $ref: '#/components/schemas/SystemCommandSetLogLevel'
- $ref: '#/components/schemas/SystemCommandReload'
- $ref: '#/components/schemas/SystemCommandGetLogLevels'
- $ref: '#/components/schemas/SystemCommandGetLogLevelNames'
- $ref: '#/components/schemas/SystemCommandGetSubsystemNames'
responses:
200:
description: Successful command execution
content:
application/json:
schema:
oneOf:
- $ref: '#/components/schemas/SystemGetLogLevelsResult'
- $ref: '#/components/schemas/SystemCommandGetLogLevelNamesResult'
- $ref: '#/components/schemas/SystemGetSubSystemNemesResult'
403:
$ref: '#/components/responses/Unauthorized'
404:
$ref: '#/components/responses/NotFound'
get:
tags:
- System Commands
summary: Retrieve different values from the running service.
operationId: getSystemCommand
parameters:
- in: query
description: Get a value
name: command
schema:
type: string
enum:
- info
- extraConfiguration
- resources
required: true
responses:
200:
$ref: '#/components/schemas/SystemCommandResults'
403:
$ref: '#/components/responses/Unauthorized'
404:
$ref: '#/components/responses/NotFound'
#########################################################################################
##
## These are endpoints that all services in the uCentral stack must provide
##
#########################################################################################