POST
/
{resourceSlug}
/
forms
/
datasource
/
add
curl --request POST \
  --url https://app.agentcloud.dev/{resourceSlug}/forms/datasource/add \
  --header 'Content-Type: datasource.json' \
  --data '{
  "_id": "<string>",
  "orgId": "<string>",
  "teamId": "<string>",
  "name": "<string>",
  "description": "<string>",
  "originalName": "<string>",
  "filename": "<string>",
  "sourceType": "<string>",
  "sourceId": "<string>",
  "destinationId": "<string>",
  "workspaceId": "<string>",
  "connectionId": "<string>",
  "recordCount": {
    "total": 123,
    "success": 123,
    "failure": 123
  },
  "connectionSettings": {
    "prefix": "<string>",
    "name": "<string>",
    "sourceId": "<string>",
    "destinationId": "<string>",
    "status": "<string>",
    "configurations": {},
    "schedule": {
      "scheduleType": "cron",
      "cronExpression": "<string>"
    },
    "dataResidency": "<string>",
    "namespaceDefinition": "<string>",
    "namespaceFormat": "<string>",
    "nonBreakingSchemaUpdatesBehavior": "<string>"
  },
  "createdDate": "2023-11-07T05:31:56Z",
  "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>"
}'
{
  "_id": "<string>",
  "redirect": "<string>"
}

Path Parameters

resourceSlug
string
required

The resourceSlug is a url parameter of the teamId associated with the user. Anywhere the resourceSlug is used can be interpreted as a teamId

Body

datasource.json

Datasource object that was created when testDatasourceApi is run, must include datasourceId.

Represents a data source configuration within the system, including connection details, status, chunking configurations, and record counts.

Response

302
dynamicResponse

Successful operation, redirect to '/{resourceSlug}/datasources'. Returns added toolId in return body

Server response after successsfully adding a new object