Skip to content

Data Source Administration

Data sources contain the documents used by the LLM App.

If the integrator wishes to interact with Wikit Semantics sources, the API specifically offers the following endpoints:

Creating a data source

POST /datastore/v1/data-sources

llm_connector_ids: to be requested from your Wikit contact

bash
curl -X POST "<https://apis.wikit.ai/datastore/v1/data-sources>" \
  -H "Authorization: Bearer $SEMANTICS_TOKEN" \
  -H "X-Wikit-Organization-Id: $SEMANTICS_ORG_ID" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "My data source",
    "llm_connector_ids": ["67c5646e05d2ed84ac20495d"]
  }'

Retrieving a data source

GET /datastore/v1/data-sources/{data_source_id}

bash
curl -X GET "<https://apis.wikit.ai/datastore/v1/data-sources/$SEMANTICS_DATASOURCE_ID>" \\
  -H "Authorization: Bearer $SEMANTICS_TOKEN" \
  -H "X-Wikit-Organization-Id: $SEMANTICS_ORG_ID"

List of data sources

GET /datastore/v1/data-sources

bash
curl -X GET "<https://apis.wikit.ai/datastore/v1/data-sources>" \
  -H "Authorization: Bearer $SEMANTICS_TOKEN" \
  -H "X-Wikit-Organization-Id: $SEMANTICS_ORG_ID"

Updating a data source

PUT /datastore/v1/data-sources/{data_source_id}

bash
curl -X PUT "<https://apis.wikit.ai/datastore/v1/data-sources/$SEMANTICS_DATASOURCE_ID>" \\
  -H "Authorization: Bearer $SEMANTICS_TOKEN" \
  -H "X-Wikit-Organization-Id: $SEMANTICS_ORG_ID" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "New data source name"
  }'

Deleting a data source

DELETE /datastore/v1/data-sources/{data_source_id}

bash
curl -X DELETE "<https://apis.wikit.ai/datastore/v1/data-sources/$SEMANTICS_DATASOURCE_ID>" \
  -H "Authorization: Bearer $SEMANTICS_TOKEN" \
  -H "X-Wikit-Organization-Id: $SEMANTICS_ORG_ID"

Retrieving enabled data sources for an LLM app

GET /semantics/apps/{llm_app_id}/data-sources

bash
	curl -X GET "https://apis.wikit.ai/semantics/apps/{llm_app_id}/data-sources" \
  -H "Authorization: Bearer $SEMANTICS_TOKEN"
  -H "X-Wikit-Organization-Id: $SEMANTICS_ORG_ID"