查询环境变量列表
查询基于飞书 aPaaS 开发的应用的环境变量列表
请求
| 项目 | 值 |
|---|---|
| HTTP URL | https://open.feishu.cn/open-apis/apaas/v1/applications/:namespace/environment_variables/query |
| HTTP Method | POST |
| 接口频率限制 | 10 次/秒 |
| 支持的应用类型 | custom,isv |
| 权限要求 调用该 API 所需的权限。开启其中任意一项权限即可调用 | app_engine:application.environment_variable:read 查询环境变量 |
请求头
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
| Authorization | string | 是 | tenant_access_token 值格式:"Bearer access_token" 示例值:"Bearer t-7f1bcd13fc57d46bac21793a18e560" 了解更多:如何选择与获取 access token |
| Content-Type | string | 是 | 固定值:"application/json; charset=utf-8" |
路径参数
| 名称 | 类型 | 描述 |
|---|---|---|
namespace | string | 应用命名空间 示例值:"package_test__c" |
请求体
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
filter | environment_variable_filter | 否 | 过滤条件 |
└ quick_query | string | 否 | 模糊查询关键词 示例值:"Sample Text" |
limit | int | 否 | 限制的条数,默认为 500,不可超过 500 示例值:10 数据校验规则: - 取值范围: 0 ~ 500 |
offset | int | 否 | 返回记录的偏移量,默认为 0,即从查询到的第一个记录开始返回 示例值:0 数据校验规则: - 取值范围: 0 ~ 9223372036854775807 |
请求体示例
json
{
"filter": {
"quick_query": "Sample Text"
},
"limit": 10,
"offset": 0
}响应
响应体
| 名称 | 类型 | 描述 |
|---|---|---|
code | int | 错误码,非 0 表示失败 |
msg | string | 错误描述 |
data | \- | - |
└ items | environment_variable\[\] | 环境变量列表 |
└ api_name | string | 环境变量 API 名称 |
└ label | label | 环境变量的名称 |
└ zh_cn | string | 中文内容 |
└ en_us | string | 英文内容 |
└ description | string | 描述 |
└ value | string | 返回 json marshal 后的字符串。 is_encrypted 为 「true」时,依然可以获取返回值 |
└ is_encrypted | boolean | 是否加密,「type」取值为 text, float 时才有效 |
└ object_api_name | string | 对象的 API 名称,「type」取值为 lookup, lookup_multi 时才有效 |
└ object_label | label | 对象的名称,「type」取值为 lookup, lookup_multi 时才有效 |
└ zh_cn | string | 中文内容 |
└ en_us | string | 英文内容 |
└ created_at | int | 「创建时间」,日期时间字段。 使用 Unix 时间戳,单位为毫秒 |
└ updated_at | int | 「更新时间」,日期时间字段。 使用 Unix 时间戳,单位为毫秒 |
└ type | string | 环境变量的类型,可取值范围有:lookup, lookup_multi, text, float 等 |
└ total | int | 符合查询条件的环境变量的总数 |
响应体示例
json
{
"code": 0,
"msg": "success",
"data": {
"items": [
{
"api_name": "globalParam_0b410b17704",
"label": {
"zh_cn": "示例文本",
"en_us": "Sample text"
},
"description": "Sample text",
"value": "[1757083131077684,1757085362739239,1757083720703032]",
"is_encrypted": false,
"object_api_name": "_user",
"object_label": {
"zh_cn": "示例文本",
"en_us": "Sample text"
},
"created_at": 1718350902019,
"updated_at": 1718350902019,
"type": "lookup"
}
],
"total": 1
}
}错误码
| HTTP状态码 | 错误码 | 描述 | 排查建议 |
|---|---|---|---|
| 400 | 2320001 | param is invalid | 请检查输入参数 |
