-
Notifications
You must be signed in to change notification settings - Fork 51
Status API
The status API was introduced in v5.0.6 upon request #73.
It adds the relative URL /smp-status/ to the SMP server to query certain configuration settings.
It MUST be accessed with HTTP GET and the trailing slash is important.
The optional URL parameter disable-long-running of type boolean (since v5.4.0) can be used to explicitly disable the execution of all long running actions in the status determination (such as the database connection status).
The response is a UTF-8 encoded JSON document with MIME type application/json.
Note: the status API is meant for diagnostics and it always answers HTTP 200 - also if a backend specific check like smp.sql.db.connection-possible reports an unusable dependency. To let an orchestrator decide whether the SMP may receive traffic, use the Readiness API at /smp-ready instead.
The status API can be disabled via the Configuration parameter smp.status.enabled.
If it is disabled, still a JSON is returned but with the constant output { "status.enabled": false }.
The SQL specific elements of the status API can be disabled via the Configuration parameter smp.status.sql.enabled.
Here's example output from a development configuration:
{
"status.datetime": "2019-01-01T18:55:22.933Z",
"version.smp": "5.1.0-SNAPSHOT",
"build.timestamp": "2019-01-01T16:48:31+0000",
"version.java": "1.8.0_152",
"global.debug": true,
"global.production": false,
"smp.backend": "xml",
"smp.mode": "test",
"smp.resttype": "peppol",
"smp.identifiertype": "simple",
"smp.id": "TEST-SMP-ID1",
"smp.writable-rest-api.enabled": true,
"smp.publicurl": "http://smp.example.org",
"smp.forceroot": true,
"smp.sml.enabled": false,
"smp.sml.needed": true,
"smp.sml.url": "https://acc.edelivery.tech.ec.europa.eu/edelivery-sml/manageparticipantidentifier",
"smp.pd.enabled": true,
"smp.pd.needed": true,
"smp.pd.auto-update": true,
"smp.pd.hostname": "https://directory.peppol.eu",
"smp.certificate.configuration-valid": true,
"smp.certificate.issuer": "CN=PEPPOL SERVICE METADATA PUBLISHER TEST CA,OU=FOR TEST PURPOSES ONLY,O=NATIONAL IT AND TELECOM AGENCY,C=DK",
"smp.certificate.subject": "CN=SMP_2000000309,O=Bundesrechenzentrum GmbH,C=AT",
"smp.certificate.expired": false,
"proxy.http.configured": false,
"proxy.https.configured": false,
"proxy.username.configured": false
}The example output above stems from an old development version and does not contain all items that are emitted today. Recently added items are:
-
smp.totp.enabled(since v8.4.3) -trueif the two-factor authentication (TOTP) of the management GUI is enabled via the Configuration propertysmp.totp.enabled,falseif it is disabled (which is the default). See the Security page for details.
Currently no such properties exist
-
smp.sql.target-database(since 5.3.0-RC5) - the configured database system (MySQL, PostgreSQL, ...) -
smp.sql.db.connection-possible(since 5.4.0) -trueif the database connection can currently be established,falseif not. Since v8.4.0 the received connection is additionally validated, so that a database that became unusable after the connection was put into the pool is detected as well - the connection pool itself hands out pooled connections unvalidated, as long asjdbc.pooling.test-on-borrowis disabled (which is the default)
Currently no such properties exist
It is appreciated if you star the GitHub project if you like it.
Donation link: https://paypal.me/PhilipHelger

- Home
- News and noteworthy
- Migrations
- Download
- Features
- Configuration
- Running
- Source related
- Other information
- Future plans
- License
- Release Tasks