API开发文档
ProcessMind API接口参考:端点、认证与开发集成指南。
本指南提供 ProcessMind API 服务调用的示例、最佳实践。无论是获取 data、提交信息,还是自动化 workflow,了解如何与我们 API 交互很重要。
完整接口及请求/响应格式,请参考 API Reference。
更多示例和客户端库见 API Documentation on GitHub。
所有 API 请求统一访问:
https://api.processmind.com 所有 API 请求需在 x-api-key 请求头中携带您的 API key:
x-api-key: your-api-key-here API key 可在 ProcessMind 账户设置中获取。详见 Getting your API Key。
ProcessMind API 让您可以:
以下为 ProcessMind API 常见操作实用示例。
上传文件到 datatable,需先获取 presigned URL:
const presignedUrl = await getPresignedUploadUrl({
apiKey,
tenantId: "tenant-123",
datatableId: "table-456"
});
console.log(presignedUrl); // https://s3.amazonaws.com/…?X-Amz-Signature=… 获取 tenant 下所有 dataset:
const datasets = await getDatasets({
apiKey,
tenantId: "tenant-123"
});
console.log(datasets); 获取您的 tenant 详情:
const tenantInfo = await getTenant({
apiKey,
tenantId: "tenant-123"
});
console.log(tenantInfo); 在您的 tenant 中创建新流程:
const process = await createProcess({
apiKey,
tenantId: "tenant-123",
displayName: "Order to Cash"
});
console.log(process.id); // 后续操作可用该 ID 上传 BPMN 文件定义流程模型:
const fs = require("fs");
const bpmnXml = fs.readFileSync("./my-process.bpmn", "utf8");
await uploadBpmn({
apiKey,
tenantId: "tenant-123",
processId: "process-456",
bpmnXml
}); 将 datatable 关联到流程用于分析:
const mapping = await createProcessMapping({
apiKey,
tenantId: "tenant-123",
processId: "process-456",
dataTableId: "datatable-789",
displayName: "Sales Data 2024",
showByDefault: true
}); 为您的 tenant 添加用户:
const result = await addTenantUser({
apiKey,
tenantId: "tenant-123",
id: "user-456",
email: "colleague@example.com",
isAdminInTenant: false,
isActiveInTenant: true,
sendInvitationEmail: true
}); 向 ProcessMind 上传文件的标准流程为:
getPresignedUploadUrl 获得 presigned URL。以下为 fetch 简化示例:
async function uploadFile({ apiKey, tenantId, datatableId, file }) {
// 步骤1:获取 presigned URL
const uploadUrl = await getPresignedUploadUrl({ apiKey, tenantId, datatableId });
// 步骤2:通过 PUT 上传文件
await fetch(uploadUrl, {
method: "PUT",
headers: {
"Content-Type": file.type
},
body: file
});
} info
以下为不同开发语言的完整可用代码,可直接复制粘贴。
该 Bash 脚本用两个 curl 命令上传文件至 ProcessMind,参数为占位符。
通过预签名 URL 把本地 CSV 文件上传到 ProcessMind。
步骤:
参数:
https://api.processmind.com通过预签名 URL 将本地 CSV 文件上传到远程 API。
步骤:
参数:
info
如有 API 使用问题,欢迎联系技术支持团队或加入开发者社区论坛。