# REST Resource: projects.locations.agents.playbooks.examples

- [Resource: Example](https://docs.cloud.google.com/dialogflow/cx/docs/reference/rest/v3beta1/projects.locations.agents.playbooks.examples#Example)
  - [JSON representation](https://docs.cloud.google.com/dialogflow/cx/docs/reference/rest/v3beta1/projects.locations.agents.playbooks.examples#Example.SCHEMA_REPRESENTATION)
- [Methods](https://docs.cloud.google.com/dialogflow/cx/docs/reference/rest/v3beta1/projects.locations.agents.playbooks.examples#METHODS_SUMMARY)

## Resource: Example

Example represents a sample execution of the playbook in the conversation.

An example consists of a list of ordered actions performed by end user or Dialogflow agent according the playbook instructions to fulfill the task.

| JSON representation |
|---|
| ``` { "name": string, "playbookInput": { object (`https://docs.cloud.google.com/dialogflow/cx/docs/reference/rest/v3beta1/PlaybookInput`) }, "playbookOutput": { object (`https://docs.cloud.google.com/dialogflow/cx/docs/reference/rest/v3beta1/PlaybookOutput`) }, "actions": [ { object (`https://docs.cloud.google.com/dialogflow/cx/docs/reference/rest/v3beta1/Action`) } ], "displayName": string, "description": string, "tokenCount": string, "createTime": string, "updateTime": string, "conversationState": enum (`https://docs.cloud.google.com/dialogflow/cx/docs/reference/rest/v3beta1/OutputState`), "languageCode": string } ``` |

| Fields ||
|---|---|
| `name` | `string` The unique identifier of the playbook example. Format: `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/playbooks/<PlaybookID>/examples/<ExampleID>`. |
| `playbookInput` | ``object (`https://docs.cloud.google.com/dialogflow/cx/docs/reference/rest/v3beta1/PlaybookInput`)`` Optional. The input to the playbook in the example. |
| `playbookOutput` | ``object (`https://docs.cloud.google.com/dialogflow/cx/docs/reference/rest/v3beta1/PlaybookOutput`)`` Optional. The output of the playbook in the example. |
| `actions[]` | ``object (`https://docs.cloud.google.com/dialogflow/cx/docs/reference/rest/v3beta1/Action`)`` Required. The ordered list of actions performed by the end user and the Dialogflow agent. |
| `displayName` | `string` Required. The display name of the example. |
| `description` | `string` Optional. The high level concise description of the example. The max number of characters is 200. |
| `tokenCount` | `string (https://developers.google.com/discovery/v1/type-format format)` Output only. Estimated number of tokes current example takes when sent to the LLM. |
| `createTime` | ``string (`https://protobuf.dev/reference/protobuf/google.protobuf#timestamp` format)`` Output only. The timestamp of initial example creation. Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: `"2014-10-02T15:01:23Z"`, `"2014-10-02T15:01:23.045123456Z"` or `"2014-10-02T15:01:23+05:30"`. |
| `updateTime` | ``string (`https://protobuf.dev/reference/protobuf/google.protobuf#timestamp` format)`` Output only. Last time the example was updated. Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: `"2014-10-02T15:01:23Z"`, `"2014-10-02T15:01:23.045123456Z"` or `"2014-10-02T15:01:23+05:30"`. |
| `conversationState` | ``enum (`https://docs.cloud.google.com/dialogflow/cx/docs/reference/rest/v3beta1/OutputState`)`` Required. Example's output state. |
| `languageCode` | `string` Optional. The language code of the example. If not specified, the agent's default language is used. Note: languages must be enabled in the agent before they can be used. Note: example's language code is not currently used in dialogflow agents. |

| ## Methods ||
|---|---|
| ### `https://docs.cloud.google.com/dialogflow/cx/docs/reference/rest/v3beta1/projects.locations.agents.playbooks.examples/create` | Creates an example in the specified playbook. |
| ### `https://docs.cloud.google.com/dialogflow/cx/docs/reference/rest/v3beta1/projects.locations.agents.playbooks.examples/delete` | Deletes the specified example. |
| ### `https://docs.cloud.google.com/dialogflow/cx/docs/reference/rest/v3beta1/projects.locations.agents.playbooks.examples/get` | Retrieves the specified example. |
| ### `https://docs.cloud.google.com/dialogflow/cx/docs/reference/rest/v3beta1/projects.locations.agents.playbooks.examples/list` | Returns a list of examples in the specified playbook. |
| ### `https://docs.cloud.google.com/dialogflow/cx/docs/reference/rest/v3beta1/projects.locations.agents.playbooks.examples/patch` | Update the specified example. |