GetVariableGroup - Query the details of a variable group

Updated at:

Applicable versions

Central Edition, Region Edition

Endpoint and authorization information

  • Get an endpoint: Replace {domain} in the API request syntax.
  • Get a personal access token.
  • Obtain the organization ID: Required only for the Central Edition. Go to the Basic Information page in the Organization Management console to obtain the organization ID.

Product

Resource

Required permission

Application Delivery

Variable group

read-only

Request syntax

Central Edition

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

Region Edition

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

Request headers

Parameter

Type

Required

Description

Example

x-yunxiao-token

string

Yes

The personal access token.

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

Request parameters

Parameter

Type

Position

Required

Description

Example

appName

string

path

Yes

The application name.

my-web-service

variableGroupName

string

path

Yes

The variable group name.

dev

organizationId

string

path

  • Yes: Central Edition

  • No: Region Edition

The organization ID.

ec766e63aee3437d9a51f334d6exe671

Request examples

Central Edition

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 Edition

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'

Response parameters

Parameter

Type

Description

Example

-

object

The version record of the variable group.

displayName

string

The display name of the variable group.

dev-xxxx

name

string

The name of the variable group.

dev

revision

object

The version information.

author

string

The committer.

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

commitTime

number

The time of the commit.

1.63e+12

message

string

The commit message.

message-xxxx

refs

array[string]

The associated information.

repoMeta

object

The repository information.

name

string

The repository name.

my-repo

type

string

The repository type.

VARIABLE

sha

string

The SHA value of the version.

a80102ee37cca462a23865e7a3e66ac1ca032a5c

type

string

The type. Valid values: GLOBAL, TEMPLATE, and APP.

GLOBAL

vars

array

The list of variables.

-

object

The variable model.

description

string

The description of the variable.

namespace

key

string

The key of the variable.

namespace

value

string

The value of the variable.

default

Response example

{
    "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": "namespace",
            "key": "namespace",
            "value": "default"
        }
    ]
}

Error codes

For information about API error codes, see the Error Code Center.