How to Export Platform Execution Data

By Stephen Hanzlik in Product Updates, GET/technical Posted Dec 17, 2018

For security reasons, Cloud Elements only retains customer execution data for 72 hours. This time window generally works for developing and troubleshooting formulas. But what happens when you want to retain this information? Or if you are debugging complex issues that take longer than 72 hours? In these cases you can make use of the Cloud Elements Platform API to extract your executions, steps, and step values as JSON. It should be noted that these endpoints will only return step and step value data for executions that happened within the last 72 hours. If you wish to retain this data you must do so before the 72 hour window closes.

In order to export an individual execution, you must know the execution id you want to extract. This can be accomplished using the following two endpoints.

1. First, you will take the execution id of the execution you are interested in extracting and add it as a parameter to the GET/formulas/instances/executions/{executionId} endpoint. Remember you will only be able to get steps and step values for executions with an updated date within the last 72 hours. You can expect to see a payload that contains the steps from the execution, the status of the execution, the element instance id, as well as the created and updated dates. It looks like this:

 

2. With this endpoint you have extracted all the platform information associated with that execution as well as the steps that were executed. In order to get the step values you will need to use one more endpoint, GET/formulas/instances/executions/steps/{stepExecutionId}/values. This endpoint will take the step execution id as a parameter and will return a payload containing the key and value for each step. You will need to perform this call for each step value that you would like to retrieve from our platform and can expect to see a payload like this:

 

Next Steps

We have reviewed how to extract executions and their associated steps and step values from our platform. While you can easily extract the JSON and retain it for future use, it can be hard to view this raw data and make sense of the relational nature of the JSON you are seeing. Some users create a GUI or another type of tool that will allow for easy navigation though this relational data. Visit the Cloud Elements Support Portal for additional documentation and tutorials.