Operation - CSE Management
If enabled, the CSE provides a management interface that allows to manage some aspects of the CSE as well as to retrieve information about the CSE's operation. Management commands can be sent to the CSE via HTTP requests.
Enabling CSE Management
The CSE management interface is disabled by default. To enable it, set the enableManagementEndpoint setting in the configuration file to true
:
Management Commands
The CSE management interface provides several commands that can be used to manage the CSE and retrieve information about its operation. The commands are sent as HTTP requests to the management endpoint, which is located at /__mgmt__
of the CSE's HTTP server.
Command | Description |
---|---|
help | Show a list of available management commands. |
config | Get the current configuration of the CSE in JSON format. |
log | Stream the live log output of the CSE. The log will continue to stream until the connection is closed. |
loglevel | Get or set the log level of the CSE. The log level can be set to info , debug , warn , error , or off . |
registrations | Get the current registrations of the CSE in JSON format. This includes the registrations to remote CSEs, service providers and the registrations of local AEs. |
reset | Reset the CSE to its initial state. This will clear all resources from the CSE. |
restart | Shutdown the CSE to restart it. The CSE will not restart internally, but it will exit with an exit code 82. See also the example below. |
shutdown | Shutdown the CSE normally. The CSE will exit with an exit code 0. |
status | Get the current status of the CSE in JSON format. This includes information about the CSE resources, operational parameters and requests. |
Examples
The following examples show how to use the management commands via curl
.
Get the CSE's Configuration
This will return the current configuration of the CSE in JSON format.
Get the CSE's Log Output
This will stream the live log output of the CSE. The log will continue to stream until the connection is closed, e.g. by pressing Ctrl+C
in the terminal.
Set the CSE's Log Level
Shutdown the CSE
Restart the CSE
This will shutdown the CSE and exit with an exit code 82.The CSE will not restart automatically. To support this one needs to check the exit code of the CSE and restart it manually or via a script.
The following example code shows how to restart the CSE automatically using a shell script: