Method: projects.preview.write

Updates the user's project preview based on the model.

HTTP request

POST https://actions.googleapis.com/v2/{parent=projects/*}/preview:write

The URL uses gRPC Transcoding syntax.

Path parameters

Parameters
parent

string

Required. The parent resource name in the format projects/{project}. The {project} is the cloud project ID associated with the project.

Request body

The request body contains data with the following structure:

JSON representation
{
  "previewSettings": {
    object (PreviewSettings)
  },

  // Union field source can be only one of the following:
  "files": {
    object (Files)
  },
  "draft": {
    object (ContentFromDraft)
  },
  "submittedVersion": {
    object (ContentFromSubmittedVersion)
  }
  // End of list of possible types for union field source.
}
Fields
previewSettings

object (PreviewSettings)

Required. The settings for updating the user's preview.

Union field source. Data source used to created the preview. source can be only one of the following:
files

object (Files)

List of files sent to the server at a time. This is a list of config files or data files. 1. The first request must be a ConfigFiles. 2. The first request must have a ConfigFile with 'settings'. 3. The first request must have a ConfigFile with 'manifest'. 4. The webhook ConfigFile corresponding to inline cloud function must be streamed before the DataFile corresponding to its source code.

draft

object (ContentFromDraft)

Content sourced from the project draft.

submittedVersion

object (ContentFromSubmittedVersion)

Content sourced from the an exiting version.

Response body

If successful, the response body contains data with the following structure:

Definition of preview resource.

JSON representation
{
  "name": string,
  "validationResults": {
    object (ValidationResults)
  },
  "simulatorUrl": string
}
Fields
name

string

The unique identifier of the preview. Format: projects/{project}/preview

validationResults

object (ValidationResults)

Validation results associated with the user project preview content.

simulatorUrl

string

The simulator URL to test the user preview.

ContentFromDraft

Indicates the preview content will be coming from the Draft.

ContentFromSubmittedVersion

Indicates the preview content will be coming from an exiting version.

JSON representation
{
  "version": string
}
Fields
version

string

Required. Submitted version of the project to be used to create a preview. Format: projects/{project}/versions/{version}

PreviewSettings

Settings for updating the preview.

JSON representation
{
  "sandbox": boolean
}
Fields
sandbox

boolean

Indicates whether or not to run certain operations, such as transactions, in sandbox mode. By default, preview requests run these operations in sandbox mode. In other words, the default value for sandbox is true.