utils

Available for:Map PanelBI Map PanelRecipe PanelCustom Panel

Methods

Name Summary
connection

Send request to M App Foundation api.

userConnection

Send request to M App Foundation api in currently logged user context.

Methods • Details

connection(Url|Config) → {Promise}(async)

async
Available for:Map PanelBI Map PanelRecipe PanelCustom Panel

Send request to M App Foundation api. This is an object that is a representation of CujoJS Rest client: (https://github.com/cujojs/rest/blob/master/docs/interfaces.md#common-interfaces).

Parameters

Name Type Description
Url|Config String|Object

String or CujoJS request configuration (https://github.com/cujojs/rest/blob/master/docs/interfaces.md#common-request-properties)

Returns

TypeDescription
Promise

Example

gsp.m_app.utils.connection("api/v1/models").then(function(result){console.log(result);})

userConnection(Url|Config) → {Promise}(async)

async
Available for:Map PanelBI Map PanelRecipe PanelCustom Panel

Send request to M App Foundation api in currently logged user context. This is an object that is a representation of CujoJS Rest client: (https://github.com/cujojs/rest/blob/master/docs/interfaces.md#common-interfaces).

Parameters

Name Type Description
Url|Config String|Object

String or CujoJS request configuration (https://github.com/cujojs/rest/blob/master/docs/interfaces.md#common-request-properties)

Returns

TypeDescription
Promise

Example

gsp.m_app.utils.userConnection("api/v1/models").then(function(result){console.log(result);})