Skip to main content
GET
/
{resourceSlug}
/
datasource
/
{datasourceId}
.json
Retrieve A Datasource
curl --request GET \
  --url https://app.agentcloud.dev/{resourceSlug}/datasource/{datasourceId}.json \
  --header 'Authorization: Bearer <token>'
{
  "datasource": {
    "name": "<string>",
    "originalName": "<string>",
    "sourceType": "<string>",
    "sourceId": "<string>",
    "destinationId": "<string>",
    "workspaceId": "<string>",
    "connectionId": "<string>",
    "createdDate": "2023-11-07T05:31:56Z",
    "_id": "<string>",
    "orgId": "<string>",
    "teamId": "<string>",
    "description": "<string>",
    "filename": "<string>",
    "recordCount": {
      "total": 123,
      "success": 123,
      "failure": 123
    },
    "connectionSettings": {
      "prefix": "<string>",
      "name": "<string>",
      "sourceId": "<string>",
      "destinationId": "<string>",
      "status": "<string>",
      "configurations": {},
      "nonBreakingSchemaUpdatesBehavior": "<string>",
      "schedule": {
        "scheduleType": "cron",
        "cronExpression": "<string>"
      },
      "dataResidency": "<string>",
      "namespaceDefinition": "<string>",
      "namespaceFormat": "<string>"
    },
    "lastSyncedDate": "2023-11-07T05:31:56Z",
    "status": "draft",
    "discoveredSchema": {},
    "chunkingConfig": {
      "partitioning": "auto",
      "strategy": "basic",
      "max_characters": 123,
      "new_after_n_chars": 123,
      "overlap": 123,
      "similarity_threshold": 0.5,
      "overlap_all": true
    },
    "embeddingField": "<string>",
    "timeWeightField": "<string>",
    "modelId": "<string>",
    "hidden": true,
    "streamConfig": {},
    "timeUnit": "<string>"
  },
  "models": [
    {
      "_id": "<string>",
      "orgId": "<string>",
      "teamId": "<string>",
      "name": "<string>",
      "model": "<string>",
      "embeddingLength": 123,
      "modelType": "<string>",
      "type": "<string>",
      "config": {
        "model": "<string>",
        "api_key": "<string>",
        "base_url": "<string>",
        "cohere_api_key": "<string>",
        "groq_api_key": "<string>"
      }
    }
  ]
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

resourceSlug
string
required

The resourceSlug is a URL parameter of the teamId associated with the user. Mongodb Object id, unique identifier, length of 24 characters fitting the following regex; [a-f0-9]{24}

datasourceId
string
required

The ID of the datasource to retrieve.

Response

JSON object containing the retrieved datasource and all models associated with the resourceSlug teamId.

datasource
object

JSON object of the datasource retrieved by the operation

models
object[]

An array object of all models the user has access to, this is used to identify the embedding model of the datasource and to have a list of all available embedding models to allow for easy modification of the selected embedding model.