Runtime Configuration APIs

The Runtime Configuration APIs allow you to manage global configurations of a runtime. The following configurations are supported:

  • Extended Settings

  • JNDI Aliases

  • JMS Aliases

Important

Extended Settings

GET - List All Extended Settings

Allows you to retrieve names of all extended settings from a runtime.

URL

../<runtime-alias>/settings

Parameters

Request

None

Response

[
    {
        "assetId": "watt.server.coder.responseAsXML",
        "type": "settings"
    },
    {
        "assetId": "watt.client.data.maxToStringLength ",
        "type": "settings"
    }
]

GET - Get Extended Setting Configuration

Allows you to retrieve the value of a setting.

URL

../<runtime-alias>/settings/<asset-id>

Parameters

Request

None

Response

{
    "propertyKey": "watt.server.coder.responseAsXML",
    "value": "true"
}

PUT - Set Extended Setting Configuration

Allows you to set a new value for the extended setting. This value is not displayed immediately unless you run the Synchronize Extended Setting Configuration API or set the updateRuntime value to true.

URL

../<runtime-alias>/settings/<asset-id>?updateRuntime=(true|false)

Parameters

Request Headers

Content-Type: application/json

Request Body

{
  "value": "false"
}

Response

POST - Synchronize Extended Setting Configuration

Allows you to synchronize the configured setting with the runtime.

URL

../<runtime-alias>/settings/<asset-id>/sync

Parameters

Request

None

Response

{
    "code": 0,
    "description": "The synchronization process has started. Check the <runtime-alias> for more details later."
}

JNDI Aliases

JNDI aliases can be created or updated only in the cloud runtime.

GET - List JNDI Aliases

Allows you to retrieve names of all JNDI settings from a runtime.

URL

../<runtime-alias>/jndi

Parameters

Request

None

Response

[
    {
        "assetId": "DEFAULT_IS_JNDI_PROVIDER",
        "type": "jndi"
    },
    {
        "assetId": "LocalJNDI",
        "type": "jndi"
    }
]

POST - Create JNDI Alias

Allows you to create a JNDI for a cloud runtime. JNDI Alias is not created immediately on the cloud runtime unless updateRuntime is set to true or Synchronize JNDI Alias with runtime API is run.

URL

../default/jndi/<asset-id>?updateRuntime=(true|false)

Parameters

Request Headers

{
  Content-Type: application/json
}

Request Body

{
    "properties": [
        {
            "propertyKey": "aliasName",
            "value": "LocalJNDI"
        },
        {
            "propertyKey": "is.jndiAlias.description",
            "value": "Connection to local UM"
        },
        {
            "propertyKey": "java.naming.initialContextFactory",
            "value": "com.pcbsys.nirvana.nSpace.NirvanaContextFactory"
        },
        {
            "propertyKey": "java.naming.providerURL",
            "value": "<UMRealmURL>"
        },
        {
            "propertyKey": "java.naming.securityPrincipal",
            "value": "<Username>"
        },
        {
            "propertyKey": "java.naming.securityCredentials",
            "value": "<Password>"
        }
    ]
}

Response

{
    "code": 0,
    "description": "Asset was added successfully."
}

PUT - Update JNDI Alias

Allows you to update the values of a JNDI alias in a runtime. These values are not displayed immediately in the cloud runtime unless updateRuntime is true or the Synchronize JNDI Alias with runtime API is run.

URL

../default/jndi/<asset-id>?updateRuntime=(true|false)

Parameters

Request Headers

{
    Content-Type: application/json
}

Request Body

{
    "properties": [
        {
            "propertyKey": "java.naming.provider.url",
            "value": "nsp://um.local:9000"
        }
    ]
}
Note
Calling the ../default/jndi/LocalJNDI API with the mentioned details will update the description of LocalJNDI in the cloud runtime.

Response

PATCH - Override JNDI Alias

Allows you to override JNDI alias for a particular runtime. Like create or update APIs, the overridden values are not immediately displayed on the runtime, unless the updateRuntime value is set to true or the Synchronize JNDI Alias with runtime API is run.

Note
The Override JNDI Alias API must be invoked atleast once for a runtime other than the cloud runtime for JNDI alias to be available in that runtime. If no properties have to be overridden, then the Override JNDI Alias API must be invoked with an empty request body.

URL

../<runtime-alias>/jndi/<asset-id>?updateRuntime=(true|false)

Parameters

Request Headers

{
  Content-Type: application/json
}

Request Body

{
    "properties": [
        {
            "propertyKey": "java.naming.security.credentials",
            "value": "<jndi credentials>"
        }
    ]
}
Note
Calling ../MyEdgeServer/jndi/LocalJNDI API with the mentioned details will override the credentials of LocalJNDI connection for MyEdgeServer runtime.

Response

POST - Synchronize JNDI Alias

Allows you to synchronize JNDI alias with a runtime. This ensures that the JNDI alias is created or updated on the runtime.

URL

../<runtime-alias>/jndi/<asset-id>/sync

Parameters

Request

Calling ../MyEdgeServer/jndi/LocalJNDI API with mentioned details will update description of LocalJNDI in the MyEdgeServer runtime.

Response

{
    "code": 0,
    "description": "The synchronization process has started. Check the <runtime-alias> for more details later."
}

JMS Aliases

JMS aliases can only be created or updated in the cloud runtime.

GET - List JMS Aliases

Allows you to retrieve all JMS aliases present on the provided runtime.

URL

../<runtime-alias>/jms

Parameters

Request

None

Response

[
    {
        "assetId": "DEFAULT_IS_JMS_CONNECTION",
        "type": "jms"
    },
    {
        "assetId": "PE_NONTRANSACTIONAL_ALIAS",
        "type": "jms"
    }
]

POST - Create JMS Alias

Allows you to set a new JMS alias for the cloud runtime. JMS alias is not created immediately on the cloud runtime unless updateRuntime is true or the Synchronize JMS Alias with runtime API is run.

URL

../default/jms/<asset-id>?updateRuntime=(true|false)

Parameters

Request Headers

{
    Content-Type: application/json
}

Request Body

{
    "properties": [
        {
            "propertyKey": "aliasName",
            "value": "LocalJMS"
        },
        {
            "propertyKey": "description",
            "value": "My local JMS connection"
        },
        {
            "propertyKey": "clientID",
            "value": "LOCAL_JMS_CLIENT"
        },
        {
            "propertyKey": "user",
            "value": "<username>"
        },
        {
            "propertyKey": "password",
            "value": "<password>"
        },
        {
            "propertyKey": "jndi_jndiAliasName",
            "value": "LocalJNDI"
        },
        {
            "propertyKey": "jndi_connectionFactoryLookupName",
            "value": "LocalFactory"
        }
    ]
}

Response

{
    "code": 0,
    "description": "Asset was added successfully."
}

PUT - Update JMS Alias

Allows you to set new changes to the values of an existing JMS alias in the cloud runtime. These values are not displayed in the cloud runtime unless the updateRuntime value is set to true or the Synchronize JMS Alias with runtime API is run.

URL

../default/jms/<asset-id>

Parameters

Note
JMS alias can only be updated in the cloud runtime. To use JMS alias in an edge runtime, you must run the Override JMS Alias values API for a runtime and sync the alias on that runtime.

Request Headers

{
  Content-Type: application/json
}

Request Body

{
 "properties": 
 [
    {
        "propertyKey": "is.jndiAlias.description",
        "value": "Updated JMS alias description"
    }
 ]
}
Note
Calling the ../default/jms/LocalJMS API with the mentioned details will update description of LocalJMS in the cloud runtime.

Response

PATCH - Override JMS Alias

Allows you to override values of a JMS alias for a particular runtime. Like create or update APIs, overridden values are not immediately displayed on the runtime, unless the updateRuntime value is set to true or Synchronize JMS Alias with runtime API is run.

Note
The Override JMS Alias API must be invoked atleast once for a runtime other than the cloud runtime for JMS alias to be available in that runtime. If no properties need to be overridden, then the Override JMS Alias API must be invoked with an empty request body.

URL

../<runtime-alias>/jms/<asset-id>

Parameters

Note
JMS alias values must only be overridden for runtimes other than the cloud runtime.

Request Headers

{
  Content-Type: application/json
}

Request Body

{
  "properties":
     [
        {
            "propertyKey": "is.jndiAlias.description",
            "value": "Updated JMS alias description for MyEdgeServer"
        }
     ]
}
Note
Calling ../MyEdgeServer/jndi/LocalJMS API with the mentioned details will update the description of LocalJMS in the MyEdgeServer runtime.

Response

POST - Synchronize JMS Alias with Runtime

Allows you to synchronize JMS alias with a runtime. This ensures that the JMS alias is created or updated on the runtime.

URL

../<runtime-alias>/jms/<asset-id>/sync

Parameters

Request

Calling ../MyEdgeServer/jms/LocalJMS API with the mentioned details will update description of LocalJMS in MyEdgeServer runtime.

Response

{
    "code": 0,
    "description": "The synchronization process has started. Check the <runtime-alias> for more details later."
}

PATCH - Enable/Disable JMS Alias

Allows you to enable or disable a JMS alias on a runtime. Unlike other API calls, the Enable/Disable JMS Alias API applies the state immediately on the runtime.

URL

../<runtime-alias>/jms/<asset-id>/properties/state

Parameters

Request Headers

{
  Content-Type: application/json
}

Request Body

{
  "enabled": "<true|false>"
}

Calling ../MyEdgeServer/jms/LocalJMS/properties/state API with enabled set to false in the mentioned payload, disables the LocalJMS in the MyEdgeServer runtime.

Response

{
    "code": 0,
    "description": "Asset state was updated successfully. The synchronization process has started. Check the <alias> for more details later."
}