Status API - phax/phoss-smp GitHub Wiki

Status API vs. Readiness API: the status API at /smp-status/ is meant for diagnostics. It always answers HTTP 200 - also if a backend specific check like smp.sql.db.connection-possible reports an unusable dependency - so it is not suitable as a health or readiness check. To let an orchestrator (e.g. a Kubernetes readiness probe or a load balancer) decide whether the SMP may receive traffic, use the Readiness API at /smp-ready instead.

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. The response is never cached.

Configuration

Property Default Description
smp.status.enabled true Enable or disable the status API. If it is disabled, still a JSON is returned but with the constant output { "status.enabled": false }
smp.status.show.certificate.dates false If true, the items smp.certificate.notbefore and smp.certificate.notafter are emitted (since v5.7.0)
smp.status.sql.enabled true SQL backend only: enable or disable all the smp.sql.* items

See Configuration for details.

Example output

Here's an example output of an SMP using the SQL backend (all values are illustrative):

{
    "build.timestamp": "2026-10-01T08:12:45+0000",
    "startup.datetime": "2026-10-06T07:00:01.123Z",
    "status.datetime": "2026-10-06T09:55:22.933+02:00",
    "status.datetime.utc": "2026-10-06T07:55:22.933Z",
    "version.smp": "8.6.1",
    "version.java": "21.0.8",
    "global.debug": false,
    "global.production": true,
    "smp.application": "phoss SMP",
    "smp.backend": "sql",
    "smp.mode": "production",
    "smp.resttype": "peppol",
    "smp.identifiertype": "peppol",
    "smp.id": "TEST-SMP-ID1",
    "smp.writable-rest-api.enabled": true,
    "smp.rest-remote-query-api.enabled": false,
    "smp.publicurl": "https://smp.example.org",
    "smp.forceroot": true,
    "smp.publicurl.mode": "request",
    "smp.rest.log-exceptions": false,
    "smp.rest.payload-on-error": true,
    "smp.totp.enabled": false,
    "smp.sml.enabled": true,
    "smp.sml.needed": true,
    "smp.sml.url": "https://api.sml.test.tech.peppol.org/edelivery-sml",
    "smp.sml.dnszone": "participant.sml.test.tech.peppol.org.",
    "smp.sml.request-timeout-ms": 30000,
    "smp.pd.enabled": true,
    "smp.pd.needed": true,
    "smp.pd.auto-update": true,
    "smp.pd.hostname": "https://test-directory.peppol.eu",
    "smp.certificate.configuration-valid": true,
    "smp.certificate.issuer": "CN=PEPPOL SERVICE METADATA PUBLISHER TEST CA - G2,OU=FOR TEST ONLY,O=OpenPEPPOL AISBL,C=BE",
    "smp.certificate.subject": "CN=PSG000000,OU=PEPPOL TEST SMP,O=Example,C=AT",
    "smp.certificate.expired": false,
    "proxy.http.configured": false,
    "proxy.https.configured": false,
    "proxy.username.configured": false,
    "csp.enabled": true,
    "csp.reporting.only": false,
    "csp.reporting.enabled": false,
    "smp.sql.target-database": "PostgreSQL",
    "smp.sql.pooling.max-connections": 8,
    "smp.sql.pooling.max-wait.duration": "PT10S",
    "smp.sql.pooling.between-evictions-runs.duration": "PT5M",
    "smp.sql.pooling.min-evictable-idle": "PT30M",
    "smp.sql.pooling.remove-abandoned-timeout": "PT5M",
    "smp.sql.pooling.test-on-borrow": "false",
    "smp.sql.db.connection-possible": true
}

Core status items

These items are emitted independent of the backend, in the order listed.

General

Key Type Since Description
build.timestamp string 5.0.7 Timestamp when the SMP was built
startup.datetime string 5.3.3 Date and time when the SMP web application was started. Only emitted if known
status.datetime string 5.0.6 Current date and time (in the server time zone) when the status was created
status.datetime.utc string 6.0.0 Current date and time in UTC when the status was created
version.smp string 5.0.6 The version of the SMP software
version.java string 5.0.6 The Java runtime version
global.debug boolean 5.0.6 Value of the Configuration property global.debug
global.production boolean 5.0.6 Value of the Configuration property global.production

SMP

Key Type Since Description
smp.application string 5.7.0 The application title (e.g. phoss SMP)
smp.backend string 5.0.6 The configured backend (sql, mongodb or xml)
smp.mode string 5.0.6 test if the SMP is a test version (property webapp.testversion, defaulting to global.debug), production otherwise
smp.resttype string 5.0.6 The configured REST API type (peppol or bdxr)
smp.identifiertype string 5.0.6 The configured identifier type (e.g. peppol, simple, bdxr1)
smp.id string 5.0.6 The SMP ID used for SML registration
smp.writable-rest-api.enabled boolean 5.0.6 true if the writable REST API (PUT, DELETE, ...) is enabled
smp.rest-remote-query-api.enabled boolean 8.0.6 true if the Remote Query API (/smpquery/*) is enabled
smp.publicurl string 5.1.0 The configured public URL of the SMP
smp.forceroot boolean 5.1.0 Value of the Configuration property smp.forceroot
smp.publicurl.mode string 8.0.2 Value of the Configuration property smp.publicurl.mode
smp.rest.log-exceptions boolean 5.2.0 true if exceptions in the REST API are logged
smp.rest.payload-on-error boolean 5.2.1 true if error details are contained in the REST API response payload
smp.totp.enabled boolean 8.4.3 true if the two-factor authentication (TOTP) of the management GUI is enabled via the Configuration property smp.totp.enabled. See the Security page for details

SML

Key Type Since Description
smp.sml.enabled boolean 5.0.6 true if the SML integration is enabled
smp.sml.needed boolean 5.0.6 true if the SML integration is required
smp.sml.url string 5.0.6 The management service URL of the selected SML. Only emitted if an SML is selected
smp.sml.dnszone string 5.0.7 The DNS zone of the selected SML. Only emitted if an SML is selected
smp.sml.connection-timeout-ms number 5.0.6 The connection timeout to the SML in milliseconds. Only emitted if a connection timeout is configured
smp.sml.request-timeout-ms number 5.0.6 The request timeout to the SML in milliseconds

Peppol Directory

Key Type Since Description
smp.pd.enabled boolean 5.0.6 true if the Peppol Directory integration is enabled
smp.pd.needed boolean 5.1.0 true if the Peppol Directory integration is required
smp.pd.auto-update boolean 5.0.6 true if business cards are automatically updated in the Peppol Directory
smp.pd.hostname string 5.0.6 The Peppol Directory host name

Certificate

Key Type Since Description
smp.certificate.configuration-valid boolean 5.0.6 true if the keystore configuration is valid. All other smp.certificate.* items are only emitted if this is true and the key is an X.509 certificate
smp.certificate.issuer string 5.0.6 The issuer DN of the SMP certificate
smp.certificate.subject string 5.0.6 The subject DN of the SMP certificate
smp.certificate.expired boolean 5.0.6 true if the SMP certificate is already expired
smp.certificate.notbefore string 5.7.0 Start of the certificate validity. Only emitted if smp.status.show.certificate.dates is true
smp.certificate.notafter string 5.7.0 End of the certificate validity. Only emitted if smp.status.show.certificate.dates is true

Proxy

Key Type Since Description
proxy.http.configured boolean 5.2.0 true if an HTTP proxy is configured
proxy.https.configured boolean 5.2.0 true if an HTTPS proxy is configured
proxy.username.configured boolean 5.2.0 true if a proxy user name is configured

Content Security Policy (CSP)

Key Type Since Description
csp.enabled boolean 5.2.6 Value of the Configuration property csp.enabled
csp.reporting.only boolean 5.2.6 Value of the Configuration property csp.reporting.only
csp.reporting.enabled boolean 5.2.6 Value of the Configuration property csp.reporting.enabled

MongoDB backend specific items

Currently no such items exist

SQL backend specific items

All these items are only emitted if the Configuration property smp.status.sql.enabled is true (which is the default). Durations are emitted in the ISO-8601 duration format (e.g. PT10S).

Key Type Since Description
smp.sql.target-database string 5.3.0-RC5 The configured database system (MySQL, PostgreSQL, ...)
smp.sql.pooling.max-connections number 8.0.11 The configured jdbc.pooling.max-connections
smp.sql.pooling.max-wait.duration string 8.0.11 The configured jdbc.pooling.max-wait.millis as a duration
smp.sql.pooling.between-evictions-runs.duration string 8.0.11 The configured jdbc.pooling.between-evictions-runs.millis as a duration
smp.sql.pooling.min-evictable-idle string 8.0.11 The configured jdbc.pooling.min-evictable-idle.millis as a duration
smp.sql.pooling.remove-abandoned-timeout string 8.0.11 The configured jdbc.pooling.remove-abandoned-timeout.millis as a duration
smp.sql.pooling.test-on-borrow string 8.0.12 The configured jdbc.pooling.test-on-borrow - note that this is the string "true" or "false", not a JSON boolean
smp.sql.db.connection-possible boolean 5.4.0 true if the database connection can currently be established, false if not. Not emitted if the URL parameter disable-long-running=true is used

Since v8.4.0 the connection received for smp.sql.db.connection-possible 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 as jdbc.pooling.test-on-borrow is disabled (which is the default).

XML backend specific items

Currently no such items exist

⚠️ **GitHub.com Fallback** ⚠️