Solution Configuration Service

This service provides access to the active solution context information and usage.

Operations

Events

Operations


getParameters

Get the services configuration parameters.

Arguments

parameters - object - Object containing service call parameters.
Name Type Description
service string Indicates the service name

Responses

The services configuration parameters

Content: [ object ]

Name Type Description
parameters object The service configuration parameters elements.
Failed to get the services configuration.

Content: object Error response

Name Type Description
type string Error type
error string Error message
status integer Response code

Example

local parameters = Config.getParameters({service = 'content'})
print(parameters)

listService

Get the list of services configuration.

Arguments

parameters - object - Object containing service call parameters.
Name Type Description
type string The type filter to indicate the type of service.

Responses

List of services configuration

Content: [ object ]

Name Type Description
id string(uuid) Unique Id for the service configuration.
type "application", "core", "exchange", "product" Indicates the type of service: Core: Fixed & Native to Murano, tested & deployed through Exosite SOPs External: Dynamically added through the service registry API Solution: Virtual services pointing to a Murano Solution Product: Virtual services pointing to a Murano Product solution This value is cached from Services for query purpose.
service string Service alias reference.
script_key string Scripting key reference, unique per solution.
Failed to get the services configuration.

Content: object Error response

Name Type Description
type string Error type
error string Error message
status integer Response code

Example

local listService = Config.listService({type = 'exchange'})
print(listService)

setParameters

Set the services configuration parameters.

Arguments

parameters - object - Object containing service call parameters.
Name Type Description
service string Indicates the service name

Responses

Successfully updated

Content: nil

Failed to get the services configuration.

Content: object Error response

Name Type Description
type string Error type
error string Error message
status integer Response code

Example

local result = Config.setParameters({service = 'content', parameters = {p1=1234}})
print(result)

solution

Get the solution information.

Responses

Returns the solution data.

Content: object Represents a Murano solution data

Name Type Description
id ^[a-zA-Z0-9]+$ Unique reference of the solution
name string {..100} User defined custom name
domain ^[a-zA-Z0-9\_\-\.]+$ Solution API domain name used by the Webservice core service.
products [ ^[a-zA-Z0-9\_\-\.]+$ ] The list of products associated with this solution and used by the Device core service.
business_id ^[a-zA-Z0-9\_\-]+$ Customer Account ID
Failed to retrieve the data.

Content: object Error response

Name Type Description
type string Error type
error string Error message
status integer Response code

Example

local solution = Config.solution()
print(solution.products)

usage

Get the solution usage and limitation by services.

Responses

Returns the solution usage.

Content: object Current solution usage. A map of serviceAlias (e.g., email or webservice).

Name Type Description
serviceAlias object Current usage & quota for this particular service.
serviceAlias.quota object Current quota for this service.
serviceAlias.quota.calls_daily number Service call limitation per day.
serviceAlias.quota.other_quota number Other Service specific limitation. See http://docs.exosite.com/murano/services for more information on service limitations.
serviceAlias.quota.calls_monthly number Service call limitation per month.
serviceAlias.usage object Current usage for this service.
serviceAlias.usage.calls_daily number Today's service calls counts.
serviceAlias.usage.calls_total number Total service calls counts for this solution.
serviceAlias.usage.other_metric number Other service specific metrics. See http://docs.exosite.com/murano/services for more information on service available metrics and quota.
serviceAlias.usage.calls_monthly number Service calls counts so far this month.
serviceAlias.service ^[a-z][a-z0-9]+$ Unique name used as service reference in scripts.
Failed to get the current usage.

Content: object Error response

Name Type Description
type string Error type
error string Error message
status integer Response code

Example

local usage = Config.usage()
local total_services_calls_today = 0
for alias, serviceinfo in pairs(usage) do

  if serviceinfo.usage.calls_daily ~= nil then

    total_services_calls_today = total_services_calls_today + serviceinfo.usage.calls_daily

  end

end
print(total_services_calls_today)

Events


status

Event triggered by Murano UI to provide information related to solution health.

Arguments

service - object - Query data (TBD)
Name Type Description

Responses

The service status trigger response object.

Content: object

Name Type Description

Example

function handle_config_status (service)

 -- Your logic comes here 

end

service

Service config had been changed and send the service config data.

Arguments

service - object - The list of services configured by the user within this solution.
Name Type Description
id string(uuid) Unique Id for the service configuration.
type "application", "core", "exchange", "product" Indicates the type of service: Core: Fixed & Native to Murano, tested & deployed through Exosite SOPs External: Dynamically added through the service registry API Solution: Virtual services pointing to a Murano Solution Product: Virtual services pointing to a Murano Product solution This value is cached from Services for query purpose.
action "added", "updated", "removed" Action of service config changed.
service string Service alias reference.
script_key string Scripting key reference, unique per solution.

Example

function handle_config_service (service)

 -- Your logic comes here 

end