v1

latestOpenAPI 3.0.02026-08-04184091.2 KB
knowledgebases

Update a knowledgebase datasource

Updates a specified datasource.

put/api/v1/knowledgebases/{id}/datasources/{datasourceId}

Path parameters

datasourceIdstring uuid required
Example:f256b3e4-03e0-4f74-ae46-a4d43882ee5d

The id of the datasource to update.

idstring uuid required
Example:f256b3e4-03e0-4f74-ae46-a4d43882ee5d

The id of a knowledgebase.

Request body

idstring uuid required

Unique identifier of the datasource

namestring

Name of the datasource

type'file' | 'web' | 'database' required
spaceIdstring uid

The unique identifier of the space containing the datasource

sourceCountinteger

The number of times that a datasource was referenced as a source in an answer

Example request

{
  "id": "f256b3e4-03e0-4f74-ae46-a4d43882ee5d",
  "spaceId": "507f191e810c19729de860ea",
  "chunking": {
    "size": 1024,
    "type": "recursive",
    "overlap": 20,
    "separators": [
      "\n",
      ".",
      " "
    ]
  },
  "syncInfo": {
    "startedAt": "2021-10-02T14:20:50.52Z",
    "lastSyncId": "f256b3e4-03e0-4f74-ae46-a4d43882ee5d",
    "completedAt": "2021-10-02T14:20:50.52Z"
  },
  "fileConfig": {
    "scope": {
      "depth": 1,
      "maxSize": 1000000,
      "extensions": [
        "pdf"
      ],
      "maxFilesTotal": 50,
      "modifiedAfter": "2021-10-02T14:20:50.52Z",
      "maxFilesPerFolder": 100
    },
    "folder": "folderA/folderB",
    "userId": "507f191e810c19729de860ea",
    "connectionId": "f256b3e4-03e0-4f74-ae46-a4d43882ee5d",
    "crawlPatterns": [
      {
        "type": "include",
        "pattern": "(.*)example(.*)"
      }
    ]
  },
  "sourceCount": 10
}

Response

Successfully updated the datasource.

idstring uuid required

Unique identifier of the datasource

namestring

Name of the datasource

type'file' | 'web' | 'database' required
spaceIdstring uid

The unique identifier of the space containing the datasource

sourceCountinteger

The number of times that a datasource was referenced as a source in an answer

Example response

{
  "id": "f256b3e4-03e0-4f74-ae46-a4d43882ee5d",
  "spaceId": "507f191e810c19729de860ea",
  "chunking": {
    "size": 1024,
    "type": "recursive",
    "overlap": 20,
    "separators": [
      "\n",
      ".",
      " "
    ]
  },
  "syncInfo": {
    "startedAt": "2021-10-02T14:20:50.52Z",
    "lastSyncId": "f256b3e4-03e0-4f74-ae46-a4d43882ee5d",
    "completedAt": "2021-10-02T14:20:50.52Z"
  },
  "fileConfig": {
    "scope": {
      "depth": 1,
      "maxSize": 1000000,
      "extensions": [
        "pdf"
      ],
      "maxFilesTotal": 50,
      "modifiedAfter": "2021-10-02T14:20:50.52Z",
      "maxFilesPerFolder": 100
    },
    "folder": "folderA/folderB",
    "userId": "507f191e810c19729de860ea",
    "connectionId": "f256b3e4-03e0-4f74-ae46-a4d43882ee5d",
    "crawlPatterns": [
      {
        "type": "include",
        "pattern": "(.*)example(.*)"
      }
    ]
  },
  "sourceCount": 10
}