Method: sites.versions.clone
Stay organized with collections
Save and categorize content based on your preferences.
Creates a new version on the specified target site using the content of the specified version.
HTTP request
POST https://firebasehosting.googleapis.com/v1beta1/{parent=sites/*}/versions:clone
The URL uses gRPC Transcoding syntax.
Path parameters
Parameters |
parent |
string
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 .
|
Union field filter . filter can be only one of the following:
|
include |
object (PathFilter )
If provided, only paths that match one or more RegEx values in this list will be included in the new version.
|
exclude |
object (PathFilter )
If provided, only paths that do not match any of the RegEx values in this list will be included in the new version.
|
Response body
If successful, the response body contains an instance of Operation
.
Authorization scopes
Requires one of the following OAuth scopes:
https://www.googleapis.com/auth/firebase.hosting
https://www.googleapis.com/auth/firebase
https://www.googleapis.com/auth/cloud-platform
For more information, see the Authentication Overview.
PathFilter
A representation of filter path.
JSON representation |
{
"regexes": [
string
]
} |
Fields |
regexes[] |
string
An array of RegEx values by which to filter.
|
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2023-09-11 UTC.
[null,null,["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. |"]]