Skip to main content

Create Connector

Create a new Data Connector that manages where imported files come from.

POST
/api/v1/connector/dash/addConnector
cURL
curl -X POST "https://{workspaceId}.cn-beijing.maas.aliyuncs.com/api/v1/connector/dash/addConnector" \
  -H "Authorization: Bearer $DASHSCOPE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "connectorType": "FILE",
    "connectorName": "Product Docs Connector",
    "description": "File connector for importing product documentation",
    "fileConnectorConfig": {
      "storeType": "PLATFORM"
    }
  }'
{
  "code": "Success",
  "status_code": 200,
  "data": {
    "connectorId": "conn_abc123"
  },
  "requestId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}
Only FILE is currently supported for connectorType. When storeType is CUSTOM, you must also pass regionId and bucketName.

Authorizations

string
header
required

DashScope API Key, obtained from the API Key page in the console.

Body

application/json
enum<string>
required

Connector type. Only FILE is supported.

FILE
string
required

Connector name.

length: 1–20
string
required

Connector description.

length: 1–200
object
required

File connector configuration.

Response

200-application/json
string

Response code. Success on success.

string

Error or informational message; an empty string on success.

string

Unique request identifier. Include this ID when reporting an issue.

object
integer

Business status code. 200 on success, 400 for failures such as invalid parameters. Note that the HTTP status code remains 200 even on failure, so rely on this field and code to determine the result.