API class with method to process HTTP REST requests.

Constructors

Properties

Methods

Constructors

  • Constructor of API object. NOTE! OINODb.initDatamodel must be called if created manually instead of the factory.

    Parameters

    Returns OINOApi

Properties

datamodel: OINODataModel

API datamodel

db: OINODb

API database reference

API parameters

Methods

  • Method for handlind a HTTP REST request with GET, POST, PUT, DELETE corresponding to SQL select, insert, update and delete.

    Parameters

    • method: string

      HTTP verb (uppercase)

    • id: string

      URL id of the REST request

    • body: string

      HTTP body data as string

    • params: OINORequestParams

      HTTP URL parameters as key-value-pairs

    Returns Promise<OINOApiResult>