GetVariableGroup - Get a variable group

Updated at:

Retrieves a variable group by using OpenAPI.

Applicable editions

Central edition, Region edition

Endpoint and authorization information

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

Product

Resource

Required permission

Pipeline

Variable group

Read-only

Request syntax

Central edition

GET https://{domain}/oapi/v1/flow/organizations/{organizationId}/variableGroups/{id}

Region edition

GET https://{domain}/oapi/v1/flow/variableGroups/{id}

Request headers

Parameter

Type

Required

Description

Example value

x-yunxiao-token

string

Yes

Your personal access token.

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

Request parameters

Parameter

Type

Location

Required

Description

Example value

organizationId

string

path

  • Yes: Central edition

  • No: Region edition

The organization ID.

5ebbc0228123212b59xxxxx

id

integer

path

Yes

The variable group ID.

123

Request examples

Central edition

curl -X 'GET' \
  'https://{domain}/oapi/v1/flow/organizations/5ebbc0228123212b59xxxxx/variableGroups/123' \
  -H 'Content-Type: application/json' \
  -H 'x-yunxiao-token: pt-0fh3****0fbG_35af****0484'

Region edition

curl -X 'GET' \
  'https://{domain}/oapi/v1/flow/variableGroups/123' \
  -H 'Content-Type: application/json' \
  -H 'x-yunxiao-token: pt-0fh3****0fbG_35af****0484'

Response parameters

Parameter

Type

Description

Example value

-

object

createTime

integer

The creation time.

1586863220000

creatorAccountId

string

The Alibaba Cloud account ID of the creator.

1111111111111

description

string

The description of the variable group.

Variable group description

id

integer

The variable group ID.

1234

modifierAccountId

string

The Alibaba Cloud account ID of the last modifier.

1111111111111

name

string

The name of the variable group.

Host group

relatedPipelines

array

-

object

id

integer

The ID of an associated pipeline.

1586863220000

name

string

The name of an associated pipeline.

Pipeline

updateTime

integer

The last update time.

1586863220000

variables

array

-

object

isEncrypted

boolean

Whether the variable is encrypted.

true

name

string

The name of the variable.

name1

value

string

The value of the variable.

value1

Response example

{
    "createTime": 1586863220000,
    "creatorAccountId": "1111111111111",
    "description": "Variable group description",
    "id": 1234,
    "modifierAccountId": "1111111111111",
    "name": "Host group",
    "relatedPipelines": [
        {
            "id": 1586863220000,
            "name": "Pipeline"
        }
    ],
    "updateTime": 1586863220000,
    "variables": [
        {
            "isEncrypted": true,
            "name": "name1",
            "value": "value1"
        }
    ]
}

Error codes

For more information, see the error code center.