> Documentation index for AI agents: https://docs.pagerduty.com/llms.txt

# Update Data for an External Data Cache Variable on a Global Event Orchestration

`PUT https://api.pagerduty.com/event_orchestrations/{id}/cache_variables/{cache_variable_id}/data`

Update data for an `external_data` type Cache Variable on a Global Event Orchestration

Use External Data type Cache Variables to store string, number, or boolean values via a dedicated API endpoint. These stored values can then be used in conditions or actions in Event Orchestration rules.

For more information see the [Knowledge Base](https://support.pagerduty.com/main/docs/event-orchestration-cache-variables)

Scoped OAuth requires: `event_orchestrations.write`

## Authorization

- **api_key** (apiKey) — `Authorization` header. The API Key with format `Token token=<API_KEY>`

## Path parameters

| Name | Type | Required | Description |
|---|---|---|---|
| `id` | string | yes | The ID of an Event Orchestration. |
| `cache_variable_id` | string | yes | The ID of a Cache Variable. |

## Header parameters

| Name | Type | Required | Description |
|---|---|---|---|
| `Accept` | string | yes | The `Accept` header is used as a versioning header. Default: `application/vnd.pagerduty+json;version=2`. |

## Request body (`application/json`)

The updated data for an `external_data` type Cache Variable for this Event Orchestration.

| Field | Type | Required | Description |
|---|---|---|---|
| `cache_variable_data` | string | yes | (String Data) The string value to set on an external data cache variable configured with `data_type: string`. |
| `updated_at` | string (date-time) |  | (String Data) The date/time the cache variable data was last updated. Read-only. |
| `cache_variable_data` | number | yes | (Number Data) The number value to set on an external data cache variable configured with `data_type: number`. |
| `updated_at` | string (date-time) |  | (Number Data) The date/time the cache variable data was last updated. Read-only. |
| `cache_variable_data` | boolean | yes | (Boolean Data) The boolean value to set on an external data cache variable configured with `data_type: boolean`. |
| `updated_at` | string (date-time) |  | (Boolean Data) The date/time the cache variable data was last updated. Read-only. |

Example: Request Example: Updated string

```json
{
  "cache_variable_data": "Updated - Hello World!"
}
```

Example: Request Example: Updated number

```json
{
  "cache_variable_data": 85.1
}
```

Example: Request Example: Updated boolean

```json
{
  "cache_variable_data": false
}
```

## Response 200

The data on an `external_data` type Cache Variable for this Event Orchestration.

### `application/json`

| Field | Type | Required | Description |
|---|---|---|---|
| `cache_variable_data` | string | yes | (String Data) The string value to set on an external data cache variable configured with `data_type: string`. |
| `updated_at` | string (date-time) |  | (String Data) The date/time the cache variable data was last updated. Read-only. |
| `cache_variable_data` | number | yes | (Number Data) The number value to set on an external data cache variable configured with `data_type: number`. |
| `updated_at` | string (date-time) |  | (Number Data) The date/time the cache variable data was last updated. Read-only. |
| `cache_variable_data` | boolean | yes | (Boolean Data) The boolean value to set on an external data cache variable configured with `data_type: boolean`. |
| `updated_at` | string (date-time) |  | (Boolean Data) The date/time the cache variable data was last updated. Read-only. |

Example: Response Example: String

```json
{
  "cache_variable_data": "Updated - Hello World!",
  "updated_at": "2021-11-18T16:42:01Z"
}
```

Example: Response Example: Number

```json
{
  "cache_variable_data": 85.1,
  "updated_at": "2021-11-18T16:42:01Z"
}
```

Example: Response Example: Boolean

```json
{
  "cache_variable_data": false,
  "updated_at": "2021-11-18T16:42:01Z"
}
```

## Response 400

Caller provided invalid arguments. Please review the response for error details. Retrying with the same arguments will *not* work.

### `application/json`

| Field | Type | Required | Description |
|---|---|---|---|
| `error` | object |  |  |
| `error.code` | integer |  | Read-only. |
| `error.message` | string |  | Error message string. Read-only. |
| `error.errors` | array of string |  | Read-only. |

## Response 401

Caller did not supply credentials or did not provide the correct credentials.
If you are using an API key, it may be invalid or your Authorization header may be malformed.

### `application/json`

| Field | Type | Required | Description |
|---|---|---|---|
| `error` | object |  |  |
| `error.code` | integer |  | Read-only. |
| `error.message` | string |  | Error message string. Read-only. |
| `error.errors` | array of string |  | Read-only. |

## Response 403

Caller is not authorized to view the requested resource.
While your authentication is valid, the authenticated user or token does not have permission to perform this action.

### `application/json`

| Field | Type | Required | Description |
|---|---|---|---|
| `error` | object |  |  |
| `error.code` | integer |  | Read-only. |
| `error.message` | string |  | Error message string. Read-only. |
| `error.errors` | array of string |  | Read-only. |

## Response 404

The requested resource was not found.

### `application/json`

| Field | Type | Required | Description |
|---|---|---|---|
| `error` | object |  |  |
| `error.code` | integer |  | Read-only. |
| `error.message` | string |  | Error message string. Read-only. |
| `error.errors` | array of string |  | Read-only. |

## Response 405

The request was received and recognized by the server, but its HTTP method was rejected for the requested resource.

### `application/json`

| Field | Type | Required | Description |
|---|---|---|---|
| `error` | object |  |  |
| `error.code` | integer |  | Read-only. |
| `error.message` | string |  | Error message string. Read-only. |
| `error.errors` | array of string |  | Read-only. |

## Developer Agreement

Your access to and use of the PagerDuty Developer Services is governed by the [PagerDuty Developer Agreement](https://docs.pagerduty.com/developer/pagerduty-developer-agreement).
