> ## Documentation Index
> Fetch the complete documentation index at: https://docs.prisme.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Run the storage self-test

> End-to-end probe of the storage stack: creates an ephemeral knowledge base (which also provisions its crawler), upserts a test vector, searches it, then deletes the knowledge base. Every step is reported; `ok` is `true` only when all steps succeeded. The probe always answers `200` once authorized, even when steps fail.

Requires a platform administrator session (`platformRole` `superadmin` or `root`); API keys and other users get `403`. The route does not dispatch on the HTTP method; POST is the method the platform UI uses.




## OpenAPI

````yaml /api-reference/storage/swagger.yml post /v1/test
openapi: 3.0.3
info:
  version: 1.0.0
  title: Knowledges API
  description: >
    Public REST API for the Prisme.ai Knowledges (storage) workspace: knowledge
    bases, documents (uploaded files, web pages, remote files, connector
    documents), recurring web-crawl sources, semantic search, access control,
    per-knowledge-base API keys, and skills.


    Resource identifiers use the physical prefixes emitted by the implementation
    (`vs_` knowledge base, `vsf_` document, `seed_` web source, `kb-` API-key
    slug).


    This spec documents the public REST surface only. Internal helpers (private
    automations prefixed with `_`) and admin/GDPR lifecycle operations are not
    part of the public contract, except the platform health probe listed under
    the Admin tag.


    Each knowledge base also exposes a Model Context Protocol endpoint (`POST
    /v1/knowledge_bases/{knowledgeBaseId}/mcp`, JSON-RPC 2.0) giving agents
    filesystem-style read access to its content. It is listed under the MCP tag
    for its URL and auth only; use an MCP client rather than calling it as a
    REST resource.
  contact:
    name: Prisme.ai
    url: https://prisme.ai
servers:
  - url: https://{host}/v2/workspaces/slug:storage/webhooks
    description: Prisme.ai workspace webhooks
    variables:
      host:
        default: api.studio.prisme.ai
        description: API host (override for self-hosted or sandbox)
security:
  - BearerAuth: []
  - WorkspaceApiKeyAuth: []
tags:
  - name: Knowledge Bases
    description: >-
      Create, list, read, update, and delete knowledge bases (vector-backed
      document stores).
  - name: Documents
    description: >-
      Ingest and manage documents (uploaded files, web pages, remote files,
      connector documents) and their indexing.
  - name: Web Sources
    description: >-
      Recurring web crawl seeds that discover and index pages into a knowledge
      base.
  - name: Search
    description: Semantic search over a knowledge base.
  - name: MCP
    description: >-
      Per-knowledge-base Model Context Protocol endpoint for deterministic,
      filesystem-style access to content (kb_search, kb_ls, kb_find, kb_cat,
      kb_grep, kb_head, kb_tail, kb_sed, kb_source_url).
  - name: Access
    description: Per-knowledge-base access bindings (user, group, org, agent principals).
  - name: API Keys
    description: Per-knowledge-base API keys for connector authentication.
  - name: Files
    description: >-
      Files uploaded to the storage workspace, before or after they are attached
      to a knowledge base.
  - name: Stats
    description: Aggregate dashboard statistics.
  - name: Skills
    description: Prompt/instruction registry entries.
  - name: Admin
    description: >-
      Platform health probe called by the AI Governance Infrastructure page.
      Requires elevated permissions, a platform administrator session
      (`platformRole` `superadmin` or `root`).
paths:
  /v1/test:
    post:
      tags:
        - Admin
      summary: Run the storage self-test
      description: >
        End-to-end probe of the storage stack: creates an ephemeral knowledge
        base (which also provisions its crawler), upserts a test vector,
        searches it, then deletes the knowledge base. Every step is reported;
        `ok` is `true` only when all steps succeeded. The probe always answers
        `200` once authorized, even when steps fail.


        Requires a platform administrator session (`platformRole` `superadmin`
        or `root`); API keys and other users get `403`. The route does not
        dispatch on the HTTP method; POST is the method the platform UI uses.
      operationId: runStorageSelfTest
      requestBody:
        required: false
        description: No field is read. The platform UI sends an empty JSON object.
        content:
          application/json:
            schema:
              type: object
              maxProperties: 0
            example: {}
      responses:
        '200':
          description: Self-test report.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SelfTestReport'
              example:
                ok: true
                steps:
                  - name: create_index
                    ok: true
                    response:
                      id: vs_abc123
                  - name: insert_doc
                    ok: true
                  - name: search
                    ok: true
                  - name: cleanup
                    ok: true
                    response:
                      status: deleting
        '403':
          description: The caller is not a platform administrator.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SelfTestReport'
              example:
                ok: false
                steps:
                  - name: forbidden
                    ok: false
                    error:
                      code: FORBIDDEN
                      message: This endpoint is reserved to platform superadmins.
      security:
        - BearerAuth: []
components:
  schemas:
    SelfTestReport:
      type: object
      required:
        - ok
        - steps
      properties:
        ok:
          type: boolean
          description: '`true` when every step succeeded.'
        steps:
          type: array
          items:
            type: object
            required:
              - name
              - ok
            properties:
              name:
                type: string
                enum:
                  - create_index
                  - insert_doc
                  - search
                  - cleanup
                  - forbidden
              ok:
                type: boolean
              error:
                type: object
                description: Error raised by the step.
                additionalProperties: true
              response:
                type: object
                description: >-
                  Raw response of the step (created knowledge base, vector
                  router result, delete acknowledgement).
                additionalProperties: true
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        User session JWT or instance API key (`iak_*`). Send as `Authorization:
        Bearer <token>`.
    WorkspaceApiKeyAuth:
      type: apiKey
      in: header
      name: x-prismeai-api-key
      description: Workspace- or knowledge-base-scoped API key.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.