POST /learn/{pid} lets you teach the NSP daemon what state keys really mean. When the probe labels a field with a generic name like unknown_0x4a2f, when it assigns the wrong type to a value, or when an action is bound to the wrong function, you can submit a correction and the daemon incorporates it into the schema registry. Your correction takes effect on the very next probe cycle — typically within 2 seconds — and the schema version is bumped so you can track when the change landed.
Endpoint
integer
required
OS process ID of the target application. Obtain from
GET /apps.Request Body
array
required
List of label corrections to submit. You may include multiple corrections in a single request.
string
required
The current schema version from
SubstrateState.schema_version. The daemon uses this to detect stale corrections — if the schema has already moved past the version you supply, the correction may be rejected.Response
integer
Number of corrections that were validated and written to the schema registry.
integer
Number of corrections that were rejected, for example due to a stale
schema_version or an invalid correct_type value.string
The schema version after accepted corrections were applied. Use this value as
schema_version in subsequent /learn calls.string
Human-readable summary of the outcome.
When to Use /learn
Submit corrections in any of the following situations:
- A state key appears as
unknown_XXXX— the probe could not automatically label it, but you know what it represents. - A key has the wrong type — for example the probe labeled a numeric badge count as
stringinstead ofnumber. - An action is bound to the wrong runtime function — for example
archiveis invoking the wrong method on a JVM target. - You want to improve the overall confidence score for an application after initial attachment.
Every accepted correction bumps the
schema_version by a patch increment. After submitting corrections, re-read the state via GET /state/{pid} to confirm that the new labels appear in the objects map within the next probe cycle (within 2 seconds of acceptance).