Operation - Infrastructure Diagrams
The CSE can generate a diagram with an overview about the hosted resource tree and the current deployment infrastructure of remote CSEs. This is available by sending a GET request as follows:
curl localhost:8080/__structure__ # ...or...
curl localhost:8080/__structure__/puml
This returns a PlantUML diagram script that can be rendered with the PlantUML tool. The diagram shows the resource tree and the deployment infrastructure of remote CSEs. The diagram can be used to get an overview of the current deployment and to identify potential issues.
An optional argument lvl=<int> can be provided to the URL to limit the number if levels of the resource tree in the diagram.
This feature must be enabled in the configuration file under [server.http].enableStructureEndpoint.
Attention
Enabling this feature might reveal sensitive data. It should be disabled if not used.
When enabled the http server creates an additional endpoint /__structure__. A GET request to that endpoint returns a diagram description in PlantUML format that can be transformed in images with various tools (for example, with the online editor on the PlantUML website).
A similar text representation of the resource tree only can be retrieved from the endpoint /__structure__/text .
curl localhost:8080/__structure__/text
...
cse-in -> m2m:cb (csi=/id-in) | ri=id-in
├── acpCreateACPs -> m2m:acp | ri=acpCreateACPs
├── CAdmin -> m2m:ae | ri=CAdmin
...
Enabling the Structure Endpoint
The CSE structure endpoint is disabled by default. To enable it, set the enableStructureEndpoint setting in the configuration file to true:
Authentication
By default, authentication is not enabled for accessing the CSE structure endpoint. To enable authentication, you need to configure the appropriate credentials and authentication mechanisms in the CSE configuration file. This is done by adding the a username or token with the following setting to the [http.security] section:
[http.security]
enableStructureEndpoint=username-or-token
In addition you must also add a corresponding entry for the username/password to the http authentication file or a token to the http token file.
Also, the appropriate authentication method must be enabled for the HTTP binding in order for the structure endpoint authentication to take effect.
The following example shows how to use the structure endpoint with basic authentication enabled.