Required. The target site for the cloned version, in the format:
sites/SITE_ID
Request body
The request body contains data with the following structure:
JSON representation
{"sourceVersion": string,"finalize": boolean,// Union field filter can be only one of the following:"include": {object (PathFilter)},"exclude": {object (PathFilter)}// End of list of possible types for union field filter.}
Fields
sourceVersion
string
Required. The unique identifier for the version to be cloned, in the format:
sites/SITE_ID/versions/VERSION_ID
finalize
boolean
If true, the call to versions.clone immediately finalizes the version after cloning is complete.
If false, the cloned version will have a status of CREATED. Use versions.patch to set the status of the version to FINALIZED.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2023-09-11 UTC."],[],[],null,["# Method: sites.versions.clone\n\nCreates a new version on the specified target site using the content of the specified version.\n\n### HTTP request\n\n`POST https://firebasehosting.googleapis.com/v1beta1/{parent=sites/*}/versions:clone`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Path parameters\n\n| Parameters ||\n|----------|---------------------------------------------------------------------------------------------------------------------|\n| `parent` | `string` Required. The target site for the cloned version, in the format: `sites/`\u003cvar translate=\"no\"\u003eSITE_ID\u003c/var\u003e |\n\n### Request body\n\nThe request body contains data with the following structure:\n\n| JSON representation |\n|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"sourceVersion\": string, \"finalize\": boolean, // Union field `filter` can be only one of the following: \"include\": { object (/docs/reference/hosting/rest/v1beta1/sites.versions/clone#PathFilter) }, \"exclude\": { object (/docs/reference/hosting/rest/v1beta1/sites.versions/clone#PathFilter) } // End of list of possible types for union field `filter`. } ``` |\n\n| Fields ||\n|-----------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `sourceVersion` | `string` Required. The unique identifier for the version to be cloned, in the format: `sites/`\u003cvar translate=\"no\"\u003eSITE_ID\u003c/var\u003e`/versions/`\u003cvar translate=\"no\"\u003eVERSION_ID\u003c/var\u003e |\n| `finalize` | `boolean` If true, the call to `versions.clone` immediately finalizes the version after cloning is complete. If false, the cloned version will have a status of `CREATED`. Use [`versions.patch`](/docs/reference/hosting/rest/v1beta1/sites.versions/patch) to set the status of the version to `FINALIZED`. |\n| Union field `filter`. `filter` can be only one of the following: ||\n| `include` | `object (`[PathFilter](/docs/reference/hosting/rest/v1beta1/sites.versions/clone#PathFilter)`)` If provided, only paths that match one or more RegEx values in this list will be included in the new version. |\n| `exclude` | `object (`[PathFilter](/docs/reference/hosting/rest/v1beta1/sites.versions/clone#PathFilter)`)` If provided, only paths that do not match any of the RegEx values in this list will be included in the new version. |\n\n### Response body\n\nIf successful, the response body contains an instance of [Operation](/docs/reference/hosting/rest/v1beta1/projects.operations#Operation).\n\n### Authorization scopes\n\nRequires one of the following OAuth scopes:\n\n- `https://www.googleapis.com/auth/firebase.hosting`\n- `\n https://www.googleapis.com/auth/firebase`\n- `\n https://www.googleapis.com/auth/cloud-platform`\n\nFor more information, see the [Authentication Overview](https://cloud.google.com/docs/authentication/).\n\nPathFilter\n----------\n\nA representation of filter path.\n\n| JSON representation |\n|-----------------------------------|\n| ``` { \"regexes\": [ string ] } ``` |\n\n| Fields ||\n|-------------|-------------------------------------------------------|\n| `regexes[]` | `string` An array of RegEx values by which to filter. |"]]