name: dataworks-open-api description: Operate Alibaba Cloud DataWorks through dynamic API discovery and official SDKs (Node.js, Python, Java). Covers data development, workflow operations, data integration, data quality, metadata lineage, workspace management, and more. APIs are discovered at runtime from official docs and OpenAPI metadata — no hardcoded list. source: https://github.com/aliyun/alibabacloud-bigdata-skills homepage: https://github.com/aliyun/alibabacloud-bigdata-skills/tree/main/skills/dataworks/open-api env: - name: ALIBABA_CLOUD_ACCESS_KEY_ID description: Alibaba Cloud Access Key ID (required unless using credentials URI or shared config) required: false - name: ALIBABA_CLOUD_ACCESS_KEY_SECRET description: Alibaba Cloud Access Key Secret (required unless using credentials URI or shared config) required: false - name: ALIBABA_CLOUD_REGION_ID description: Target region (e.g. cn-shanghai, cn-beijing). Optional; skill will prompt if unset. required: false - name: ALIBABA_CLOUD_CREDENTIALS_URI description: HTTP endpoint for dynamic AK/SK/STS token (alternative to explicit AK/SK) required: false
Use Alibaba Cloud OpenAPI (RPC) with official SDKs or OpenAPI Explorer to manage all DataWorks resources. MCP Server is available as an alternative integration.
來源於7w4.net。
If execution fails at any step, escalate to the next level:
references/cookbook.md first. It contains verified API patterns, pitfalls, error recovery, the full end-to-end lifecycle (Create → Submit → Deploy → Run → Monitor), and reusable code snippets. Most common issues are already documented there.https://help.aliyun.com/zh/dataworks/developer-reference/api-dataworks-public-2024-05-18-dir
Browse the category list, find the matching API name, and navigate to its detail page (URL pattern: https://help.aliyun.com/zh/dataworks/developer-reference/api-dataworks-public-2024-05-18-{apinameincamelcase}) for parameter details, error codes, and usage examples.
For example, if CreateNode fails, find it under "資料開發(新版)" in the directory, then read its detail page: https://help.aliyun.com/zh/dataworks/developer-reference/api-dataworks-public-2024-05-18-createnodeSDK API docs — check the typed SDK reference for correct method signatures and request classes.
Java: https://aliyunsdk-pages.alicdn.com/apidocs/{PRODUCT_CODE}/{API_VERSION}/java-async-tea/8.0.3/index.html
Node.js / Python: see references/sources.md
GitHub source code — read the Java SDK source for model/request class definitions: https://github.com/aliyun/alibabacloud-java-sdk/tree/master/dataworks-public-20240518 (browse src/main/java/com/aliyun/dataworks_public20240518/ for request/response models).
references/mcp_server.md).https://dataworks.data.aliyun.com/${ALIBABA_CLOUD_REGION_ID}/#/index) and inspect the UI behavior, network requests, or page content for clues.ALIBABA_CLOUD_ACCESS_KEY_ID / ALIBABA_CLOUD_ACCESS_KEY_SECRET / ALIBABA_CLOUD_REGION_IDALIBABA_CLOUD_CREDENTIALS_URI (e.g. http://localhost:7002/api/v1/credentials/0). The SDK credentials provider automatically fetches and refreshes AK/SK/STS tokens from this HTTP endpoint.~/.alibabacloud/credentialsRegion policy: ALIBABA_CLOUD_REGION_ID is an optional default. If unset, decide the most reasonable region for the task; if unclear, ask the user.
Constants (use these values throughout):
dataworks-public2024-05-18Do NOT rely on a hardcoded API list. Always discover APIs dynamically. Methods are listed in priority order — try them top-down:
Run the discovery script to curl the official documentation page and extract the complete API overview:
python scripts/fetch_api_overview.py
This fetches https://help.aliyun.com/zh/dataworks/developer-reference/api-{PRODUCT_CODE}-{API_VERSION}-overview, extracts the API list from window.__ICE_PAGE_PROPS__.docDetailData.storeData.data.content, and parses the HTML tables into a grouped API overview.
Fetch raw API schemas and parameter definitions:
python scripts/list_openapi_meta_apis.py
This calls https://next.api.aliyun.com/meta/v1/products/{PRODUCT_CODE}/versions/{API_VERSION}/api-docs.json and outputs the full API docs JSON and a summary list.
To get the schema of a single API (replace {ApiName} with a name from the list above, e.g. ListProjects):
https://next.api.aliyun.com/meta/v1/products/{PRODUCT_CODE}/versions/{API_VERSION}/apis/{ApiName}/api.json
If the MCP Server is running, use the MCP tools/list capability, or fetch https://dataworks.data.aliyun.com/pop-mcp-tools directly for the tool catalog JSON. Includes some APIs not in Method 2 (e.g. data service, permission approval).
Recommend using the latest SDK version. The DataWorks SDK is updated frequently with new APIs, bug fixes, and model changes. Check the latest version from the package registry before installing:
https://www.npmjs.com/package/@alicloud/dataworks-public20240518https://pypi.org/project/alibabacloud-dataworks-public20240518/https://central.sonatype.com/artifact/com.aliyun/alibabacloud-dataworks_public20240518Prefer the official Alibaba Cloud SDK. Two styles are supported:
Use @alicloud/openapi-client to call any DataWorks API without importing product-specific SDK classes. This is the approach used by the MCP Server source code (src/tools/callTool.ts).
npm install @alicloud/openapi-client @alicloud/openapi-util @alicloud/tea-util @alicloud/credentials
import OpenApi from "@alicloud/openapi-client";
import Util from "@alicloud/tea-util";
// 1. Create client
const config = new OpenApi.Config({
accessKeyId: process.env.ALIBABA_CLOUD_ACCESS_KEY_ID,
accessKeySecret: process.env.ALIBABA_CLOUD_ACCESS_KEY_SECRET,
endpoint: `dataworks.${
process.env.ALIBABA_CLOUD_REGION_ID || "cn-shanghai"
}.aliyuncs.com`,
});
const client = new OpenApi.default(config);
// 2. Build request params (RPC style)
const params = new OpenApi.Params({
style: "RPC",
action: "ListProjects", // API name
version: "{API_VERSION}", // see Constants above
protocol: "HTTPS",
method: "POST", // GET or POST per API spec
authType: "AK",
pathname: "/",
bodyType: "json",
});
// 3. Build query/body from input
const query = { PageNumber: 1, PageSize: 10 };
const request = new OpenApi.OpenApiRequest({ query });
const runtime = new Util.RuntimeOptions({});
// 4. Call
const res = await client.callApi(params, request, runtime);
console.log(res.body);
Key rules from src/tools/callTool.ts:
style: 'RPC' when API has no path; 'ROA' when it has a path.method: per API spec (GET / POST / PUT / DELETE).in: 'query' go to query; in: 'body' / in: 'formData' go to body.GET / DELETE requests, body must be null (otherwise signature fails).bodyType: 'string' to avoid precision loss on large numbers.npm install @alicloud/dataworks-public20240518
import DataWorks from "@alicloud/dataworks-public20240518";
import * as DataWorksClasses from "@alicloud/dataworks-public20240518";
import OpenApi from "@alicloud/openapi-client";
const config = new OpenApi.Config({
accessKeyId: process.env.ALIBABA_CLOUD_ACCESS_KEY_ID,
accessKeySecret: process.env.ALIBABA_CLOUD_ACCESS_KEY_SECRET,
endpoint: `dataworks.cn-shanghai.aliyuncs.com`,
});
const client = new DataWorks.default(config);
// Each API has a typed Request class and a method
const request = new DataWorksClasses.ListProjectsRequest({
pageNumber: 1,
pageSize: 10,
});
const runtime = new Util.RuntimeOptions({});
const resp = await client.listProjectsWithOptions(request, runtime);
API name → SDK method: ListProjects → client.listProjectsWithOptions(request, runtime).
pip install alibabacloud_dataworks_public20240518
import os
from alibabacloud_dataworks_public20240518.client import Client
from alibabacloud_dataworks_public20240518 import models
from alibabacloud_tea_openapi.models import Config
config = Config(
access_key_id=os.environ['ALIBABA_CLOUD_ACCESS_KEY_ID'],
access_key_secret=os.environ['ALIBABA_CLOUD_ACCESS_KEY_SECRET'],
endpoint=f"dataworks.{os.environ.get('ALIBABA_CLOUD_REGION_ID', 'cn-shanghai')}.aliyuncs.com",
)
client = Client(config)
request = models.ListProjectsRequest(page_number=1, page_size=10)
resp = client.list_projects(request)
print(resp.body)
<dependency>
<groupId>com.aliyun</groupId>
<artifactId>alibabacloud-dataworks_public20240518</artifactId>
<version>8.0.3</version>
</dependency>
import com.aliyun.dataworks_public20240518.Client;
import com.aliyun.dataworks_public20240518.models.*;
import com.aliyun.teaopenapi.models.Config;
Config config = new Config()
.setAccessKeyId(System.getenv("ALIBABA_CLOUD_ACCESS_KEY_ID"))
.setAccessKeySecret(System.getenv("ALIBABA_CLOUD_ACCESS_KEY_SECRET"))
.setEndpoint("dataworks." + System.getenv("ALIBABA_CLOUD_REGION_ID") + ".aliyuncs.com");
Client client = new Client(config);
ListProjectsRequest request = new ListProjectsRequest()
.setPageNumber(1L)
.setPageSize(10L);
ListProjectsResponse resp = client.listProjects(request);
System.out.println(resp.getBody());
Java SDK API docs: https://aliyunsdk-pages.alicdn.com/apidocs/{PRODUCT_CODE}/{API_VERSION}/java-async-tea/8.0.3/index.html
Only use MCP when SDK calls keep failing after consulting docs, metadata, and GitHub source:
npm install -g alibabacloud-dataworks-mcp-server
See references/mcp_server.md for full configuration.
| Category | Description | Example APIs |
|---|---|---|
| 認證檔案管理 | Certificate management | Import/Get/List/DeleteCertificate |
| 空間管理 | Workspace, roles, members | *Project, *ProjectMember, *ProjectRole |
| 資料來源 | Data source CRUD and connectivity test | *DataSource, *DataSourceSharedRule |
| 計算資源 | Compute resource management | *ComputeResource |
| 資源組管理 | Resource groups, routes, networks | *ResourceGroup, *Route, *Network |
| 資料開發(新版) | Nodes, workflows, resources, functions, pipelines | *Node, *WorkflowDefinition, *Resource, *Function, *PipelineRun |
| 資料整合 | DI sync jobs and alarm rules | *DIJob, *DIAlarmRule |
| 資料地圖 | Catalogs, databases, tables, columns, lineage, datasets, meta collections | *Catalog, *Table, *Column, *Lineage*, *Dataset*, *MetaCollection |
| 運維中心 | Alerts, tasks, task instances, workflows, workflow instances | *AlertRule, *Task, *TaskInstance*, *Workflow, *WorkflowInstance* |
| 資料質量 | Quality templates, scans, alert rules, scan runs | *DataQualityTemplate, *DataQualityScan, *DataQualityAlertRule |
| 安全中心 | Identity credentials | CreateIdentifyCredential |
| 標籤管理 | Data asset tags | *DataAssetTag, TagDataAssets, UnTagDataAssets |
| 開放平臺 | Async job status | GetJobStatus |
Use dynamic discovery (above) to get the full list and parameter schemas. Common naming patterns:
List* / Get* / Describe* APIs.Create* / Update* / Import* APIs.Delete* / Remove* APIs.Start* / Stop* / Suspend* / Resume* / Rerun* APIs.Before executing delete, stop, or suspend operations, always summarize the affected resources and confirm with the user.
DataWorks APIs use millisecond timestamps. Convert between human-readable dates and timestamps as needed.
cn-shanghai, cn-beijing, cn-hangzhou, cn-shenzhen)references/cookbook.md — FlowSpec structure for CreateNode, submit-and-deploy flow, data quality rules, bizdate format, response parsing, and FAQ from real-world usage.references/mcp_server.mdreferences/sources.md這是一款功能完善、文件詳盡的阿里雲 DataWorks 操作助手。它提供了通俗的入門指引、多語言程式碼示例和常見問題應對方案,AI 能較為可靠地幫你完成資料開發、任務排程、資料質量檢查等操作。唯一的侷限是部分高階場景的示例不夠充分,需要藉助外部文件補充。總體上是一款值得信賴的質量較高的 Skill。