GetAppVariableGroups - Get details of variable groups for an application

Updated at:

Applicable versions

Central Edition and Region Edition

Endpoint and authorization information

  • Obtain an endpoint. Replace {domain} in the request syntax.
  • Obtain a personal access token.
  • Obtain the organizationId. This parameter is required only for the Central Edition. Go to the Basic Information page in the Tenant 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}/variableGroups

Region Edition

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

Request headers

Parameter

Type

Required

Description

Example value

x-yunxiao-token

string

Yes

Personal access token.

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

Request parameters

Parameter

Type

Location

Required

Description

Example value

appName

string

path

Yes

The application name.

my-web-service

organizationId

string

path

  • Yes: Central Edition

  • No: Region Edition

The ID of the organization.

ec766e63aee3437d9a51f334d6exe671

Request examples

Central Edition

curl -X 'GET' \
  'https://{domain}/oapi/v1/appstack/organizations/ec766e63aee3437d9a51f334d6exe671/apps/my-web-service/variableGroups' \
  -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/variableGroups' \
  -H 'Content-Type: application/json' \
  -H 'x-yunxiao-token: pt-0fh3****0fbG_35af****0484'

Response parameters

Parameter

Type

Description

Example value

-

array

-

object

A record of the variable group version.

displayName

string

The display name of the variable group.

dev-xxxx

name

string

The name of the variable group.

dev

revision

object

Version information.

author

string

The committer.

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

commitTime

number

The commit time.

1.63e+12

message

string

The commit message.

message-xxxx

refs

array[string]

Associated information.

repoMeta

object

Repository information.

name

string

The name of the repository.

my-repo

type

string

The type of the repository.

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.