Ga naar inhoud

Prudai Developer API: docs

De operaties van dit onderdeel (Docs).

Basis-URL https://api.prudai.com/v1. Inloggen staat in Inloggen, scopes in Scopes en rechten, fouten in Fouten. Overzicht.

MethodePadWat het doetStand
GET/v1/docs/pages/{slug}Read one documentation pageOp productie
GET/v1/docs/searchSearch the product documentationOp productie

Read one documentation page

GET /v1/docs/pages/{slug}

The Markdown of one documentation page (at most 30,000 characters; truncated and notIncluded say when it was cut). A page outside the requested visibility is a 404, exactly like a page that does not exist.

  • Stand: op productie.
  • Scope: geen aparte scope; inloggen met je sleutel of token is wel nodig.
  • Goedkeuring: none, geen extra stap.

Parameters

  • slug path · string verplicht
    Page slug without language prefix, for example chat, files or irma/beheer. max. lengte 300
  • language query · string
    Documentation language. Een van: nl, en · standaard: "nl"
  • visibility query · string
    Highest visibility to include: public (default), gated (also the pages behind the docs single sign-on; any valid credential) or staff (Prudai staff organisation only, otherwise 403 membership_required). Een van: public, gated, staff · standaard: "public"

Antwoorden

StatusBetekenis
200The page in the task envelope.
401Missing, malformed, unknown, expired or revoked key, or a key used against the wrong environment.
403Authenticated, but not allowed (missing scope, product not on the key or organisation, organisation suspended, Developer API switched off for the organisation, IP not on the allowlist, depth not permitted, licence does not permit redistribution).
404Unknown model, source or document.
422Well-formed request with invalid values (for example an unknown reasoning_effort, empty messages, or an Idempotency-Key reused with a different body).
429Rate limit, concurrency limit, Ultra daily quota or fair-use limit of the free sources operations exceeded.
500Unexpected error on Prudai’s side. Not charged, except work that completed before the failure (reported in details.charged_credits).

Velden in data (200)

  • title string
  • slug string
  • language string
    Een van: nl, en
  • url string (uri)
  • markdown string
  • headings array<string>
  • characters integer
    min. 0
  • truncated boolean
  • visibility string
    Een van: public, gated, staff
curl
curl -s "https://api.prudai.com/v1/docs/pages/<slug>" \
-H "Authorization: Bearer $PRUDAI_TOKEN"
CLI (binnenkort)
prudai leo docs-pages get
Antwoord 200
{
"title": "string",
"slug": "string",
"language": "nl",
"url": "https://voorbeeld.nl",
"markdown": "string",
"headings": [
"string"
],
"characters": 1,
"truncated": false,
"visibility": "public"
}

Search the product documentation

GET /v1/docs/search

Ranked documentation pages for a question, each with the best matching section (section, section_url with its anchor) and a snippet. The index is rebuilt with every documentation deploy, not per request; provenance.index_build_id names the build. visibility=public (default) leaves out the pages behind the docs single sign-on and says so in notIncluded.

  • Stand: op productie.
  • Scope: geen aparte scope; inloggen met je sleutel of token is wel nodig.
  • Goedkeuring: none, geen extra stap.

Parameters

  • q query · string verplicht
    The question or keywords, in Dutch or English. min. lengte 3 · max. lengte 500
  • language query · string
    Documentation language. Een van: nl, en · standaard: "nl"
  • limit query · integer
    standaard: 5 · min. 1 · max. 10
  • visibility query · string
    Highest visibility to include: public (default), gated (also the pages behind the docs single sign-on; any valid credential) or staff (Prudai staff organisation only, otherwise 403 membership_required). Een van: public, gated, staff · standaard: "public"

Antwoorden

StatusBetekenis
200Matching pages in the task envelope, best first.
400Malformed request or unsupported parameter (for example client-sent tools).
401Missing, malformed, unknown, expired or revoked key, or a key used against the wrong environment.
403Authenticated, but not allowed (missing scope, product not on the key or organisation, organisation suspended, Developer API switched off for the organisation, IP not on the allowlist, depth not permitted, licence does not permit redistribution).
422Well-formed request with invalid values (for example an unknown reasoning_effort, empty messages, or an Idempotency-Key reused with a different body).
429Rate limit, concurrency limit, Ultra daily quota or fair-use limit of the free sources operations exceeded.
500Unexpected error on Prudai’s side. Not charged, except work that completed before the failure (reported in details.charged_credits).

Velden in data (200)

  • query string
  • language string
    Een van: nl, en
  • matches array<object>
  • matches[].title string
  • matches[].slug string
  • matches[].url string (uri)
  • matches[].section string
    Heading path of the best matching section (“Heading › Subheading”); null for the introduction. kan null zijn
  • matches[].section_url string (uri)
    Page URL with the anchor of that section.
  • matches[].snippet string
  • matches[].score integer
    Relative rank score within this response; not comparable across requests. min. 0
curl
curl -s "https://api.prudai.com/v1/docs/search?q=%3Cq%3E" \
-H "Authorization: Bearer $PRUDAI_TOKEN"
CLI (binnenkort)
prudai leo docs search
Antwoord 200
{
"query": "string",
"language": "nl",
"matches": [
{
"title": "string",
"slug": "string",
"url": "https://voorbeeld.nl",
"section": "string",
"section_url": "https://voorbeeld.nl",
"snippet": "string",
"score": 1
}
]
}