PropertyController
Summary
Defines a controller to handle actions relative to properties' routes.
Constructor
PropertyController
Syntax
PropertyController
()
Summary
Item Index
Methods
getEntitiesAction
Syntax
getEntitiesAction
(
async
-
request
-
response
-
next
Summary
Gets custom properties.
Parameters:
-
request
RequestExpressJS HTTP Request
-
[query]
Object optionalRequest's query
-
[include]
String | Array optionalThe list of fields to include from returned properties -
[exclude]
String | Array optionalThe list of fields to exclude from returned properties. Ignored if include is also specified. -
[query]
String optionalSearch query to search on both name and description -
[types]
Array optionalTo filter properties by type -
[page=0]
String optionalThe expected page -
[limit=10]
String optionalThe expected limit -
[sortBy="name"]
String optionalThe field to sort properties by (either **name** or **description**) -
[sortOrder="desc"]
String optionalThe sort order (either **asc** or **desc**)
-
-
-
response
ResponseExpressJS HTTP Response
-
next
FunctionFunction to defer execution to the next registered middleware
Example:
// Response example
{
"entities" : [ ... ],
"pagination" : {
"limit": ..., // The limit number of custom properties by page
"page": ..., // The actual page
"pages": ..., // The total number of pages
"size": ... // The total number of custom properties
}
getPropertyTypesAction
Syntax
getPropertyTypesAction
(
async
-
request
-
response
-
next
Summary
Gets the list of custom property types.
getProvider
Syntax
Summary
Gets associated provider.
Returns:
PropertyProvider:
The provider associated to the controller