API网关 APIG-查看版本详情:响应消息

时间:2025-02-12 15:04:26

响应消息

表3 参数说明

参数

类型

说明

id

String

API编号

name

String

API名称

group_id

String

API所属分组的编号

group_name

String

API所属分组的名称

status

Integer

API的状态

type

Integer

API类型

version

String

API版本

req_protocol

String

API访问协议

req_method

String

API请求方式

req_uri

String

API访问地址

auth_type

String

API认证方式

auth_opt

字段数据类型

API认证方式参数

authorizer_id

String

前端自定义认证对象的ID

match_mode

String

API匹配方式

register_time

Timestamp

API创建时间

update_time

Timestamp

API修改时间

remark

String

API描述

bakend_type

String

后端类型

run_env_name

String

发布的环境名

run_env_id

String

发布的环境id

publish_id

String

发布记录的编号

arrange_necessary

Integer

是否需要编排

tag

String

服务名称标签,待废弃字段

tags

[]String

标签

cors

Bool

是否支持跨域访问

body_remark

String

API请求体描述,可以是请求体示例、媒体类型、参数等信息

result_normal_sample

String

正常响应示例,描述API的正常返回信息

result_failure_sample

String

失败返回示例,描述API的异常返回信息

sl_domain

String

分组的子 域名

version_id

String

版本编号

publish_time

Timestamp

版本发布时间

backend_api

字典数据类型

后端服务:web后端详情

mock_info

字典数据类型

后端服务:MOCK详情

func_info

字典数据类型

后端服务: 函数工作流 后端详情

req_params

字典数据类型

API的请求参数列表

backend_params

字典数据类型

API的后端参数列表

表4 backend_api参数说明

参数

类型

说明

id

String

编号

status

Integer

状态

url_domain

String

后端endpoint

version

String

版本

req_protocol

String

访问协议

req_method

String

访问方式

req_uri

String

访问地址

timeout

Integer

访问超时时间,单位:毫秒

register_time

Timestamp

创建时间

update_time

Timestamp

修改时间

remark

String

描述

vpc_status

String

是否使用VPC通道

vpc_info

String

VPC通道信息

authorizer_id

String

后端自定义认证对象的ID

表5 mock_info参数说明

参数

类型

说明

id

String

编号

status

Integer

状态

version

String

版本

result_content

String

返回结果

register_time

Timestamp

创建时间

update_time

Timestamp

修改时间

remark

String

描述

表6 func_info参数说明

参数

类型

说明

id

String

编号

status

Integer

状态

version

String

版本

function_urn

String

函数URN

invocation_type

String

调用类型:async|sync

register_time

Timestamp

创建时间

update_time

Timestamp

更新时间

timeout

Integer

超时时间,单位:毫秒

remark

String

描述

表7 req_params参数说明

参数

类型

说明

id

String

参数编号

name

String

参数名称

type

String

参数类型

location

String

参数位置

default_value

String

参数默认值

sample_value

String

参数示例值

required

Integer

是否必须

valid_enable

Integer

是否开启校验

remark

String

描述

enumerations

String

参数枚举值

min_num

Integer

参数最小值(参数类型为NUMBER时有效)

max_num

Integer

参数最大值(参数类型为NUMBER时有效)

min_size

Integer

参数最小长度

max_size

Integer

参数最大长度

regular

String

正则校验规则

json_schema

String

JSON校验规则

表8 backend_params参数说明

参数

类型

说明

id

String

参数编号

req_param_id

String

对应的请求参数编号

name

String

参数名称

location

String

参数位置

origin

Integer

参数类别

value

Integer

参数值

remark

String

描述

表9 auth_opt参数说明

参数

类型

说明

app_code_auth_type

String

AppCode简易认证类型

响应消息样例:

{  "name": "test",  "type": 1,  "version": "V0.0.1",  "req_protocol": "HTTPS",  "req_method": "GET",  "req_uri": "/test/{project_id}",  "auth_type": "APP",  "auth_opt": {    "app_code_auth_type": "HEADER"  },  "tags": ["APIG-SN-test", "test"],  "cors": false,  "match_mode": "NORMAL",  "backend_type": "HTTP",  "group_id": "f71f69876f90456ca6fd18ed012fdc11",  "result_normal_sample": "hello world!",  "id": "81efcfd94b8747a0b21e8c04144a4e8c",  "status": 1,  "arrange_necessary": 2,  "register_time": "2018-08-15T03:41:11.0239936Z",  "update_time": "2018-08-15T03:41:11.0239936Z",  "group_name": "group0002",  "sl_domain": "a8be0e466f0e4d8bb18ebd15402cdd66.apigw.XXX.example.com",  "version_id": "69b7492e2855487398d45733b9d6147a",  "publish_time": "2018-08-24T03:10:14Z",  "backend_api": {    "url_domain": "xxxxxxxxx",    "req_protocol": "HTTP",    "req_method": "GET",    "req_uri": "/test",    "timeout": 1000,    "vpc_status": 2,    "id": "3442ffd031814e3a8f133a9f1ea08453",    "status": 1,    "register_time": "2018-08-15T03:41:11.1019236Z",    "update_time": "2018-08-15T03:41:11.1019236Z"  },  "req_params": [    {      "name": "project_id",      "type": "STRING",      "location": "PATH",      "required": 1,      "valid_enable": 2,      "id": "593c5560e0924e00af08fb458f850ecb"    },    {      "name": "city",      "type": "STRING",      "location": "QUERY",      "required": 2,      "valid_enable": 2,      "id": "e0b91bc81ae54f8ea850848d782d6e1e"    }  ],  "backend_params": [    {      "name": "project_id",      "location": "QUERY",      "origin": "REQUEST",      "value": "project_id",      "id": "44e03de2351e43a8b18ba9ec1e71d2e9",      "req_param_id": "593c5560e0924e00af08fb458f850ecb"    },    {      "name": "city",      "location": "QUERY",      "origin": "REQUEST",      "value": "city",      "id": "b60fbcb5b86f4f5c8705c445b9bd6325",      "req_param_id": "e0b91bc81ae54f8ea850848d782d6e1e"    }  ]}
support.huaweicloud.com/api-apig/apig-phapi-180911217.html