AI

Get knowledge sources

Changed on

This endpoint returns a paginated list of knowledge sources for a specific AI copilot. Corresponds to liveblocks.getKnowledgeSources.

get/ai/copilots/{copilotId}/knowledge

Request

  • Base URL: https://api.liveblocks.io/v2
  • URL: https://api.liveblocks.io/v2/ai/copilots/{copilotId}/knowledge
  • Auth: none declared

Path parameters

copilotIdstring required

ID of the AI copilot

Example:cp_abc123

Query parameters

limitinteger

A limit on the number of knowledge sources to be returned. The limit can range between 1 and 100, and defaults to 20.

Example:20
startingAfterstring

A cursor used for pagination. Get the value from the nextCursor response of the previous page.

Example:eyJjcmVhdGVkQXQiOjE2NjAwMDA5ODgxMzd9

Response

Success. Returns the list of knowledge sources.

nextCursorstring nullable required

Example response

{
  "nextCursor": null,
  "data": [
    {
      "id": "ks_abc123",
      "type": "ai-knowledge-web-source",
      "createdAt": "2024-06-01T12:00:00.000Z",
      "updatedAt": "2024-06-01T12:00:00.000Z",
      "lastIndexedAt": "2024-06-01T12:00:00.000Z",
      "status": "ready",
      "link": {
        "url": "https://docs.example.com",
        "type": "crawl"
      }
    }
  ]
}

Changes

    • breaking

      for the query request parameter limit, the type changed from number to integer

    • breaking

      response property nextCursor list-of-types was widened by adding types null to media type application/json of response 200

    • breaking

      added to the / response property oneOf list for the response status

    • info

      the response property became required for the status

    • info

      the response property became required for the status

    • info

      added discriminator to / response property for the response status

    • info

      removed subschema #1: WebKnowledgeSource subschema #2: FileKnowledgeSource from the / response property oneOf list for the response status

    • breaking

      added subschema #1: WebKnowledgeSource subschema #2: FileKnowledgeSource to the / response property oneOf list for the response status

    • info

      removed subschema #1 subschema #2 from the / response property oneOf list for the response status