Append to a Cache Variable Value
PagerDuty AIOps
Availability
This workflow action is available to AIOps customers on our Business and Enterprise for Incident Management pricing plans. Please contact our Sales Team to upgrade to an account with this action.
Description
Use the REST API to append a specific value to the end of an existing Event Orchestration Cache Variable value, and reset the TTL counter. In order to publish a usable action, you must have API access with WRITE permissions for the Event Orchestration that the Cache Variable belongs to.
Action Limitations
- The existing Cache Variable value must follow JSON array formatting for the action to successfully complete:
'["SERVER1","\"SERVER\" 2","SERVER3"]'
- The Cache Variable being set must be of theExternal Data Variable Type and String Data Format.
- The value set must match a String Data Format.
- The Cache Variable being set will follow all existing Product Limitations.
- If the provided string does not exist in the Cache Variable, the workflow will not attempt to update the value.
Examples
See how you can use this action within a larger use case to stop system events from auto-resolving high priority incidents.
Prerequisites
- Create a new API Access Key with WRITE access to the relevant Event Orchestration. Ensure that you save this API Key during the creation process, as you will not have access to the value again.
- Create a Web API Workflow Integration. The fields within the Web API Workflow Integration must follow specific configurations for this action:
- Authentication Headers: Use the exact format below and replace “VALUE OF API KEY HERE” with the API Access Key generated above:
Authentication: Token token={VALUE OF API KEY HERE}
- Allowed Hostnames: Ensure that you include your PagerDuty account’s subdomain as one of the hostnames:
*.pagerduty.com
- Authentication Headers: Use the exact format below and replace “VALUE OF API KEY HERE” with the API Access Key generated above:
- Create a Cache Variable with the External Data Variable Type in an existing Event Orchestration.
Instructions
- If you have not done so already, please follow our instructions to Create an Incident Workflow.
- Select a Conditional or Manual Trigger, depending on if you’d like the Cache Variable value to be updated automatically or manually by a user
- When you are prompted to add actions, select this action.
- Enter the following Inputs and then click Save. Continue following instructions to Publish the Workflow. When the action runs, you will see the Outputs listed below.
Inputs
Field References
Fields with the {+} icon accept Field References, which can be useful for referencing incident data or outputs created in prior workflow steps. To add Field References, click {+}, or enter
{{
, and select relevant fields. Please see our Field References article for more information.
Name | Description |
---|---|
Authentication Headers | Select the connection created in Prerequisites. |
Event Orchestration Type | Select the type of Event Orchestration (Global or Service) that the Cache Variable belongs to. |
Event Orchestration | Select the Event Orchestration that the Cache Variable belongs to. |
Cache Variable | Based on the selected Event Orchestration, select the Cache Variable whose value the workflow will update. Note: You can only select variables with the External Data Variable Type and String Data Format. |
Value | Enter the value that shall be appended to the end of the existing Cache Variable value. This value must be the same data format as the Cache Variable. |
Outputs
Name | Description |
---|---|
Value | A string representation of the new value of this Cache Variable. |
Details | Details about the new value of this Cache Variable. Example: { "cache_variable_data": "hello", "updated_at": "2025-02-21T23:46:08Z" } |
Result | Value that shows if the action was successful or not. Either "Success" or "Failed". |
Result Summary | Brief description of what the action did or if it failed. |
Error | Brief description that is populated if the action failed. |
Updated about 2 hours ago