编辑应用
操作场景
本章节指导用户通过调用API编辑工业数字模型驱动引擎(Industrial Digital Model Engine,简称iDME)的应用。
前提条件
操作步骤
- 获取待编辑的应用ID。
- 接口相关信息
URI格式:GET /v1/{project_id}/apps
详情请参见获取租户下的应用清单。
- 请求示例
GET https://{iDME Endpoint}/v1/{project_id}/apps
{project_id}请从获取项目ID获取。
- 响应示例
{ "result": [ { "id": "44145d41ae294e111111eafd4da32ea8", "project_id": "cf49a20d85294c93b1111111ca9454bc", "mark_for_delete": 0, "create_by": "59779076d1dc********c91c2c54bd7a", "create_time": 1690427901000, "update_by": "59779076d1dc********c91c2c54bd7a", "update_time": 1690427901000, "name_cn": "TestApp", "name_en": "TestApp", "desc_cn": "", "desc_en": "", "database_type": "mysql", "environment": "beta", "owners": [ "user_1", "idme_container1" ] }, { "id": "c787dcd484944ad11111dd18693e4eb2", "project_id": "cf49a20d85294c93b1111111ca9454bc", "mark_for_delete": 0, "create_by": "59779076d1dc********c91c2c54bd7a", "create_time": 1689622165000, "update_by": "59779076d1dc********c91c2c54bd7a", "update_time": 1689622165000, "name_cn": "工业产品问卷调查", "name_en": "Questionnaire_Survey", "desc_cn": "", "desc_en": "", "database_type": "mysql", "environment": "dev", "owners": [ "dme-console" ] } ], "page_num": 1, "page_size": 500, "total_size": 2, "total_pages": 1 }
- 接口相关信息
- 编辑应用。
- 接口相关信息
URI格式:PUT /v1/{project_id}/apps/{app_id}
详情请参见编辑应用。
- 请求示例
PUT https://{iDME Endpoint}/v1/cf49a20d85294c93b1111111ca9454bc/apps/c787dcd484944ad11111dd18693e4eb2
Body:
{ "id": "c787dcd484944ad11111dd18693e4eb2", "desc_cn": "编辑", "desc_en": "", "app_user_list": [ { "id": "285651a4737d4fa0afcafc6b47e6c15f", "name": "developer" } ] }
- 响应示例
{ "id": "c787dcd484944ad11111dd18693e4eb2", "project_id": "cf49a20d85294c93b1111111ca9454bc", "mark_for_delete": 0, "create_by": "59779076d1dc********c91c2c54bd7a", "create_time": 1690427901000, "update_by": "59779076d1dc********c91c2c54bd7a", "update_time": 1691026385000, "name_cn": "工业产品问卷调查", "name_en": "Questionnaire_Survey", "desc_cn": "编辑", "desc_en": "", "database_type": "mysql", "environment": "dev", "versions": null }
请求异常时,错误码请参见错误码。
- 接口相关信息