Skip to content

Agent Learning

The agent learning resource.

Base/agentLearning
GET/agentLearning

List agent learnings

Retrieve a paginated list of agent learnings. Filter, order, and select columns with PostgREST query parameters.

Query parameters

selectstring

Comma-separated columns to return. Defaults to all.

orderstring

Column to sort by, e.g. `createdAt.desc`.

limitinteger

Maximum rows to return.

offsetinteger

Rows to skip, for pagination.

GET/agentLearning
curl --request GET \
  --url '<your-host>/agentLearning?select=*&limit=10' \
  --header 'Authorization: Bearer <api-key>'
Response
[
  {
    "id": "abc123def456",
    "companyId": "xyz789",
    "kind": "string",
    "subjectKind": "string",
    "subjectId": "xyz789",
    "subjectLabel": "string",
    "relatedKind": "string",
    "relatedId": "xyz789"
  }
]
GET/agentLearning

Retrieve a agent learning

Fetch a single agent learning by filtering on `id`.

Query parameters

idstring

Match on the agent learning's `id`, e.g. `eq.{id}`.

GET/agentLearning
curl --request GET \
  --url '<your-host>/agentLearning?id=eq.%7Bid%7D' \
  --header 'Authorization: Bearer <api-key>'
Response
{
  "id": "abc123def456",
  "companyId": "xyz789",
  "kind": "string",
  "subjectKind": "string",
  "subjectId": "xyz789",
  "subjectLabel": "string",
  "relatedKind": "string",
  "relatedId": "xyz789"
}
POST/agentLearning

Create a agent learning

Create a new agent learning.

Body parameters

companyIdstringrequired

References company.id

kindstringrequired
subjectKindstringrequired
subjectIdstringrequired
subjectLabelstringrequired
relatedKindstringrequired
relatedIdstringrequired
relatedLabelstringrequired
taughtAsstringrequired
forgottenAttimestamp
forgottenBystring

References user.id

POST/agentLearning
curl --request POST \
  --url <your-host>/agentLearning \
  --header 'Authorization: Bearer <api-key>' \
  --header 'Content-Type: application/json' \
  --header 'Prefer: return=representation' \
  --data '{"companyId":"xyz789","kind":"string","subjectKind":"string","subjectId":"xyz789","subjectLabel":"string","relatedKind":"string","relatedId":"xyz789","relatedLabel":"string","taughtAs":"string"}'
Response
{
  "id": "abc123def456",
  "companyId": "xyz789",
  "kind": "string",
  "subjectKind": "string",
  "subjectId": "xyz789",
  "subjectLabel": "string",
  "relatedKind": "string",
  "relatedId": "xyz789"
}
PATCH/agentLearning

Update a agent learning

Update an existing agent learning, matched on `id`.

Body parameters

companyIdstringrequired

References company.id

kindstringrequired
subjectKindstringrequired
subjectIdstringrequired
subjectLabelstringrequired
relatedKindstringrequired
relatedIdstringrequired
relatedLabelstringrequired
taughtAsstringrequired
forgottenAttimestamp
forgottenBystring

References user.id

PATCH/agentLearning
curl --request PATCH \
  --url '<your-host>/agentLearning?id=eq.%7Bid%7D' \
  --header 'Authorization: Bearer <api-key>' \
  --header 'Content-Type: application/json' \
  --header 'Prefer: return=representation' \
  --data '{"companyId":"xyz789"}'
Response
{
  "id": "abc123def456",
  "companyId": "xyz789",
  "kind": "string",
  "subjectKind": "string",
  "subjectId": "xyz789",
  "subjectLabel": "string",
  "relatedKind": "string",
  "relatedId": "xyz789"
}
DELETE/agentLearning

Delete a agent learning

Delete a agent learning, matched on `id`. Returns 204 No Content.

Query parameters

idstring

The `id` of the agent learning to delete, e.g. `eq.{id}`.

DELETE/agentLearning
curl --request DELETE \
  --url '<your-host>/agentLearning?id=eq.%7Bid%7D' \
  --header 'Authorization: Bearer <api-key>'
204 No Content