GetAppOrchestrationExport - Export application orchestration
Applicable versions | Central version, Region version |
Endpoints and authorization information
- Get the endpoint: Replace {domain} in the API request syntax.
- Get a personal access token.
- Get organizationId: Required for Central version only. Go to the Basic Information page in the Organization Management console to obtain your organization ID.
Product | Resource | Required permission |
Application Delivery | Application orchestration | Read-only |
Request syntax
Central version
GET https://{domain}/oapi/v1/appstack/organizations/{organizationId}/apps/{appName}/orchestrations:export
Region version
GET https://{domain}/oapi/v1/appstack/apps/{appName}/orchestrations:export
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 | Application name. | my-web-service |
organizationId | string | path |
| Organization ID. | bd9e3c6d-xxxxxxxc5e26f1ed0f0 |
envName | string | query | No | Environment name. | dev |
profileNames | string | query | No | Application variable group names. Separate multiple names with commas. | dev,test |
renderType | string | query | Yes | Rendering type. Valid values are MANIFEST and CHARTS. MANIFEST returns native YAML. CHARTS returns Helm Charts. | MANIFEST |
suitableResourceType | string | query | Yes | Target resource type. Valid values are KUBERNETES and HOST. KUBERNETES is for Kubernetes deployments. HOST is for host deployments. | KUBERNETES |
sha | string | query | Yes | Commit SHA of the orchestration version. Get this value from the ListAppOrchestration API. | d23ccbd926c31e3cxxxxxxx3f22c4548b93b1426e |
Request examples
Central version
curl -X 'GET' \
'https://{domain}/oapi/v1/appstack/organizations/bd9e3c6d-xxxxxxxc5e26f1ed0f0/apps/my-web-service/orchestrations:export?envName=dev&profileNames=dev,test&renderType=MANIFEST&suitableResourceType=KUBERNETES&sha=d23ccbd926c31e3cxxxxxxx3f22c4548b93b1426e' \
-H 'Content-Type: application/json' \
-H 'x-yunxiao-token: pt-0fh3****0fbG_35af****0484'
Region version
curl -X 'GET' \
'https://{domain}/oapi/v1/appstack/apps/my-web-service/orchestrations:export?envName=dev&profileNames=dev,test&renderType=MANIFEST&suitableResourceType=KUBERNETES&sha=d23ccbd926c31e3cxxxxxxx3f22c4548b93b1426e' \
-H 'Content-Type: application/json' \
-H 'x-yunxiao-token: pt-0fh3****0fbG_35af****0484'
Response parameters
Parameter | Type | Description | Example value |
- | object | Response for exporting application orchestration. | { |
Response example
{
"demo-deployment.yaml": "---\\napiVersion: apps/v1\\nkind: Deployment\\nmetadata:\\n name: k8s-111-dev\\n labels:\\n run: k8s-111-dev\\n namespace: default\\nspec:\\n replicas: 1\\n selector:\\n matchLabels:\\n run: k8s-111-dev\\n template:\\n metadata:\\n labels:\\n run: k8s-111-dev\\n spec:\\n containers:\\n - name: main\\n image: NULL\\n ports:\\n - containerPort: 8080\\n resources:\\n limits:\\n cpu: 1\\n memory: 1024Mi\\n requests:\\n cpu: 0.01\\n memory: 32Mi",
"demo-service.yaml": "---\\napiVersion: v1\\nkind: Service\\nmetadata:\\n name: k8s-111-dev\\n namespace: default\\nspec:\\n selector:\\n run: k8s-111-dev\\n ports:\\n - protocol: TCP\\n port: 80\\n targetPort: 8080"
}
Error codes
For more information, see the Error Code Center.