Skip to content
API referenceReplace a context source's test cases

Replace a context source's test cases

PUT/v1/context-sources/{slug}/test-cases

Replace a context source's test cases.

Sets the source's whole test set: up to 200 questions, each with 1 to 8 section ids (n12, from the outline) that answer it. Questions are stored encrypted with the organization's key. An empty list removes them.

Requires an organization admin key, or a workspace admin key for the source's workspace, and a plan that includes context sources (402 otherwise). Returns 400 for an empty or too long question or an id that is not a section of the source, 404 when the source does not exist.

Authorization

  • AuthorizationBearer va_

    A platform API key (va_...), created under Settings > API keys. Scoped to an organization or one workspace, with an admin or member role. Used by the management API.

Path parameters

  • slugstringrequired

    The source's identifier (ctx-...).

Query parameters

  • organizationstringrequired

    The organization's identifier (slug).

Request body application/json

The test cases.

  • casesobject[]required

    The test cases, at most 200. An empty list removes them all.

    At most 200 items

    Child attributes
    • questionstringrequired

      A question your users would ask. At most 4,000 characters.

      At least 0 characters · At most 4000 characters

    • expected_sectionsstring[]required

      Ids of the sections (n12, from the outline) that answer the question, 1 to 8.

      At most 8 items

    • idstring

      The case's id. Read-only: ignored when you send test cases.

    • created_atstring<date-time>

      When the case was saved. Read-only.

Responses

200application/json
  • casesobject[]

    The test cases, in the order they were sent.

    Child attributes
    • questionstringrequired

      A question your users would ask. At most 4,000 characters.

      At least 0 characters · At most 4000 characters

    • expected_sectionsstring[]required

      Ids of the sections (n12, from the outline) that answer the question, 1 to 8.

      At most 8 items

    • idstring

      The case's id. Read-only: ignored when you send test cases.

    • created_atstring<date-time>

      When the case was saved. Read-only.

NVIDIA Inception Program member

VectorAxis is built by GK Labs, a member of NVIDIA Inception.