GetGlobalVar - Get global variable group
Supported editions | centralized edition, region-specific edition |
Service endpoint and authorization
- Get a service endpoint: Replace
{domain}in the request syntax. - Get a personal access token.
- Get the
organizationId: Required only for the centralized edition. To find it, go to the Basic Information page in the Organization Management console.
Product | Resource | Required permission |
App Delivery | global variable group | Read-only |
Request syntax
Centralized edition
GET https://{domain}/oapi/v1/appstack/organizations/{organizationId}/globalVars/{name}
Region-specific edition
GET https://{domain}/oapi/v1/appstack/globalVars/{name}
Request headers
Parameter | Type | Required | Description | Example |
x-yunxiao-token | string | Yes | The personal access token for Alibaba Cloud DevOps. | pt-0fh3****0fbG_35af****0484 |
Request parameters
Parameter | Type | Location | Required | Description | Example |
name | string | path | Yes | The name of the global variable group. | my-global-var-group |
revisionSha | string | query | No | The revision of the global variable group. | my-revision-sha |
organizationId | string | path |
| The ID of the organization. | ec766e63aee3437d9a51f334d6exe671 |
Request examples
Centralized edition
curl -X 'GET' \
'https://{domain}/oapi/v1/appstack/organizations/ec766e63aee3437d9a51f334d6exe671/globalVars/my-global-var-group?revisionSha=my-revision-sha' \
-H 'Content-Type: application/json' \
-H 'x-yunxiao-token: pt-0fh3****0fbG_35af****0484'
Region-specific edition
curl -X 'GET' \
'https://{domain}/oapi/v1/appstack/globalVars/my-global-var-group?revisionSha=my-revision-sha' \
-H 'Content-Type: application/json' \
-H 'x-yunxiao-token: pt-0fh3****0fbG_35af****0484'
Response parameters
Parameter | Type | Description | Example |
| - | object | The global variable group object. | |
| content | array | A list of variables in the global variable group. | |
| - | object | The variable object. | |
| description | string | The description of the variable. | namespace |
| key | string | The key of the variable. | namespace |
| value | string | The value of the variable. | default |
| creator | string | The creator of the global variable group. | 10df6011-2837-4fdb-ad92-356a679a60ca |
| displayName | string | The display name of the global variable group. | my-display-name |
| gmtCreate | string | The time the global variable group was created. | 2024-01-01 00:00:00 |
| gmtModified | string | The time the global variable group was last modified. | 2024-01-01 00:00:00 |
| modifier | string | The user who last modified the global variable group. | 10df6011-2837-4fdb-ad92-356a679a60ca |
| name | string | The name of the global variable group. | my-global-var-group |
| revision | object | The revision information. | |
| author | string | The commit author. | 10df6011-2837-4fdb-ad92-356a679a60ca |
| commitTime | number | The commit time, in Unix timestamp format. | 1.63e+12 |
| message | string | The commit message. | message-xxxx |
| refs | array[string] | Associated references. | |
| repoMeta | object | The repository information. | |
| name | string | The name of the repository. | my-repo |
| type | string | The type of the repository. | VARIABLE |
| sha | string | The SHA hash of the revision. | a80102ee37cca462a23865e7a3e66ac1ca032a5c |
Response example
{
"content": [
{
"description": "namespace",
"key": "namespace",
"value": "default"
}
],
"creator": "10df6011-2837-4fdb-ad92-356a679a60ca",
"displayName": "my-display-name",
"gmtCreate": "2024-01-01 00:00:00",
"gmtModified": "2024-01-01 00:00:00",
"modifier": "10df6011-2837-4fdb-ad92-356a679a60ca",
"name": "my-global-var-group",
"revision": {
"author": "10df6011-2837-4fdb-ad92-356a679a60ca",
"commitTime": 1.63e+12,
"message": "message-xxxx",
"refs": [
],
"repoMeta": {
"name": "my-repo",
"type": "VARIABLE"
},
"sha": "a80102ee37cca462a23865e7a3e66ac1ca032a5c"
}
}
Error codes
See the Error Code Center for API-related error codes.