OpenVeo Core server

API Docs for: 7.0.0
Show:

ApplicationController

Extends EntityController
Module: core-controllers

Summary

Defines an entity controller to handle requests relative to the Web Service client applications and scopes.

Constructor

ApplicationController

Syntax

ApplicationController

()

Summary

Methods

getEntitiesAction

Syntax

getEntitiesAction

(
  • request
  • response
  • next
)

Summary

Gets applications.

Parameters:

  • request Request

    ExpressJS HTTP Request

    • [query] Object optional

      Request's query parameters

      • [include] String | Array optional
        The list of fields to include from returned applications
      • [exclude] String | Array optional
        The list of fields to exclude from returned applications. Ignored if include is also specified.
      • [query] String optional
        Search query to search on application name
      • [useSmartSearch=1] Number optional
        1 to use a more advanced search mechanism, 0 to use a simple search based on a regular expression
      • [page=0] Number optional
        The expected page in pagination system
      • [limit=10] Number optional
        The maximum number of expected results
      • [sortBy="name"] String optional
        The application field To sort by (only "name" is available right now)
      • [sortOrder="desc"] String optional
        The sort order (either "asc" or "desc")
  • response Response

    ExpressJS HTTP Response

  • next Function

    Function to defer execution to the next registered middleware

Example:

// Response example
{
  "entities" : [ ... ],
  "pagination" : {
    "limit": ..., // The limit number of applications by page
    "page": ..., // The actual page
    "pages": ..., // The total number of pages
    "size": ... // The total number of applications
}

getProvider

Syntax

getProvider

() ClientProvider

Summary

Gets an instance of the provider associated to the controller.

Returns:

ClientProvider:

The provider

getScopesAction

Syntax

getScopesAction

(
  • request
  • response
)

Summary

Gets the list of scopes and return it as a JSON object.

Parameters:

  • request Request

    ExpressJS HTTP Request

  • response Response

    ExpressJS HTTP Response