openapi: 3.0.1 info: title: OpenWifi Hello World Service API description: A sample Micro Service for OpenWifi version: 1.0.0 license: name: BSD3 url: https://github.com/Telecominfraproject/wlan-cloud-ucentralgw/blob/master/LICENSE contact: name: Arilia Support url: https://www.ucentral.info/support servers: - url: 'https://localhost:16003/api/v1' security: - ApiKeyAuth: [] - bearerAuth: [] 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 enum: - 0 # Success - 1 # PASSWORD_CHANGE_REQUIRED, - 2 # INVALID_CREDENTIALS, - 3 # PASSWORD_ALREADY_USED, - 4 # USERNAME_PENDING_VERIFICATION, - 5 # PASSWORD_INVALID, - 6 # INTERNAL_ERROR, - 7 # ACCESS_DENIED, - 8 # INVALID_TOKEN 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 schemas: HelloResponse: type: object properties: response: type: string time: type: integer format: int64 from: type: string format: email ######################################################################################### ## ## 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' TagIntPair: type: object properties: tag: type: string value: type: integer format: int64 TagIntPairList: type: object properties: tagList: type: array items: $ref: '#/components/schemas/TagIntPair' NoteInfo: type: object properties: created: type: integer format: int64 createdBy: type: string note: type: string 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 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 ## ######################################################################################### paths: /hello: get: tags: - Sample REST Call summary: Return world. description: Get a list of firmwares. operationId: getHello responses: 200: description: List firmwares content: application/json: schema: $ref: '#/components/schemas/HelloResponse' 403: $ref: '#/components/responses/Unauthorized' 404: $ref: '#/components/responses/NotFound' ######################################################################################### ## ## These are endpoints that all services in the uCentral stack must provide ## ######################################################################################### /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: Successfull 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 required: true responses: 200: description: Successfull command execution content: application/json: schema: oneOf: - $ref: '#/components/schemas/SystemInfoResults' 403: $ref: '#/components/responses/Unauthorized' 404: $ref: '#/components/responses/NotFound'