ListVariableGroups - Get a list of variable groups
Retrieves a list of variable groups using OpenAPI.
|
Applicable editions |
Central edition, Region edition |
Service Endpoints and Authorization Information
- Retrieve service endpoints: Replace {domain} in the API request syntax.
- Obtain a personal access token.
- Obtain the organization ID: This parameter is required only for the Central edition. You can obtain the organization ID from the Basic Information page in the Organization Management console.
|
Product |
Resource |
Required Permissions |
|
Pipeline |
Variable group |
Read-only |
Request Syntax
Central edition
GET https://{domain}/oapi/v1/flow/organizations/{organizationId}/variableGroups
Region edition
GET https://{domain}/oapi/v1/flow/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 |
|
organizationId |
string |
path |
|
The enterprise ID. |
5ebbc0228123212b59xxxxx |
|
perPage |
integer |
query |
No |
The number of data entries per page. Default is 10, maximum is 30. |
10 |
|
page |
integer |
query |
No |
The current page. Default is 1. |
1 |
|
pageSort |
string |
query |
No |
The sorting condition ID. |
ID |
|
pageOrder |
string |
query |
No |
The sorting order. DESC for descending, ASC for ascending. |
DESC |
Request Examples
Central edition
curl -X 'GET' \
'https://{domain}/oapi/v1/flow/organizations/5ebbc0228123212b59xxxxx/variableGroups?perPage=10&page=1&pageSort=ID&pageOrder=DESC' \
-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?perPage=10&page=1&pageSort=ID&pageOrder=DESC' \
-H 'Content-Type: application/json' \
-H 'x-yunxiao-token: pt-0fh3****0fbG_35af****0484'
Response Parameters
|
Parameter |
Type |
Description |
Example Value |
| - |
array |
|
|
| - |
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 ID of the variable group. |
1234 |
| modifierAccountId |
string |
The Alibaba Cloud account ID of the updater. |
1111111111111 |
| name |
string |
The name of the variable group. |
Host group |
| relatedPipelines |
array |
|
|
| - |
object |
|
|
| id |
integer |
The ID of the associated pipeline. |
1586863220000 |
| name |
string |
The name of the associated pipeline. |
Pipeline |
| updateTime |
integer |
The update time. |
1586863220000 |
| variables |
array |
|
|
| - |
object |
|
|
| isEncrypted |
boolean |
Indicates whether it is encrypted. |
true |
| name |
string |
The variable name. |
name1 |
| value |
string |
The variable value. |
value1 |
Response Examples
[
{
"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"
}
]
}
]
Response Headers
|
Parameter |
Description |
Example Value |
|
x-next-page |
The next page. |
3 |
|
x-page |
The current page. |
2 |
|
x-per-page |
The number of data entries per page. |
10 |
|
x-prev-page |
The previous page. |
1 |
|
x-total |
The total data volume. |
100 |
|
x-total-pages |
The total number of pages. |
10 |
Error Codes
For more information about API-related error codes, see the Error Code Center.