使用 Forge Design Automation API 实现自动化工作流程
Forge Design Automation API 是一个面向开发人员的 API,可以帮助您实现自动化工作流程,包括自动生成、检查、转换和发布设计文件等操作。
以下是使用 Forge Design Automation API 进行自动化操作的代码示例:
POST https://developer.api.autodesk.com/da/us-east/v3/workitems
{
"activityId": "myActivityId",
"arguments": {
"myInputFile": { "url": "https://myinputfile.com", "verb": "get" },
"myOutputFile": { "url": "https://myoutputfile.com", "verb": "put" }
},
"miscellaneous": {
"mykey": "myvalue"
},
"id": "myWorkItemId",
"status": "Pending"
}
GET https://developer.api.autodesk.com/da/us-east/v3/workitems/{workItemId}
{
"status": "Succeeded",
"arguments": {
"myOutputFile": {
"url": "https://myoutputfile.com",
"verb": "put",
"headers": {
"Content-Length": "1234",
"Content-Type": "application/octet-stream"
}
}
},
"miscellaneous": {
"mykey": "myvalue"
}
}
GET https://myoutputfile.com