根据id获取单个关键字信息
功能介绍
根据id获取单个关键字信息
调用方法
请参见如何调用API。
URI
GET /v4/{project_id}/basic-aw/{aw_id}
| 
        参数  | 
      
        是否必选  | 
      
        参数类型  | 
      
        描述  | 
     
|---|---|---|---|
| 
        project_id  | 
      
        是  | 
      
        String  | 
      
        参数解释 项目UUID,项目唯一标识,固定长度32位字符(字母和数字)。获取方式请参见获取项目唯一标识。 约束限制 不涉及 取值范围 32个字符组成的字符串 默认取值 不涉及  | 
     
| 
        aw_id  | 
      
        是  | 
      
        String  | 
      
        关键字唯一标识  | 
     
| 
        参数  | 
      
        是否必选  | 
      
        参数类型  | 
      
        描述  | 
     
|---|---|---|---|
| 
        is_api  | 
      
        否  | 
      
        Boolean  | 
      
        是否获取APIDesigner的接口信息  | 
     
请求参数
| 
        参数  | 
      
        是否必选  | 
      
        参数类型  | 
      
        描述  | 
     
|---|---|---|---|
| 
        X-Auth-Token  | 
      
        是  | 
      
        String  | 
      
        参数解释: 用户Token。 通过调用IAM服务获取用户Token接口获取(响应消息头中X-Subject-Token的值)。 约束限制: 必传。 取值范围: 字符串长度不少于1,不超过10万。 默认取值: 不涉及。  | 
     
响应参数
状态码:200
| 
        参数  | 
      
        参数类型  | 
      
        描述  | 
     
|---|---|---|
| 
        code  | 
      
        String  | 
      
        错误码  | 
     
| 
        error  | 
      
        CommonResponseErrorOfString object  | 
      
        统一错误返回  | 
     
| 
        reason  | 
      
        String  | 
      
        失败原因  | 
     
| 
        result  | 
      
        String  | 
      
        结果  | 
     
| 
        status  | 
      
        String  | 
      
        状态  | 
     
状态码:401
| 
        参数  | 
      
        参数类型  | 
      
        描述  | 
     
|---|---|---|
| 
        error_code  | 
      
        String  | 
      
        参数解释 接口调用失败错误码 取值范围 12-18个字符组成的字符串  | 
     
| 
        error_msg  | 
      
        String  | 
      
        参数解释 接口调用失败错误信息 取值范围 3-1000个字符组成的字符串  | 
     
状态码:403
| 
        参数  | 
      
        参数类型  | 
      
        描述  | 
     
|---|---|---|
| 
        error_code  | 
      
        String  | 
      
        参数解释 接口调用失败错误码 取值范围 12-18个字符组成的字符串  | 
     
| 
        error_msg  | 
      
        String  | 
      
        参数解释 接口调用失败错误信息 取值范围 3-1000个字符组成的字符串  | 
     
状态码:404
| 
        参数  | 
      
        参数类型  | 
      
        描述  | 
     
|---|---|---|
| 
        error_code  | 
      
        String  | 
      
        参数解释 接口调用失败错误码 取值范围 12-18个字符组成的字符串  | 
     
| 
        error_msg  | 
      
        String  | 
      
        参数解释 接口调用失败错误信息 取值范围 3-1000个字符组成的字符串  | 
     
状态码:500
| 
        参数  | 
      
        参数类型  | 
      
        描述  | 
     
|---|---|---|
| 
        error_code  | 
      
        String  | 
      
        参数解释 接口调用失败错误码 取值范围 12-18个字符组成的字符串  | 
     
| 
        error_msg  | 
      
        String  | 
      
        参数解释 接口调用失败错误信息 取值范围 3-1000个字符组成的字符串  | 
     
请求示例
get https://{endpoint}/v4/c653a6a33dc041e78247284529fb695b/basic-aw/3bc38bae9a0a46d99eec19f0d42c1daa
 响应示例
状态码:200
SUCCESS
{
  "status" : "success",
  "result" : {
    "id" : "1abf0fe27057444e8df1d6bb6ed80f4d",
    "name" : "getBasicAWByIdV4UsingGETFusionTest",
    "method" : "getBasicAWByIdV4UsingGETFusionTest",
    "description" : "根据id获取单个basicAW信息",
    "create_time_string" : "2022-11-02 10:55:03 GMT+08:00",
    "update_time_string" : "2022-11-02 10:55:03 GMT+08:00",
    "create_time_stamp" : 1667357703000,
    "update_time_stamp" : 1667357703000,
    "create_user" : "lWX858314",
    "create_time" : "2022-11-02T02:55:03.000+00:00",
    "update_user" : "lWX858314",
    "update_time" : "2022-11-02T02:55:03.000+00:00",
    "param_type_and_dft_value" : [ {
      "type" : "String",
      "name" : "hostURL",
      "required" : true,
      "disabled" : false,
      "value_type" : 0,
      "basic_value" : {
        "value" : "$$hostIp"
      },
      "minLength" : -1001,
      "maxLength" : -1001,
      "maxItems" : 0,
      "minItems" : 0
    }, {
      "type" : "String",
      "name" : "aw_id",
      "required" : true,
      "disabled" : false,
      "description" : "关键字唯一标识",
      "value_type" : 0,
      "basic_value" : { },
      "minLength" : -1001,
      "maxLength" : -1001,
      "minimum" : -1001,
      "maximum" : -1001,
      "maxItems" : 0,
      "minItems" : 0,
      "in_type" : 1
    }, {
      "type" : "String",
      "name" : "project_id",
      "required" : true,
      "disabled" : false,
      "description" : "projectId",
      "value_type" : 0,
      "basic_value" : { },
      "minLength" : -1001,
      "maxLength" : -1001,
      "minimum" : -1001,
      "maximum" : -1001,
      "maxItems" : 0,
      "minItems" : 0,
      "in_type" : 1
    } ],
    "return_type" : "[{\"returnCode\":200,\"type\":\"basic\",\"body\":\"未被定义为引用\"},{\"returnCode\":401},{\"returnCode\":403},{\"returnCode\":404}]",
    "aw_type" : 1,
    "project_id" : "9905a9eb41ef4a899b1b91728eb55bfc",
    "special_type" : 0,
    "has_code" : 1,
    "aw_code" : "public AWResponse getBasicAWByIdV4UsingGETFusionTest(String hostURL,String aw_id,String project_id) throws Exception\n{\n    HttpClient.Response y_response;\n    String y_responseBody = null;\n    AWResponse y_result=new AWResponse();\n\n    String y_destURL;\n    String y_baseURL=String.format(\"https://%s/atservice/v4/%s/basic-aw/%s\",hostURL ,URLEncoder.encode(String.valueOf(project_id), \"utf-8\").replaceAll(\"\\\\+\", \"%20\"),URLEncoder.encode(String.valueOf(aw_id), \"utf-8\").replaceAll(\"\\\\+\", \"%20\"));\n    if(hostURL.startsWith(\"http\")&&y_baseURL.startsWith(\"https://\")){\n        y_baseURL = y_baseURL.substring(8);\n    }else if(hostURL.startsWith(\"http\")&&y_baseURL.startsWith(\"http://\")){\n        y_baseURL= y_baseURL.substring(7);\n    }\n    y_destURL=y_baseURL;\n\n    Reporter.log(\"1#Time#\" + FunctionSet.getCurrentDate(\"yyyy-MM-dd HH:mm:ss SSS\"), true);\n    Reporter.log(\"1#Url#\" + y_destURL, true);\n    Reporter.log(\"1#Method#get\", true);\n\n    //设置RequestHeader的代码片段\n    Map<String,List<String> > y_reqHeader=new HashMap<String,List<String> >();\n    if(!m_commonHeader.isEmpty())y_reqHeader.putAll(m_commonHeader);\n    Reporter.log(\"1#RequestHeader#\" + y_reqHeader, true);\n\n    // 执行HTTP请求\n    y_response = HttpClient.get(y_destURL, y_reqHeader);\n    int y_httpStatus =y_response.getCode();\n    y_result.setReturnCode(y_httpStatus);\n    y_responseBody=y_response.asString();\n    y_result.setResponseBody(y_responseBody);\n    y_result.setHeaders(y_response.getHeaders());\n    Reporter.log(\"1#ResponseCode#\" + y_httpStatus, true);\n    Reporter.log(\"1#ResponseHeader#\" + y_response.getHeaders(), true);\n    Reporter.log(\"1#ResponseBody#\" + y_responseBody, true);\n\n\n    Reporter.log(\"1#EndTime#\" + FunctionSet.getCurrentDate(\"yyyy-MM-dd HH:mm:ss SSS\"), true);\n    return y_result;\n}",
    "group_name" : "4d50ec09e1c84e23a50f8c0594b3bffc",
    "protocol_type" : "http/https",
    "by_order" : 142,
    "aw_mark" : 1,
    "origin_project" : "CloudTestAtSvr_Alpha_1d87c8f8fbfd43319f6b9f0b14aca998",
    "aw_uniqueid" : "getBasicAWByIdV4UsingGETFusionTest_basic-aw-controller-fusion-test",
    "aw_tags" : "basic-aw-controller-fusion-test",
    "aw_operationid" : "getBasicAWByIdV4UsingGETFusionTest",
    "interface_label" : "",
    "extra_info" : {
      "summary" : "根据id获取单个basicAW信息",
      "http_method" : "get",
      "param_dependent" : "",
      "http_url" : "https://{hostURL}/atservice/v4/{project_id}/basic-aw/{aw_id}"
    }
  }
}
 状态码
| 
        状态码  | 
      
        描述  | 
     
|---|---|
| 
        200  | 
      
        SUCCESS  | 
     
| 
        401  | 
      
        Unauthorized  | 
     
| 
        403  | 
      
        Forbidden  | 
     
| 
        404  | 
      
        Not Found  | 
     
| 
        500  | 
      
        ERROR  | 
     
错误码
请参见错误码。