查询环境变量详情
查询基于飞书 aPaaS 开发的应用的环境变量详情,包括名称、描述、变量值等
请求
| 项目 | 值 |
|---|---|
| HTTP URL | https://open.feishu.cn/open-apis/apaas/v1/applications/:namespace/environment_variables/:environment_variable_api_name |
| HTTP Method | GET |
| 接口频率限制 | 10 次/秒 |
| 支持的应用类型 | custom,isv |
| 权限要求 调用该 API 所需的权限。开启其中任意一项权限即可调用 | app_engine:application.environment_variable:read 查询环境变量 |
请求头
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
| Authorization | string | 是 | tenant_access_token 值格式:"Bearer access_token" 示例值:"Bearer t-7f1bcd13fc57d46bac21793a18e560" 了解更多:如何选择与获取 access token |
路径参数
| 名称 | 类型 | 描述 |
|---|---|---|
namespace | string | 应用命名空间 示例值:"package_test__c" |
environment_variable_api_name | string | 环境变量 API 名称 示例值:"globalParam_0b410b17704" |
响应
响应体
| 名称 | 类型 | 描述 |
|---|---|---|
code | int | 错误码,非 0 表示失败 |
msg | string | 错误描述 |
data | \- | - |
└ item | 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 等 |
响应体示例
json
{
"code": 0,
"msg": "success",
"data": {
"item": {
"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"
}
}
}错误码
| HTTP状态码 | 错误码 | 描述 | 排查建议 |
|---|---|---|---|
| 400 | 2320001 | param is invalid | 请检查输入参数 |
