Options
All
  • Public
  • Public/Protected
  • All
Menu

Class AkeraRestApi

The implementation of the akera.io business logic API middleware.

This allows execution of any business logic found in application server's Web Path in a dynamic way but does not have any meta-data information about available business logic.

[AkeraRestCatalogApi] is using a business logic catalog definition and only allow exeecution of business logic services defined in the catalog.

Hierarchy

Index

Constructors

constructor

  • Parameters

    • webApp: AkeraWeb

      The @akera/web instance holding the application server(s) information.

    Returns AkeraRestApi

Properties

Protected _router

_router: express.Router

Protected _webApp

_webApp: AkeraWeb

Methods

Protected _error

  • _error(err: Error | string, res?: express.Response, code?: number): void
  • Parameters

    • err: Error | string
    • Optional res: express.Response
    • Optional code: number

    Returns void

Protected _getDirection

  • _getDirection(direction: string): Direction
  • Parameters

    • direction: string

    Returns Direction

Protected _getEnum

  • _getEnum(oEnum: Object, value: string | number): string | number
  • Parameters

    • oEnum: Object
    • value: string | number

    Returns string | number

Protected _getParameter

  • _getParameter(p: Object, version?: number): IParameter
  • Parameters

    • p: Object
    • Optional version: number

    Returns IParameter

Protected _getRequestCall

  • _getRequestCall(req: Object, type?: ABLType, call?: string, method?: string): IABLCall
  • Parameters

    • req: Object
    • Optional type: ABLType
    • Optional call: string
    • Optional method: string

    Returns IABLCall

Protected _handleRequest

  • _handleRequest(broker: string, req: express.Request, res: express.Response, type?: ABLType, call?: string, method?: string): Promise<void>
  • Parameters

    • broker: string
    • req: express.Request
    • res: express.Response
    • Optional type: ABLType
    • Optional call: string
    • Optional method: string

    Returns Promise<void>

Protected _log

  • _log(level: LogLevel, message: string): void
  • Parameters

    • level: LogLevel
    • message: string

    Returns void

Protected _mount

  • _mount(broker?: string): express.Router
  • Parameters

    • Optional broker: string

    Returns express.Router

init

  • init(): express.Router
  • Returns the middleware that can be used to mount the API interface.

    Returns express.Router