GetVariableGroup - 查询变量组详情

更新时间:
复制 MD 格式

适用版本

中心版、Region

服务接入点与授权信息

产品

资源

所需权限

应用交付

变量组

只读

请求语法

中心版

GET https://{domain}/oapi/v1/appstack/organizations/{organizationId}/apps/{appName}/variableGroup/{variableGroupName}

Region

GET https://{domain}/oapi/v1/appstack/apps/{appName}/variableGroup/{variableGroupName}

请求头

参数

类型

是否必填

描述

示例值

x-yunxiao-token

string

个人访问令牌。

pt-0fh3****0fbG_35af****0484

请求参数

参数

类型

位置

是否必填

描述

示例值

appName

string

path

应用名。

my-web-service

variableGroupName

string

path

变量组名。

dev

organizationId

string

path

  • 是:中心版

  • 否:Region

组织 ID。

ec766e63aee3437d9a51f334d6exe671

请求示例

中心版

curl -X 'GET' \
  'https://{domain}/oapi/v1/appstack/organizations/ec766e63aee3437d9a51f334d6exe671/apps/my-web-service/variableGroup/dev' \
  -H 'Content-Type: application/json' \
  -H 'x-yunxiao-token: pt-0fh3****0fbG_35af****0484'

Region

curl -X 'GET' \
  'https://{domain}/oapi/v1/appstack/apps/my-web-service/variableGroup/dev' \
  -H 'Content-Type: application/json' \
  -H 'x-yunxiao-token: pt-0fh3****0fbG_35af****0484'

返回参数

参数

类型

描述

示例值

-

object

变量组版本记录。

displayName

string

变量组展示名称。

dev-xxxx

name

string

变量组名称。

dev

revision

object

版本信息。

author

string

提交人。

10df6011-2837-4fdb-ad92-356a679a60ca

commitTime

number

提交时间。

1.63e+12

message

string

版本提交信息。

message-xxxx

refs

array[string]

关联信息。

repoMeta

object

仓库信息。

name

string

仓库名称。

my-repo

type

string

仓库类型。

VARIABLE

sha

string

版本 sha 值。

a80102ee37cca462a23865e7a3e66ac1ca032a5c

type

string

类型,可能的值:[GLOBAL TEMPLATE APP]。

GLOBAL

vars

array

变量列表。

-

object

变量模型。

description

string

变量描述。

命名空间

key

string

变量键。

namespace

value

string

变量值。

default

返回示例

{
    "displayName": "dev-xxxx",
    "name": "dev",
    "revision": {
        "author": "10df6011-2837-4fdb-ad92-356a679a60ca",
        "commitTime": 1.63e+12,
        "message": "message-xxxx",
        "refs": [
            
        ],
        "repoMeta": {
            "name": "my-repo",
            "type": "VARIABLE"
        },
        "sha": "a80102ee37cca462a23865e7a3e66ac1ca032a5c"
    },
    "type": "GLOBAL",
    "vars": [
        {
            "description": "命名空间",
            "key": "namespace",
            "value": "default"
        }
    ]
}

错误码

访问错误码中心查看 API 相关错误码。