Deploy applications
Learn how to use the EnterpriseEngage Deployments API to deploy all or selected EnterpriseEngage applications.
All the sample requests in this guide include the following path parameters:
| Parameter name | Description |
|---|---|
tenantId | Your tenant ID. |
starsystem | ID of a star system that includes the EnterpriseEngage applications that you deploy. |
planetId | ID of a planet to which you deploy applications. |
Get a list of builds
To list all the builds for a particular EnterpriseEngage application within a star system, send the following GET request:
curl -X 'GET' \
'{baseURL}/api/v2/tenants/{tenant}/starsystems/{starsystem}/applications/{application}/builds' \
-H 'accept: application/json' \
-H 'Authorization: Bearer {access_token}'
A response contains a JSON object with a list of available builds:
[
{
"uuid": "550e8400-e29b-41d4-a716-446655440000",
"buildNumber": 199,
"buildId": 986547,
"planet": "digidev",
"status": "SUCCESSFUL",
"gitInfo": {
"branch": "refs/heads/master",
"commitHash": "20adef2eea46f78f03d42907554060415d37123"
},
"link": "https://teamcity.acme.abc.guidewire.net/buildConfiguration/AcmeDev_DigitalPortals_BuildApplication/986547\n"
},
{
"uuid": "550e8400-e29b-41d4-a716-446655440000",
"buildNumber": 199,
"buildId": 123456,
"planet": "digidev",
"status": "SUCCESSFUL",
"gitInfo": {
"branch": "refs/heads/master",
"commitHash": "20adef2eea46f78f03d42907554060415d37123"
},
"link": "https://teamcity.acme.abc.guidewire.net/buildConfiguration/AcmeDev_DigitalPortals_BuildApplication/123456\n"
}
]
Deploy the applications
To deploy all or selected applications, send the following POST request:
curl -X 'POST' \
'{baseURL}/api/v2/tenants/{tenant}/starsystems/{starsystem}/planets/{planet}/activities/deployments' \
-H 'Content-Type:application/json' \
-H 'Authorization: Bearer {access_token}' \
-d '{body}'
Where {body} is an array of objects that represent EnterpriseEngage applications to deploy. For example, to deploy CustomerEngage Quote and Buy and CustomerEngage Account Management, use:
{
"timeout": 600,
"appInstances": [
{
"appId": "quote-and-buy",
"buildId": 123456,
"configOverride": {
"settings": {
"deploymentType": "CDN",
"rateLimits": {
"value": 60,
"unit": "MINUTE"
},
"apiTimeout": 60000
},
"parameters": {
"envVars": {
"var1": "val1",
"var2": "val2"
},
"responseHeaders": {
"Strict-Transport-Security": "max-age=31536000;",
"Access-Control-Allow-Origin": "*",
"X-GW-FooBar": "Baz"
},
"accessControlExposeHeaders": ["some-header", "another-header"]
},
"domains": ["some.domain.com"]
}
},
{
"appId": "account-manager",
"buildId": 123456,
"configOverride": {
"settings": {
"deploymentType": "CDN",
"rateLimits": {
"value": 60,
"unit": "MINUTE"
},
"apiTimeout": 60000
},
"parameters": {
"envVars": {
"var1": "val1",
"var2": "val2"
},
"responseHeaders": {
"Strict-Transport-Security": "max-age=31536000;",
"Access-Control-Allow-Origin": "*",
"X-GW-FooBar": "Baz"
},
"accessControlExposeHeaders": ["some-header", "another-header"]
},
"domains": ["some.domain.com"]
}
}
]
}
A response contains a JSON object with an activity ID.
{
"uuid": "000xx00-x0xx-0x00-0x0x-xx000x0x0x0xxx"
}
GET method only. To use other methods, for example, for performance tests, add api. in the application URL:<app-id>-<tenant>-<project>-<env>.api.<cluster>.guidewire.netFor details, see Application URL in GWCP documentation.
Check the deployment status
To check if the deployment is completed, send the following GET request:
curl -X 'GET' \
'{baseURL}/api/v2/tenants/{tenant}/starsystems/{starsystem}/planets/{planet}/activities/{uuid}' \
-H 'accept: application/json' \
-H 'Authorization: Bearer {access_token}' \
As {uuid}, enter the activity ID that you received in a response to the POST deployment request.
A response contains a JSON object with the activity details. The deployment is completed when the value of status is SUCCESSFUL. If the deployment fails, you can try to deploy the applications with different builds.
{
"uuid": "000xx00-x0xx-0x00-0x0x-xx000x0x0x0xxx",
"activityType": "DEPLOYMENT",
"status": "SUCCESSFUL",
"startedOn": "2019-08-24T14:15:22Z",
"completedOn": "2019-08-24T14:15:22Z",
"triggeredBy": "string",
"tenant": "string",
"starsystem": "string",
"planet": "string",
"duration": 0,
"timeout": 600,
"source": "REST",
"tasks": [
{
...
}
]
}