Get details of activities and application instances
Learn how to use EnterpriseEngage API to get the following details:
- A list of all the activities for a planet.
- Details of an activity and its tasks.
- A list of application instances for a planet.
- Details of an application instance.
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 activities
To list all the deployments and undeployments for an EnterpriseEngage application within a planet, send the following GET
request:
curl -X 'GET' \
'{baseURL}/api/v2/tenants/{tenant}/starsystems/{starsystem}/planets/{planet}/activities' \
-H 'accept: application/json' \
-H 'Authorization: Bearer {access_token}'
A response contains a list of deployments and undeployments and their details. The activities are sorted from the most recent to the oldest ones.
[
{
"activities": [
{
"uuid": "0x0xx0xx-x00x-0000-0x0x-00000xx0x00x",
"activityType": "DEPLOYMENT",
"activityStatus": "ONGOING",
"startedOn": "2024-06-19T13:16:08.811141Z",
"completedOn": null,
"triggeredBy": "user@example.com",
"tenant": "abc",
"starsystem": "dev",
"planet": "dev",
"duration": null,
"timeout": 600,
"applications": [
"quote-and-buy"
]
},
{
"uuid": "0x0xx0xx-x00x-0000-0x0x-00000xx0x00x",
"activityType": "UNDEPLOYMENT",
"activityStatus": "SUCCESSFUL",
"startedOn": "2024-06-19T12:18:11.203469Z",
"completedOn": "2024-06-19T12:18:35.091468Z",
"triggeredBy": "user@example.com",
"tenant": "abc",
"starsystem": "dev",
"planet": "dev",
"duration": 23,
"timeout": 600,
"applications": [
"producer-engage",
"service-rep-engage"
]
},
...
],
"totalRecords": null
}
]
totalRecords
parameter is set to null
by default. To get the total number of all the activities on a planet, change includeTotal
parameter to true
in the request body.
Get activity details
To list details of an activity and its tasks, 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}'
Where {uuid}
is the unique ID of an activity which you can get from:
- The
GET
method that lists all the activities for a planet. - A response body to the
POST
method that starts the deployment.
A response contains activity details and a list of tasks that were performed during this activity.
{
"uuid": "0x0xx0xx-x00x-0000-0x0x-00000xx0x00x",
"activityType": "DEPLOYMENT",
"status": "SUCCESSFUL",
"startedOn": "2024-06-19T13:33:28.568Z",
"completedOn": "2024-06-19T13:33:28.568Z",
"triggeredBy": "string",
"tenant": "string",
"starsystem": "string",
"planet": "string",
"duration": 0,
"timeout": 600,
"source": "REST",
"tasks": [
{
"appId": "string",
"displayName": "string",
"buildNumber": 0,
"version": "string",
"branch": "string",
"commitHash": "string",
"status": "REQUESTED",
"startedOn": "2024-06-19T13:33:28.568Z",
"completedOn": "2024-06-19T13:33:28.568Z",
"duration": 0,
"configuration": {
"settings": {
"deploymentType": "CDN",
"rateLimits": {
"value": 60,
"unit": "MINUTE"
},
"apiTimeout": 70000
},
"parameters": {
"envVars": {
"key1": "key",
"key2": "value"
},
"responseHeaders": {
"Referrer-Policy": "no-referrer",
"X-Frame-Options": "DENY"
},
"accessControlExposeHeaders": ["Accept", "X-Authorization"]
},
"domains": ["string"]
},
"errorCodes": ["string"]
}
]
}
Get a list of application instances
To list application instances deployed on a planet, send the following GET
request:
curl -X 'GET' \
'{baseURL}/api/v2/tenants/{tenant}/starsystems/{starsystem}/planets/{planet}/appInstances' \
-H 'accept: application/json' \
-H 'Authorization: Bearer {access_token}'
A response contains a list of the deployed application instances with details.
{
"apps": [
{
"name": "ServiceRepEngage",
"id": "service-rep-engage",
"domains": [
"service-rep-engage-abc-dev-dev.api.mdev.guidewire.net"
],
"appVersion": "2024.2.0",
"branch": "refs/heads/main",
"commitHash": "19c98df246c1b797d9bf37b3487fcc5d71ae33d6",
"buildNumber": 19,
"buildId": 12345,
"updatedBy": "user@example.com",
"updatedOn": "2024-06-19T12:18:14.232964Z",
"lastActivity": "UNDEPLOYMENT",
"state": "STARTING",
"lastStateUpdate": "2024-06-19T12:18:13.608518Z",
"errorCodes": [],
"deploymentType": "APIGW"
},
{
"name": "ProducerEngage",
"id": "producer-engage",
"domains": [
"test.e2edev.abc.testapp.site"
],
"appVersion": "2024.2.0",
"branch": "refs/heads/user/branch-name",
"commitHash": "a94b6027cffb76c645eac5702c75d2febb9128c5",
"buildNumber": 47,
"buildId": 12345,
"updatedBy": "user@example.com",
"updatedOn": "2024-06-19T13:18:30.892179Z",
"lastActivity": "DEPLOYMENT",
"state": "AVAILABLE",
"lastStateUpdate": "2024-06-19T13:28:02.204001Z",
"errorCodes": [],
"deploymentType": "CDN"
},
...
]
}
Where:
buildNumber
is an ordinal numeral that TeamCity assigns to a build. There can be many builds with the samebuildNumber
across your TeamCity projects.buildID
is a unique combination of digits that TeamCity assigns to a build. Each build has its ownbuildID
. You need it to make requests with the EnterpriseEngage Deployments API.
Get application instance details
To list all the details for a particular application instance, send the following GET
request:
curl -X 'GET' \
'{baseURL}/api/v2/tenants/{tenant}/starsystems/{starsystem}/planets/{planet}/applications/{application}/appInstances' \
-H 'accept: application/json' \
-H 'Authorization: Bearer {access_token}'
A response contains the application instance details.
{
"buildId": 123456,
"project": "dev",
"planet": "dev",
"application": "quote-and-buy",
"branch": "ref/heads/user/branch-name",
"commitHash": "467adbd523fcc",
"lastActivity": "DEPLOYED",
"state": "AVAILABLE",
"instanceConfig": {
"settings": {
"deploymentType": "CDN",
"rateLimits": {
"value": 5,
"unit": "MINUTE"
},
"apiTimeout": 70000
},
"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": ["p-e.testinsurance.example", "testinsurance.example"]
}
}