Remove from 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 remove a specific value from an existing Event Orchestration Cache Variable. This will only remove the specified value, and will not delete the entire value. The comparison is case-insensitive and will remove all occurrences of the specified value. In addition, the TTL counter for the Cache Variable will reset only when the value has been successfully removed. 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 External 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

  1. 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.
  2. Create a Web API Workflow Integration. The fields within the Web API Workflow Integration must follow specific configurations for this action:
    1. Authentication Headers: Use the exact format below and replace “VALUE OF API KEY HERE” with the API Access Key generated above:
      1. Authentication: Token token={VALUE OF API KEY HERE}
    2. Allowed Hostnames: Ensure that you include your PagerDuty account’s subdomain as one of the hostnames:
      1. *.pagerduty.com
  3. Create a Cache Variable with an External Data Variable Type in an existing Event Orchestration.

Instructions

  1. If you have not done so already, please follow our instructions to Create an Incident Workflow.
  2. 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
  3. When you are prompted to add actions, select this action.
  4. 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.

NameDescription
Authentication HeadersSelect the connection created in Prerequisites.
Event Orchestration TypeSelect the type of Event Orchestration (Global or Service) that the Cache Variable belongs to.
Event OrchestrationSelect the Event Orchestration that the Cache Variable belongs to.
Cache VariableBased on the selected Event Orchestration, select the Cache Variable whose value the workflow will update. Note: You can only select variables with External Data Variable Type and String Data Format .
ValueEnter the value that shall be removed from this Cache Variable. This value must be the same data format as the Cache Variable.

Outputs

NameDescription
ValueA string representation of the new value of this Cache Variable.
DetailsDetails about the new value of this Cache Variable. Example: { "cache_variable_data": "hello", "updated_at": "2025-02-21T23:46:08Z" }
ResultValue that shows if the action was successful or not. Either "Success" or "Failed".
Result SummaryBrief description of what the action did or if it failed.
ErrorBrief description that is populated if the action failed.