POST
/
trpc
/
datasets.listByUser
List Datasets by User
curl --request POST \
  --url https://api.kontext.dev/trpc/datasets.listByUser \
  --header 'x-api-key: <x-api-key>'

Overview

  • Returns datasetIds for which this user has dataset items under your developer
  • Only user-anchored datasets (uploaded with X-As-User) are included. Population datasets are not returned

Authentication

x-api-key
string
required
Your API key

Request (tRPC HTTP)

Body (JSON): { "input": { userId } }
  • userId (string, required)

Response (tRPC envelope)

200 OK
{
  "result": {
    "data": {
      "datasetIds": ["ds_1", "ds_2", "..."]
    }
  }
}
Note: SDK and tRPC clients return the inner object directly (no wrapper).

Errors

  • 401 UNAUTHORIZED — invalid API key
  • 403 FORBIDDEN — user or datasets don’t belong to your developer
  • 500 INTERNAL_SERVER_ERROR

Examples

curl -X POST https://api.kontext.dev/trpc/datasets.listByUser \
  -H "x-api-key: ktext_abc123..." \
  -H "content-type: application/json" \
  -d '{
    "input": {
      "userId": "user_abc123"
    }
  }'

Notes

  • Use this to enumerate user-anchored datasets before calling Facts-first QA (datasets.query) or Vector Search (datasets.search)