Procedures
Procedures API: 2 endpoints under /v1.
Record a procedure validation
POST /v1/procedures/validate
Records one application of a learned procedure as a success or failure, updating its validation counts and confidence. An unknown procedure ID is ignored. Requires the write permission.
See also: Consolidation, episodes and procedures.
Request body (ValidateProcedureRequest)
| Field | Type | Description |
|---|---|---|
procedureId | string (uuid) | ID of the procedure that was applied. |
success | boolean | Whether applying the procedure succeeded. |
workspaceId | string (uuid) | Workspace of the procedure. |
Responses
| Status | Description |
|---|---|
200 | Confirmation with status validated. |
Response fields
| Field | Description |
|---|---|
status | Always validated. |
Example
curl -X POST "$API/v1/procedures/validate" \
-H "Authorization: Bearer $KEY" \
-H 'Content-Type: application/json' \
-d '{"procedureId":"<procedureId>","success":true,"workspaceId":"$WS"}'List or search procedures
GET /v1/procedures/{workspaceId}
Returns learned procedures, optionally matched against a query (semantically when embeddings are available, otherwise by keyword). limit defaults to 10 and is clamped to 1 to 100. Requires the read permission.
See also: Consolidation, episodes and procedures.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
workspaceId (required) | path | string (uuid) | Workspace to act in. A workspace the credential cannot access returns 404. |
query | query | string | Optional search text used to match procedures. |
limit | query | integer | Maximum number of items to return. The default and allowed range depend on the endpoint. |
Responses
| Status | Description |
|---|---|
200 | A list of procedures with name, trigger, goal, steps, anti-patterns, validation counts and confidence. |
Example
curl -X GET "$API/v1/procedures/$WS" \
-H "Authorization: Bearer $KEY"