ListGlobalVars - Query the list of global variable groups

Updated at:

Applicable versions

Central Edition, Region Edition

Endpoints and authorization information

  • Obtain an endpoint to replace the `{domain}` variable in the API request syntax.
  • Obtain a personal access token.
  • Obtain the organizationId. This parameter is required for the Central Edition only. You can obtain the organization ID on the Basic Information page in the Tenant Management console.

Product

Resource

Required permission

Application Delivery

Global variable group

Read-only

Request syntax

Central Edition

POST https://{domain}/oapi/v1/appstack/organizations/{organizationId}/globalVars:search

Region Edition

POST https://{domain}/oapi/v1/appstack/globalVars:search

Request headers

Parameter

Type

Required

Description

Example

x-yunxiao-token

string

Yes

Personal access token.

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

Request parameters

Parameter

Type

Location

Required

Description

Example

current

number

query

Yes

The current page number.

1

pageSize

number

query

Yes

The number of entries per page.

10

organizationId

string

path

  • Yes: Central Edition

  • No: Region Edition

The organization ID.

ec766e63aee3437d9a51f334d6exe671

-

object

body

No

The request to query the global variable group.

search

string

body

No

The search keyword.

search-text

Request examples

Central Edition

curl -X 'POST' \
  'https://{domain}/oapi/v1/appstack/organizations/ec766e63aee3437d9a51f334d6exe671/globalVars:search?current=1&pageSize=10' \
  -H 'Content-Type: application/json' \
  -H 'x-yunxiao-token: pt-0fh3****0fbG_35af****0484' \
  --data '
    {
        "search": "search-text"
    }'

Region Edition

curl -X 'POST' \
  'https://{domain}/oapi/v1/appstack/globalVars:search?current=1&pageSize=10' \
  -H 'Content-Type: application/json' \
  -H 'x-yunxiao-token: pt-0fh3****0fbG_35af****0484' \
  --data '
    {
        "search": "search-text"
    }'

Response parameters

Parameter

Type

Description

Example

-

object

The paging data.

current

number

The current page number.

1

pageSize

number

The number of entries per page.

10

pages

number

The total number of pages.

10

records

array

The list of data.

-

object

Information about the global variable.

creatorId

string

The creator.

creator-id

displayName

string

The display name of the global variable.

display-name-xxx

gmtCreate

string

The time at which the resource was created.

2024-09-01 00:00:00

gmtModified

string

Last modified

2024-09-01 00:00:00

modifierId

string

The modifier.

modifier-id

name

string

The name of the global variable.

name-xxx

ownerId

string

The ID of the owner.

owner-id

usageReferences

array

References to the global variable.

-

object

A reference to the global variable.

globalVarName

string

The name of the global variable.

global-var-name

usageRefObject

object

A global variable holds a reference to an object.

usageRefType

string

The reference data type of the global variable. Valid values: `AppEnv`, `AppTemplateWorkflowStage`, `AppWorkflowStage`, and `AppTemplateEnv`.

AppEnv

total

number

The total number of entries.

10

Response example

{
    "current": 1,
    "pageSize": 10,
    "pages": 10,
    "records": [
        {
            "creatorId": "creator-id",
            "displayName": "display-name-xxx",
            "gmtCreate": "2024-09-01 00:00:00",
            "gmtModified": "2024-09-01 00:00:00",
            "modifierId": "modifier-id",
            "name": "name-xxx",
            "ownerId": "owner-id",
            "usageReferences": [
                {
                    "globalVarName": "global-var-name",
                    "usageRefObject": {
                    },
                    "usageRefType": "AppEnv"
                }
            ]
        }
    ],
    "total": 10
}

Error codes

For API-related error codes, see the Error Code Center.