Some products and features are in the process of being renamed. Generative playbook and flow features are also being migrated to a single consolidated console. See the details.
Authorization requires the following IAM permission on the specified resource baseVersion:
dialogflow.versions.get
Request body
The request body contains data with the following structure:
JSON representation
{"targetVersion": string,"languageCode": string}
Fields
targetVersion
string
Required. Name of the target flow version to compare with the base version. Use version ID 0 to indicate the draft version of the specified flow. Format: projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/flows/<FlowID>/versions/<VersionID>.
Authorization requires the following IAM permission on the specified resource targetVersion:
dialogflow.versions.get
languageCode
string
The language to compare the flow versions for.
If not specified, the agent's default language is used. Many languages are supported. Note: languages must be enabled in the agent before they can be used.
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".
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-21 UTC."],[[["\u003cp\u003eThis API allows comparison between a specified base version and a target version of a flow, with the option to use the draft version by specifying a version ID of '0'.\u003c/p\u003e\n"],["\u003cp\u003eThe HTTP request is a POST method, directed to a specific endpoint, and requires a \u003ccode\u003ebaseVersion\u003c/code\u003e path parameter to identify the base flow version being used in the comparison.\u003c/p\u003e\n"],["\u003cp\u003eThe request body must be formatted as JSON and must include the \u003ccode\u003etargetVersion\u003c/code\u003e string field, along with the optional \u003ccode\u003elanguageCode\u003c/code\u003e field.\u003c/p\u003e\n"],["\u003cp\u003eThe response body is also formatted as JSON, containing \u003ccode\u003ebaseVersionContentJson\u003c/code\u003e, \u003ccode\u003etargetVersionContentJson\u003c/code\u003e and the \u003ccode\u003ecompareTime\u003c/code\u003e fields, representing the JSON content of each version, and the time the comparison took place.\u003c/p\u003e\n"],["\u003cp\u003eThis API requires one of two specific OAuth authorization scopes: either \u003ccode\u003ehttps://www.googleapis.com/auth/cloud-platform\u003c/code\u003e or \u003ccode\u003ehttps://www.googleapis.com/auth/dialogflow\u003c/code\u003e.\u003c/p\u003e\n"]]],[],null,["# Method: projects.locations.agents.flows.versions.compareVersions\n\n- [HTTP request](#body.HTTP_TEMPLATE)\n- [Path parameters](#body.PATH_PARAMETERS)\n- [Request body](#body.request_body)\n - [JSON representation](#body.request_body.SCHEMA_REPRESENTATION)\n- [Response body](#body.response_body)\n - [JSON representation](#body.CompareVersionsResponse.SCHEMA_REPRESENTATION)\n- [Authorization scopes](#body.aspect)\n- [Try it!](#try-it)\n\nCompares the specified base version with target version.\n\n### HTTP request\n\n`POST https://{endpoint}/v3beta1/{baseVersion=projects/*/locations/*/agents/*/flows/*/versions/*}:compareVersions`\n\nWhere `{endpoint}` is one of the [supported service endpoints](/dialogflow/cx/docs/reference/rest#rest_endpoints).\n\nThe URLs use [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Path parameters\n\n### Request body\n\nThe request body contains data with the following structure:\n\n### Response body\n\nThe response message for [Versions.CompareVersions](/dialogflow/cx/docs/reference/rest/v3beta1/projects.locations.agents.flows.versions/compareVersions#google.cloud.dialogflow.cx.v3beta1.Versions.CompareVersions).\n\nIf successful, the response body contains data with the following structure:\n\n### Authorization scopes\n\nRequires one of the following OAuth scopes:\n\n- `https://www.googleapis.com/auth/cloud-platform`\n- `\n https://www.googleapis.com/auth/dialogflow`\n\nFor more information, see the [Authentication Overview](/docs/authentication#authorization-gcp)."]]