Skip to main content

Delete one learned rule or skill

DELETE 

/session/learned/file

Deletes one learned rule's file, or one learned skill's whole directory (skills/<name>/ with everything in it). The deletion is immediate and cannot be undone. The next turn and the next changeDirectory call resolve the harness without it; a conversation that already resolved it keeps what it loaded until then. Only files under a learned directory can be deleted this way.

  • Select the session with the X-Session-ID header.
  • Returns 204 with no body on success.
  • Returns 400 with code VALIDATION_FAILED when name has an empty, ., or .. segment, contains a backslash, or is nested too deep.
  • Returns 404 with code SESSION_NOT_FOUND when the session does not exist, and 404 with code NOT_FOUND (learned file not found) when the deployment has no global learned directory (for scope=global), or the file does not exist, is not a regular file, or resolves outside its learned directory through a symbolic link.

Request​

Responses​

Learned file deleted. The response has no body.

Response Headers
    X-Session-ID

    The session this response belongs to. For session-scoped requests it echoes the X-Session-ID request header; for POST /sessions/open and POST /sessions/system it is the session that was opened or created.

    X-Request-ID

    The request's correlation ID. When the request carried an X-Request-ID header holding a UUID, Peen echoes it; otherwise Peen generates a new UUID. The controller log records the same value for this request.