
# 查询API详情
#### 功能介绍
查看指定的API的详细信息。
#### URI
GET /v1/{project_id}/apic/instances/{instance_id}/apis/{api_id}
表1路径参数 
| 参数          | 是否必选 | 参数类型   | 描述                                  |
|:---|:---|:---|:---|
| project_id  | 是    | String | 项目ID，获取方式请参见API参考的"附录 \> 获取项目ID"章节。 |
| instance_id | 是    | String | 实例ID                                |
| api_id      | 是    | String | API的编号                              |
   
#### 请求参数
表2请求Header参数 
| 参数           | 是否必选 | 参数类型   | 描述                                                       |
|:---|:---|:---|:---|
| X-Auth-Token | 是    | String | 用户Token。通过调用IAM服务获取用户Token接口获取（响应消息头中X-Subject-Token的值）。 |
   
#### 响应参数
**状态码：200**
表3响应Body参数 
| 参数                    | 参数类型                                                                                        | 描述                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
|:---|:---|:---|
| name                  | String                                                                                      | API名称。 支持汉字、英文、数字、中划线、下划线、点、斜杠、中英文格式下的小括号和冒号、中文格式下的顿号，且只能以英文、汉字和数字开头。 说明： 中文字符必须为UTF-8或者unicode编码。                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| type                  | Integer                                                                                     | API类型 - 1：公有API   - 2：私有API                                                                                                                                                                                                                                                                                                         |
| version               | String                                                                                      | API的版本                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| req_protocol          | String                                                                                      | API的请求协议 - HTTP   - HTTPS   - BOTH：同时支持HTTP和HTTPS                                                                                                                                                     |
| req_method            | String                                                                                      | API的请求方式                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| req_uri               | String                                                                                      | 请求地址。可以包含请求参数，用{}标识，比如/getUserInfo/{userId}，支持 \* % - _ . 等特殊字符，总长度不超过512，且满足URI规范。 说明： 需要服从URI规范。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| auth_type             | String                                                                                      | API的认证方式 - NONE：无认证   - APP：APP认证   - IAM：IAM认证   - AUTHORIZER：自定义认证    |
| auth_opt              | [AuthOpt] object                                       | 认证方式参数                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| cors                  | Boolean                                                                                     | 是否支持跨域 - TRUE：支持   - FALSE：不支持                                                                                                                                                                                                                                                                                                      |
| match_mode            | String                                                                                      | API的匹配方式 - SWA：前缀匹配   - NORMAL：正常匹配（绝对匹配）    默认：NORMAL                                                                                                                                                                                                                                                                              |
| backend_type          | String                                                                                      | 后端类型 - HTTP：web后端   - FUNCTION：函数工作流   - MOCK：模拟的后端                                                                                                                                                   |
| remark                | String                                                                                      | API描述。 不允许带有\<、\>字符 说明： 中文字符必须为UTF-8或者unicode编码。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| group_id              | String                                                                                      | API所属的分组编号                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| body_remark           | String                                                                                      | API请求体描述，可以是请求体示例、媒体类型、参数等信息。 说明： 中文字符必须为UTF-8或者unicode编码。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| result_normal_sample  | String                                                                                      | 正常响应示例，描述API的正常返回信息。 说明： 中文字符必须为UTF-8或者unicode编码。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| result_failure_sample | String                                                                                      | 失败返回示例，描述API的异常返回信息。 说明： 中文字符必须为UTF-8或者unicode编码。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| authorizer_id         | String                                                                                      | 前端自定义认证对象的ID                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| tags                  | Array of strings                                                                            | 标签。 支持英文，数字，下划线，且只能以英文开头。支持输入多个标签，不同标签以英文逗号分割。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| response_id           | String                                                                                      | 分组自定义响应ID 暂不支持                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| roma_app_id           | String                                                                                      | API归属的集成应用编号 API分组为全局分组时或API绑定自定义域名时必填。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| domain_name           | String                                                                                      | API绑定的自定义域名，使用自定义域名时roma_app_id字段必填。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| tag                   | String                                                                                      | 标签 待废弃，优先使用tags字段                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| id                    | String                                                                                      | API编号                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| status                | Integer                                                                                     | API状态 - 1： 有效                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| arrange_necessary     | Integer                                                                                     | 是否需要编排                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| register_time         | String                                                                                      | API注册时间                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| update_time           | String                                                                                      | API修改时间                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| group_name            | String                                                                                      | API所属分组的名称                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| group_version         | String                                                                                      | API所属分组的版本                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| run_env_name          | String                                                                                      | 发布的环境名称 存在多个发布记录时，环境名称之间用\|隔开                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| run_env_id            | String                                                                                      | 发布的环境编号 存在多个发布记录时，环境编号之间用\|隔开                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| publish_id            | String                                                                                      | 发布记录编号 存在多个发布记录时，发布记录编号之间用\|隔开                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| roma_app_name         | String                                                                                      | API归属的集成应用名称                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| ld_api_id             | String                                                                                      | 当API的后端为自定义后端时，对应的自定义后端API编号                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| func_info             | [ApiFunc] object                                       | 函数工作流后端详情                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| mock_info             | [ApiMock] object                                       | mock后端详情                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| req_params            | Array of [ReqParam] objects                           | API的请求参数列表                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| backend_params        | Array of [BackendParam] objects                   | API的后端参数列表                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| policy_functions      | Array of [ApiPolicyFunctionResp] objects | 函数工作流策略后端列表                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| policy_mocks          | Array of [ApiPolicyMockResp] objects         | mock策略后端列表                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| backend_api           | [BackendApiV1] object                             | web后端详情                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| policy_https          | Array of [ApiPolicyHttpRespV1] objects     | web策略后端列表                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
   
 表4AuthOpt 
| 参数                 | 参数类型   | 描述                                                                                                                                                                                                                                                                                                                                                                                                                                       |
|:---|:---|:---|
| app_code_auth_type | String | AppCode简易认证类型，仅在auth_type为APP时生效，默认为DISABLE： - DISABLE：不开启简易认证   - HEADER：开启简易认证且AppCode位置在HEADER    |
   
 表5ApiFunc 
| 参数              | 参数类型    | 描述                                                                                                                                                                                                                                                                                                                                                                              |
|:---|:---|:---|
| function_urn    | String  | 函数URN                                                                                                                                                                                                                                                                                                                                                                           |
| network_type    | String  | 对接函数的网络架构类型 - V1：非VPC网络架构   - V2：VPC网络架构    |
| remark          | String  | 描述信息。 说明： 中文字符必须为UTF-8或者unicode编码。                                                                                                                                                                                                                                                                       |
| invocation_type | String  | 调用类型 - async：异步   - sync：同步                 |
| version         | String  | 函数版本 当函数别名URN和函数版本同时传入时，函数版本将被忽略，只会使用函数别名URN                                                                                                                                                                                                                                                                                                |
| alias_urn       | String  | 函数别名URN 当函数别名URN和函数版本同时传入时，函数版本将被忽略，只会使用函数别名URN                                                                                                                                                                                                                                                                                             |
| timeout         | Integer | 服务集成请求后端服务的超时时间。最大超时时间可通过实例特性backend_timeout配置修改，可修改的上限为600000 单位：毫秒。                                                                                                                                                                                                                                                                       |
| authorizer_id   | String  | 后端自定义认证ID                                                                                                                                                                                                                                                                                                                                                                       |
| id              | String  | 编号                                                                                                                                                                                                                                                                                                                                                                              |
| register_time   | String  | 注册时间                                                                                                                                                                                                                                                                                                                                                                            |
| status          | Integer | 后端状态 - 1： 有效                                                                                                                                                              |
| update_time     | String  | 修改时间                                                                                                                                                                                                                                                                                                                                                                            |
   
 表6ApiMock 
| 参数             | 参数类型    | 描述                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
|:---|:---|:---|
| remark         | String  | 描述信息。 说明： 中文字符必须为UTF-8或者unicode编码。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| result_content | String  | 返回结果                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| version        | String  | 版本。字符长度不超过64                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| authorizer_id  | String  | 后端自定义认证ID                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| status_code    | Integer | mock后端自定义状态码： "200": "OK", "201": "Created", "202": "Accepted", "203": "NonAuthoritativeInformation", "204": "NoContent", "205": "ResetContent", "206": "PartialContent", "300": "MultipleChoices", "301": "MovedPermanently", "302": "Found", "303": "SeeOther", "304": "NotModified", "305": "UseProxy", "306": "Unused", "307": "TemporaryRedirect", "400": "BadRequest", "401": "Unauthorized", "402": "PaymentRequired", "403": "Forbidden", "404": "NotFound", "405": "MethodNotAllowed", "406": "NotAcceptable", "407": "ProxyAuthenticationRequired", "408": "RequestTimeout", "409": "Conflict", "410": "Gone", "411": "LengthRequired", "412": "PreconditionFailed", "413": "RequestEntityTooLarge", "414": "RequestURITooLong", "415": "UnsupportedMediaType", "416": "RequestedRangeNotSatisfiable", "417": "ExpectationFailed", "450": "ParameterRequried", "451": "MethodConnectException", "500": "InternalServerError", "501": "NotImplemented", "502": "BadGateway", "503": "ServiceUnavailable", "504": "GatewayTimeout", "505": "HTTPVersionNotSupported", |
| header         | String  | mock后端自定义响应头header 格式：\[{"key":"","value": "", "remark":""}, {"key2":"","value2": "","remark2":""}\] 参数说明： key：mock后端自定义响应头header key, 支持英文，数字，中划线，且只能以英文字母或数字开头，1 \~ 64字符 value： mock后端自定义响应头header value，中文字符必须为UTF-8或者unicode编码, 不能为空，最大长度为10240 remark：mock后端自定义响应头header remark，中文字符必须为UTF-8 或者unicode编码，可以为空，最大长度为2048                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| id             | String  | 编号                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| register_time  | String  | 注册时间                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| status         | Integer | 后端状态 - 1： 有效                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| update_time    | String  | 修改时间                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
   
 表7ReqParam 
| 参数             | 参数类型             | 描述                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
|:---|:---|:---|
| name           | String           | 参数名称。 由英文字母、数字、中划线、下划线、英文句号组成，且只能以英文开头。                                                                                                                                                                                                                                                                                                                                                                                                                    |
| type           | String           | 参数类型 - STRING：字符串型   - NUMBER：数字型                                                                                                                          |
| location       | String           | 参数位置                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| default_value  | String           | 参数默认值                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| sample_value   | String           | 参数示例值                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| required       | Integer          | 是否必须 - 1：是   - 2：否    location为PATH时，required默认为1，其他场景required默认为2                                                                                         |
| valid_enable   | Integer          | 是否开启校验 - 1：开启校验   - 2：不开启校验                                                                                                                                |
| remark         | String           | 描述信息。 说明： 中文字符必须为UTF-8或者unicode编码。                                                                                                                                                                                                                                                                                                                                                                                      |
| enumerations   | String           | 参数枚举值                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| min_num        | Integer          | 参数最小值 参数类型为NUMBER时有效                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| max_num        | Integer          | 参数最大值 参数类型为NUMBER时有效                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| min_size       | Integer          | 参数最小长度 参数类型为STRING时有效                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| max_size       | Integer          | 参数最大长度 参数类型为STRING时有效                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| regular        | String           | 正则校验规则 暂不支持                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| json_schema    | String           | JSON校验规则 暂不支持                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| pass_through   | Integer          | 是否透传 - 1：是   - 2：否                                                                                                                                         |
| orchestrations | Array of strings | 请求参数编排规则列表。 请求参数匹配编排规则的生效优先级与列表顺序保持一致，列表中靠前的配置匹配优先级较高； 如果编排规则列表中包含none_value类型的规则，则none_value类型的规则优先级最高，至多绑定一个none_value类型的规则； 如果编排规则列表中包含default类型的规则，则default类型的规则优先级最低，至多绑定一个default类型的规则； 当编排规则为预处理策略时，该规则不能作为除default以外的最后一个编排规则； 每个API仅允许选择一个参数绑定编排规则，且编排规则不能重复，支持绑定的编排规则数量有配额限制，具体请参见产品介绍的"配额说明"章节。 |
| id             | String           | 参数编号                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
   
 表8ApiPolicyFunctionResp 
| 参数              | 参数类型                                                                        | 描述                                                                                                                                                                                                                                                                                                                                                                              |
|:---|:---|:---|
| function_urn    | String                                                                      | 函数URN                                                                                                                                                                                                                                                                                                                                                                           |
| network_type    | String                                                                      | 对接函数的网络架构类型 - V1：非VPC网络架构   - V2：VPC网络架构    |
| invocation_type | String                                                                      | 调用类型 - async： 异步   - sync：同步                |
| timeout         | Integer                                                                     | 服务集成请求后端服务的超时时间。最大超时时间可通过实例特性backend_timeout配置修改，可修改的上限为600000 单位：毫秒。                                                                                                                                                                                                                                                                       |
| version         | String                                                                      | 函数版本 当函数别名URN和函数版本同时传入时，函数版本将被忽略，只会使用函数别名URN                                                                                                                                                                                                                                                                                                |
| alias_urn       | String                                                                      | 函数别名URN 当函数别名URN和函数版本同时传入时，函数版本将被忽略，只会使用函数别名URN                                                                                                                                                                                                                                                                                             |
| id              | String                                                                      | 编号                                                                                                                                                                                                                                                                                                                                                                              |
| name            | String                                                                      | 策略后端名称。字符串由中文、英文字母、数字、下划线组成，且只能以中文或英文开头。                                                                                                                                                                                                                                                                                                                                        |
| conditions      | Array of [ConditionResp] objects | 策略条件列表                                                                                                                                                                                                                                                                                                                                                                          |
| backend_params  | Array of [BackendParam] objects   | 后端参数列表                                                                                                                                                                                                                                                                                                                                                                          |
| effect_mode     | String                                                                      | 关联的策略组合模式： - ALL：满足全部条件   - ANY：满足任一条件      |
| authorizer_id   | String                                                                      | 后端自定义认证对象的ID                                                                                                                                                                                                                                                                                                                                                                    |
   
 表9ApiPolicyMockResp 
| 参数             | 参数类型                                                                        | 描述                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
|:---|:---|:---|
| id             | String                                                                      | 编号                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| name           | String                                                                      | 策略后端名称。字符串由中文、英文字母、数字、下划线组成，且只能以中文或英文开头。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| conditions     | Array of [ConditionResp] objects | 策略条件列表                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| backend_params | Array of [BackendParam] objects   | 后端参数列表                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| effect_mode    | String                                                                      | 关联的策略组合模式： - ALL：满足全部条件   - ANY：满足任一条件                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| authorizer_id  | String                                                                      | 后端自定义认证对象的ID                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| result_content | String                                                                      | 返回结果                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| status_code    | Integer                                                                     | mock后端自定义状态码： "200": "OK", "201": "Created", "202": "Accepted", "203": "NonAuthoritativeInformation", "204": "NoContent", "205": "ResetContent", "206": "PartialContent", "300": "MultipleChoices", "301": "MovedPermanently", "302": "Found", "303": "SeeOther", "304": "NotModified", "305": "UseProxy", "306": "Unused", "307": "TemporaryRedirect", "400": "BadRequest", "401": "Unauthorized", "402": "PaymentRequired", "403": "Forbidden", "404": "NotFound", "405": "MethodNotAllowed", "406": "NotAcceptable", "407": "ProxyAuthenticationRequired", "408": "RequestTimeout", "409": "Conflict", "410": "Gone", "411": "LengthRequired", "412": "PreconditionFailed", "413": "RequestEntityTooLarge", "414": "RequestURITooLong", "415": "UnsupportedMediaType", "416": "RequestedRangeNotSatisfiable", "417": "ExpectationFailed", "450": "ParameterRequried", "451": "MethodConnectException", "500": "InternalServerError", "501": "NotImplemented", "502": "BadGateway", "503": "ServiceUnavailable", "504": "GatewayTimeout", "505": "HTTPVersionNotSupported", |
| header         | String                                                                      | mock后端自定义响应头header 格式：\[{"key":"","value": "", "remark":""}, {"key2":"","value2": "","remark2":""}\] 参数说明： key：mock后端自定义响应头header key, 支持英文，数字，中划线，且只能以英文字母或数字开头，1 \~ 64字符 value： mock后端自定义响应头header value，中文字符必须为UTF-8或者unicode编码, 不能为空，最大长度为10240 remark：mock后端自定义响应头header remark，中文字符必须为UTF-8 或者unicode编码，可以为空，最大长度为2048                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
   
 表10ConditionResp 
| 参数                             | 参数类型   | 描述                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
|:---|:---|:---|
| req_param_name                 | String | 关联的请求参数对象名称。策略类型为param时必选                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| sys_param_name                 | String | 系统参数名称。策略类型为system时必选。支持以下系统参数 - req_path：请求路径。如 /a/b   - req_method：请求方法。如 GET   - reqPath：请求路径，废弃。如 /a/b   - reqMethod：请求方法，废弃。如 GET                                                                                                                                                                                                                                                                   |
| cookie_param_name              | String | COOKIE参数名称。策略类型为cookie时必选                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| frontend_authorizer_param_name | String | 系统参数-前端认证参数名称。策略类型为frontend_authorizer时必选，前端认证参数名称以"$context.authorizer.frontend."字符串为前缀。例如，前端认证参数名称为user_name，加上前缀为$context.authorizer.frontend.user_name。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| condition_type                 | String | 策略条件 - exact：绝对匹配   - enum：枚举   - pattern：正则    策略类型为param、cookie、frontend_authorizer时必选                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| condition_origin               | String | 策略类型 - param：参数   - source：源IP   - system：系统参数-网关内置参数   - cookie: COOKIE参数   - frontend_authorizer: 系统参数-前端认证参数   - orchestration: 参数编排规则    |
| condition_value                | String | 策略值;策略类型为param，source，cookie，frontend_authorizer时必填                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| mapped_param_name              | String | 参数编排规则编排后生成的参数名称，当condition_origin为orchestration的时候必填，并且生成的参数名称必须在api绑定的编排规则中存在                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| mapped_param_location          | String | 参数编排规则编排后生成的参数所在的位置，当condition_origin为orchestration的时候必填，并且生成的参数所在的位置必须在api绑定的编排规则中存在                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| id                             | String | 编号                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| req_param_id                   | String | 关联的请求参数对象编号                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| req_param_location             | String | 关联的请求参数对象位置                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
   
 表11BackendParam 
| 参数           | 参数类型   | 描述                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
|:---|:---|:---|
| name         | String | 参数名称。 字符串由英文字母、数字、中划线、下划线、英文句号组成，且只能以英文开头。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| location     | String | 参数位置：PATH、QUERY、HEADER                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| origin       | String | 参数类别：REQUEST、CONSTANT、SYSTEM                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| value        | String | 参数值。字符长度不超过255 origin类别为REQUEST时，此字段值为req_params中的参数名称； origin类别为CONSTANT时，此字段值为参数真正的值； origin类别为SYSTEM时，此字段值为系统参数名称，系统参数分为网关内置参数、前端认证参数和后端认证参数，当api前端安全认证方式为自定义认证时，可以填写前端认证参数，当api开启后端认证时，可以填写后端认证参数。 网关内置参数取值及对应含义： - $context.sourceIp：API调用者的源地址   - $context.stage：API调用的部署环境   - $context.apiName: API的名称   - $context.apiId：API的ID   - $context.appName: API调用者的APP对象名称   - $context.appId：API调用者的APP对象ID   - $context.requestId：当次API调用生成跟踪ID   - $context.serverAddr：网关的服务器地址   - $context.serverName：网关的服务器名称   - $context.handleTime：本次API调用的处理时间   - $context.providerAppId：API拥有者的应用对象ID，暂不支持使用   - $context.clientCertCN：开启客户端认证时，本次API调用携带的客户端证书CN   - $context.member_group_name: 后端服务器所属的服务器分组名称   - $context.member_group_id: 后端服务器所属的服务器分组ID    前端认证参数取值：以"$context.authorizer.frontend."为前缀，如希望自定义认证校验通过返回的参数为aaa，那么此字段填写为$context.authorizer.frontend.aaa 后端认证参数取值：以"$context.authorizer.backend."为前缀，如希望自定义认证校验通过返回的参数为aaa，那么此字段填写为$context.authorizer.backend.aaa |
| remark       | String | 描述。 说明： 中文字符必须为UTF-8或者unicode编码。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| id           | String | 参数编号                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| req_param_id | String | 对应的请求参数编号                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
   
 表12BackendApiV1 
| 参数                | 参数类型    | 描述                                                                                                                                                                                                                                                                                                                                                                          |
|:---|:---|:---|
| authorizer_id     | String  | 后端自定义认证对象的ID                                                                                                                                                                                                                                                                                                                                                                |
| url_domain        | String  | 后端服务的地址。 由主机（IP或域名）和端口号组成，总长度不超过255。格式为主机:端口（如：apig.example.com:7443）。如果不写端口，则HTTPS默认端口号为443，HTTP默认端口号为80。 支持环境变量，使用环境变量时，每个变量名的长度为3 \~ 32位的字符串，字符串由英文字母、数字、下划线、中划线组成，且只能以英文开头                                                                                                                      |
| req_protocol      | String  | 请求协议                                                                                                                                                                                                                                                                                                                                                                        |
| remark            | String  | 描述。 说明： 中文字符必须为UTF-8或者unicode编码。                                                                                                                                                                                                                                                                    |
| req_method        | String  | 请求方式                                                                                                                                                                                                                                                                                                                                                                        |
| version           | String  | web后端版本，字符长度不超过16                                                                                                                                                                                                                                                                                                                                                           |
| req_uri           | String  | 请求地址。可以包含请求参数，用{}标识，比如/getUserInfo/{userId}，支持 \* % - _ . 等特殊字符，总长度不超过512，且满足URI规范。 支持环境变量，使用环境变量时，每个变量名的长度为3 \~ 32位的字符串，字符串由英文字母、数字、中划线、下划线组成，且只能以英文开头。 说明： 需要服从URI规范。                                                                                            |
| timeout           | Integer | ROMA Connect APIC请求后端服务的超时时间。最大超时时间可通过实例特性backend_timeout配置修改，可修改的上限为600000 单位：毫秒。                                                                                                                                                                                                                                                      |
| enable_client_ssl | Boolean | 是否开启双向认证                                                                                                                                                                                                                                                                                                                                                                    |
| id                | String  | 编号                                                                                                                                                                                                                                                                                                                                                                          |
| status            | Integer | 后端状态 - 1： 有效                                                                                                                                                          |
| register_time     | String  | 注册时间                                                                                                                                                                                                                                                                                                                                                                        |
| update_time       | String  | 修改时间                                                                                                                                                                                                                                                                                                                                                                        |
| vpc_info          | String  | VPC通道信息                                                                                                                                                                                                                                                                                                                                                                     |
| vpc_status        | Integer | 是否使用VPC通道 - 1：使用VPC通道   - 2：不使用VPC通道    |
   
 表13ApiPolicyHttpRespV1 
| 参数                | 参数类型                                                                        | 描述                                                                                                                                                                                                                                                                                                                                                                            |
|:---|:---|:---|
| id                | String                                                                      | 编号                                                                                                                                                                                                                                                                                                                                                                            |
| name              | String                                                                      | 策略后端名称。字符串由中文、英文字母、数字、下划线组成，且只能以中文或英文开头。                                                                                                                                                                                                                                                                                                                                      |
| conditions        | Array of [ConditionResp] objects | 策略条件列表                                                                                                                                                                                                                                                                                                                                                                        |
| backend_params    | Array of [BackendParam] objects   | 后端参数列表                                                                                                                                                                                                                                                                                                                                                                        |
| effect_mode       | String                                                                      | 关联的策略组合模式： - ALL：满足全部条件   - ANY：满足任一条件    |
| authorizer_id     | String                                                                      | 后端自定义认证对象的ID                                                                                                                                                                                                                                                                                                                                                                  |
| url_domain        | String                                                                      | 策略后端的Endpoint。由域名（或IP地址）和端口号组成，总长度不超过255。格式为域名:端口（如：apig.example.com:7443）。如果不写端口，则HTTPS默认端口号为443， HTTP默认端口号为80。支持环境变量，使用环境变量时，每个变量名的长度为3 \~ 32位的字符串，字符串由英文字母、数字、"_"、"-"组成，且只能以英文开头。                                                                                                                                                                                          |
| req_protocol      | String                                                                      | 请求协议：HTTP、HTTPS                                                                                                                                                                                                                                                                                                                                                               |
| req_method        | String                                                                      | 请求方式：GET、POST、PUT、DELETE、HEAD、PATCH、OPTIONS、ANY                                                                                                                                                                                                                                                                                                                               |
| req_uri           | String                                                                      | 请求地址。可以包含请求参数，用{}标识，比如/getUserInfo/{userId}，支持 \* % - _ . 等特殊字符，总长度不超过512，且满足URI规范。 支持环境变量，使用环境变量时，每个变量名的长度为3 \~ 32位的字符串，字符串由英文字母、数字、中划线、下划线组成，且只能以英文开头。 说明： 需要服从URI规范。                                                                                             |
| timeout           | Integer                                                                     | ROMA Connect APIC请求后端服务的超时时间。最大超时时间可通过实例特性backend_timeout配置修改，可修改的上限为600000 单位：毫秒。                                                                                                                                                                                                                                                        |
| enable_client_ssl | Boolean                                                                     | 是否开启双向认证                                                                                                                                                                                                                                                                                                                                                                      |
| vpc_info          | String                                                                      | VPC通道信息                                                                                                                                                                                                                                                                                                                                                                       |
| vpc_status        | Integer                                                                     | 是否使用VPC通道： - 1： 使用VPC通道   - 2：不使用VPC通道    |
   
**状态码：401**
表14响应Body参数 
| 参数         | 参数类型   | 描述   |
|:---|:---|:---|
| error_code | String | 错误码  |
| error_msg  | String | 错误描述 |
   
**状态码：403**
表15响应Body参数 
| 参数         | 参数类型   | 描述   |
|:---|:---|:---|
| error_code | String | 错误码  |
| error_msg  | String | 错误描述 |
   
**状态码：404**
表16响应Body参数 
| 参数         | 参数类型   | 描述   |
|:---|:---|:---|
| error_code | String | 错误码  |
| error_msg  | String | 错误描述 |
   
**状态码：500**
表17响应Body参数 
| 参数         | 参数类型   | 描述   |
|:---|:---|:---|
| error_code | String | 错误码  |
| error_msg  | String | 错误描述 |
   
#### 请求示例
无
#### 响应示例
**状态码：200**
OK
```
{
  "id" : "5f918d104dc84480a75166ba99efff21",
  "tags" : [ "webApi" ],
  "arrange_necessary" : 2,
  "backend_type" : "HTTP",
  "auth_type" : "AUTHORIZER",
  "auth_opt" : {
    "app_code_auth_type" : "DISABLE"
  },
  "authorizer_id" : "8d0443832a194eaa84244e0c1c1912ac",
  "backend_api" : {
    "update_time" : "2020-08-02T16:32:47.077029Z",
    "vpc_status" : 1,
    "vpcinfo" : {
      "vpc_id" : "56a7d7358e1b42459c9d730d65b14e59",
      "vpc_proxy_host" : "www.example.com"
    },
    "url_domain" : "56a7d7358e1b42459c9d730d65b14e59",
    "req_protocol" : "HTTPS",
    "id" : "1ce8fda3586d4371bd83c955df37e102",
    "req_method" : "GET",
    "register_time" : "2020-07-31T12:42:51Z",
    "req_uri" : "/test/benchmark",
    "timeout" : 5000,
    "status" : 1
  },
  "cors" : false,
  "status" : 1,
  "group_name" : "api_group_001",
  "group_id" : "c77f5e81d9cb4424bf704ef2b0ac7600",
  "group_version" : "V1",
  "match_mode" : "NORMAL",
  "name" : "Api_http",
  "req_protocol" : "HTTPS",
  "req_method" : "GET",
  "req_uri" : "/test/http",
  "type" : 1,
  "version" : "V0.0.1",
  "result_normal_sample" : "normal result",
  "result_failure_sample" : "failure result",
  "register_time" : "2020-07-31T12:42:51Z",
  "update_time" : "2020-08-02T16:32:47.046289Z",
  "remark" : "web api",
  "backend_params" : [ {
    "name" : "X-CONSTANT-HEADER",
    "value" : "demo",
    "location" : "HEADER",
    "origin" : "CONSTANT",
    "remark" : "constant_demo",
    "id" : "8cb2eba19e7a4423a4e835647a8b8d76"
  }, {
    "name" : "app-id",
    "value" : "$context.appId",
    "location" : "HEADER",
    "origin" : "SYSTEM",
    "remark" : "consumer app id",
    "id" : "216ddda836e74d528f364ff589d9dd21"
  } ]
}
```
**状态码：401**
Unauthorized
```
{
  "error_code" : "APIG.1002",
  "error_msg" : "Incorrect token or token resolution failed"
}
```
**状态码：403**
Forbidden
```
{
  "error_code" : "APIG.1005",
  "error_msg" : "No permissions to request this method"
}
```
**状态码：404**
Not Found
```
{
  "error_code" : "APIG.3002",
  "error_msg" : "API 5f918d104dc84480a75166ba99efff21 does not exist"
}
```
**状态码：500**
Internal Server Error
```
{
  "error_code" : "APIG.9999",
  "error_msg" : "System error"
}
```
#### 状态码
| 状态码 | 描述                    |
|:---|:---|
| 200 | OK                    |
| 401 | Unauthorized          |
| 403 | Forbidden             |
| 404 | Not Found             |
| 500 | Internal Server Error |
   
#### 错误码
请参见[错误码](https://support.huaweicloud.com/api-roma/ErrorCode.html)。
