工艺建模,获取工艺模型树形结构

路径 /industry/modelling/technics/tree/query
版本号 1.0.2
协议 HTTPS
请求方法 POST
是否需要用户身份鉴权
超时时间 3000

请求参数

名称 类型 是否必选 示例值 描述
code String {"code":"code123"} 指定工艺编码
id Long {"id":123} 指定工艺路径id(code和id二选一,同时存在id优先)
pageid Int {"pageid":1} 指定目标页码
pageSize Int {"pageSize":1500} 指定每页行数
search String {"search":“搜索name”} 按找id或者name搜索
appId String 应用id
employeeId String 用户id,需要做用户级别鉴权时需要传入此参数
corpId String 企业标识,每个企业拥有唯一的CorpID,比如钉钉corpID、LH里面的appId,用参数source来区分参数含义
userId String 员工在当前企业内的唯一标识,比如钉钉userId或者IoT的employeeId
source String 参数来源,枚举值,钉钉填写DINGDING,多租户saas应用填SAAS,source、corpId、userId配合使用

返回数据

名称 类型 示例值 描述
code Int

响应码, 200: 成功

message String

错误消息

localizedMsg String

本地语言错误消息

data JSON

响应结果

technologies JSON

工艺路径树列表

id Long

工艺路径id

name String

工艺路径名称

code String

工艺路径编码

processes JSON

工序树列表

id Long

工序id

name String

工序名称

code String

工序编码

steps JSON

步骤列表

id Long

步骤id

name String

步骤名称

code String

步骤编码

示例

请求示例

// https://github.com/aliyun/iotx-api-gateway-client
IoTApiClientBuilderParams ioTApiClientBuilderParams = new IoTApiClientBuilderParams();

ioTApiClientBuilderParams.setAppKey("你的<AppKey>");
ioTApiClientBuilderParams.setAppSecret("你的<AppSecret>");

SyncApiClient syncApiClient = new SyncApiClient(ioTApiClientBuilderParams);

IoTApiRequest request = new IoTApiRequest();

// 设置请求ID
String uuid = UUID.randomUUID().toString();
String id = uuid.replace("-", "");
request.setId(id);
// 设置API版本号
request.setApiVer("1.0.2");

// 设置参数
request.putParam("code", "value0");
request.putParam("id", value1");
request.putParam("pageid", value2");
request.putParam("pageSize", value3");
request.putParam("search", value4");
request.putParam("appId", value5");
request.putParam("employeeId", value6");
request.putParam("corpId", value7");
request.putParam("userId", value8");
request.putParam("source", value9");
// 如果需要,设置headers
Map<String, String> headers = new HashMap<String, String>(8);
// headers.put("你的<header", "你的<value>");

// 设置请求参数域名, path, request, isHttps, headers
ApiResponse response = syncApiClient.postBody("api.link.aliyun.com", "/industry/modelling/technics/tree/query", request, true, headers);

System.out.println(
    "response code = " + response.getCode()
        + " response = " + new String(response.getBody(), "UTF-8")
        + " headers = " + response.getHeaders().toString()
);

正常返回示例

JSON 格式

{
  "code": 200,
  "data": {
    "technologies": [
      {
        "processes": [
          {
            "code": "dddd001",
            "name": "工序test1",
            "id": 7454,
            "steps": [
              {
                "code": "code1",
                "name": "加工步骤1",
                "id": 8486
              }
            ]
          }
        ],
        "code": "aa001",
        "name": "工艺路径001",
        "id": 9
      }
    ]
  },
  "id": "ce204422a10d4a149bb016df243d496b"
}

异常返回示例

JSON 格式

{
  "code": 600408,
  "id": "cd15577359804316aacebaa45574678e",
  "localizedMsg": "工艺不存在 traceId 6a0b1fd515548024548817126e",
  "message": "technology does not exist traceId 6a0b1fd515548024548817126e"
}

错误码

HttpCode 错误码 错误信息 描述
500 500 Internal Error Internal Error
503 503 Service Unavailable Service Unavailable
403 403 Request Limited Request Limited
401 401 Empty Signature Empty Signature
400 400 Request Format Error Request Format Error
200 20003 Find Backend Error Find Backend Error
200 20004 Backend Service Error Backend Service Error
200 20055 Backend Service Invalid Request Format Error
200 20056 Hsf Invoke Timeout Hsf Invoke Timeout
200 401 Request Authorized Error Request Authorized Error
200 403 Request Forbidden Request Forbidden
200 500 Server Error Server Error
200 500 server error. 系统错误
200 403 request forbidden. 请求被禁止
200 460 request parameter error. 请求参数错误
200 500 server error. 系统错误
200 460 request parameter error. 请求参数错误
200 460 request forbidden 请求被禁止
200 1009 SQL invoke error SQL 执行出错