Get Dataset

更新时间: 2026-12-03 10:22:49

Query details of a dataset. Look up by dataset ID or by name; pass at least one.

Prerequisites

You have an Alibaba Cloud Model Studio API key (see the API Key page in the console) and authentication configured. For details, see Knowledge (formerly RAG) API overview and Authentication. Data import endpoints use the same base URL and authentication as other Knowledge (formerly RAG) APIs, with the path prefix /api/v1/connector/dash/.

Endpoint

POST /api/v1/connector/dash/getConnector

Query details of a dataset. Look up by dataset ID or by name; pass at least one.

NoteAt least one of connectorId or connectorName must be provided. If both are given, connectorId takes precedence.

Request body

FieldRequiredTypeDescription
connectorIdNostringDataset ID. Pass at least one of connectorId or connectorName.
connectorNameNostringDataset name. Pass at least one of connectorId or connectorName. At most 20 characters.

Request example

curl -X POST "$BASE_URL/api/v1/connector/dash/getConnector" \
  -H "Authorization: Bearer $BAILIAN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "connectorId": "conn_abc123"
  }'

BASE_URL is https://{workspace_id}.cn-beijing.maas.aliyuncs.com ({workspace_id} is the Workspace ID), and BAILIAN_API_KEY is your Alibaba Cloud Model Studio API key.

Response example

Returns 200 on success.

{
  "code": "Success",
  "message": "",
  "messageUnmodified": false,
  "requestId": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
  "data": {
    "connectorId": "conn_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx_xxxxxx",
"connectorName": "Default file dataset",
    "connectorType": "FILE",
    "connectorSubType": "UNSTRUCTURED",
    "description": "Default file type dataset",
    "gmtCreate": "2026-03-16 16:13:26",
    "gmtModified": "2026-03-16 16:13:26",
    "aclEnabled": false
  },
  "status": 200
}

Response fields

FieldTypeDescription
codestringResponse code. Success on success.
messagestringError or informational message; an empty string on success.
requestIdstringUnique request identifier. Include this ID when reporting an issue.
dataobjectDataset details. Sub-fields: connectorId (string, dataset ID), connectorType (string, dataset type. Only FILE is supported), connectorName (string, dataset name), description (string, dataset description), connectorSubType (string, dataset subtype, such as UNSTRUCTURED), gmtCreate (string, creation time in YYYY-MM-DD HH:mm:ss format), gmtModified (string, last modified time in YYYY-MM-DD HH:mm:ss format), aclEnabled (boolean, current ACL switch of the file dataset. true means enabled; false means disabled).
statusintegerBusiness 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.

Error codes

HTTP status codeError code codeDescription
400InvalidParameterInvalid request parameters. Example message: Required parameter missing or invalid.
401InvalidApiKeyAuthentication failed; the API key is invalid or missing. Example message: Invalid API-key provided.

On business failures the HTTP status code remains 200. Check status and code in the response body to determine the result.

上一篇: Create Dataset 下一篇: Update Dataset ACL
阿里云首页 大模型服务平台百炼 相关技术圈