대화형 작업이 2023년 6월 13일에 지원 중단되었습니다. 자세한 내용은
대화 작업 지원 중단을 참고하세요.
Method: projects.preview.write
컬렉션을 사용해 정리하기
내 환경설정을 기준으로 콘텐츠를 저장하고 분류하세요.
모델에 따라 사용자의 프로젝트 미리보기를 업데이트합니다.
HTTP 요청
POST https://actions.googleapis.com/v2/{parent=projects/*}/preview:write
URL은 gRPC 트랜스코딩 문법을 사용합니다.
경로 매개변수
매개변수 |
parent |
string
필수 항목입니다. projects/{project} 형식의 상위 리소스 이름입니다. {project} 는 프로젝트와 연결된 클라우드 프로젝트 ID입니다.
|
요청 본문
요청 본문에는 다음과 같은 구조의 데이터가 포함됩니다.
필드 |
previewSettings |
object (PreviewSettings )
필수 항목입니다. 사용자의 미리보기를 업데이트하기 위한 설정입니다.
|
통합 필드 source . 미리보기를 만드는 데 사용된 데이터 소스입니다. source 은 다음 중 하나여야 합니다. |
files |
object (Files )
서버에 한 번에 전송되는 파일의 목록입니다. 구성 파일 또는 데이터 파일의 목록입니다. 1. 첫 번째 요청은 ConfigFiles여야 합니다. 2. 첫 번째 요청에는 'settings'가 포함된 ConfigFile이 있어야 합니다. 3. 첫 번째 요청에는 '매니페스트'가 포함된 ConfigFile이 있어야 합니다. 4. 인라인 Cloud 함수에 해당하는 웹훅 ConfigFile은 소스 코드에 해당하는 DataFile보다 먼저 스트리밍되어야 합니다.
|
draft |
object (ContentFromDraft )
프로젝트 초안에서 가져온 콘텐츠입니다.
|
submittedVersion |
object (ContentFromSubmittedVersion )
기존 버전에서 가져온 콘텐츠입니다.
|
응답 본문
성공할 경우 응답 본문에 다음 구조의 데이터가 포함됩니다.
JSON 표현 |
{
"name": string,
"validationResults": {
object (ValidationResults )
},
"simulatorUrl": string
} |
필드 |
name |
string
미리보기의 고유 식별자입니다. 형식: projects/{project}/preview
|
validationResults |
object (ValidationResults )
사용자 프로젝트 미리보기 콘텐츠와 연결된 유효성 검사 결과입니다.
|
simulatorUrl |
string
사용자 미리보기를 테스트하기 위한 시뮬레이터 URL입니다.
|
ContentFromDraft
미리보기 콘텐츠가 초안에서 제공될 것임을 나타냅니다.
ContentFromSubmittedVersion
미리보기 콘텐츠가 기존 버전에서 제공될 것임을 나타냅니다.
JSON 표현 |
{
"version": string
} |
필드 |
version |
string
필수 항목입니다. 미리보기를 만드는 데 사용할 프로젝트의 제출 버전입니다. 형식: projects/{project}/versions/{version}
|
PreviewSettings
JSON 표현 |
{
"sandbox": boolean
} |
필드 |
sandbox |
boolean
트랜잭션과 같은 특정 작업을 샌드박스 모드에서 실행할지 여부를 나타냅니다. 기본적으로 미리보기 요청은 이러한 작업을 샌드박스 모드에서 실행합니다. 즉, sandbox 의 기본값은 true 입니다.
|
달리 명시되지 않는 한 이 페이지의 콘텐츠에는 Creative Commons Attribution 4.0 라이선스에 따라 라이선스가 부여되며, 코드 샘플에는 Apache 2.0 라이선스에 따라 라이선스가 부여됩니다. 자세한 내용은 Google Developers 사이트 정책을 참조하세요. 자바는 Oracle 및/또는 Oracle 계열사의 등록 상표입니다.
최종 업데이트: 2025-07-26(UTC)
[null,null,["최종 업데이트: 2025-07-26(UTC)"],[[["\u003cp\u003eUpdates a user's project preview using either draft content, an existing version, or uploaded files.\u003c/p\u003e\n"],["\u003cp\u003eRequires specifying the project ID and the preview settings, which include an optional sandbox mode.\u003c/p\u003e\n"],["\u003cp\u003eThe request body must indicate the source of the preview content (draft, version, or files).\u003c/p\u003e\n"],["\u003cp\u003eA successful response provides the preview's name, validation results, and a simulator URL for testing.\u003c/p\u003e\n"],["\u003cp\u003eThe API uses gRPC Transcoding and expects the content to follow specific JSON structures for requests and responses.\u003c/p\u003e\n"]]],[],null,["# Method: projects.preview.write\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.Preview.SCHEMA_REPRESENTATION)\n- [ContentFromDraft](#ContentFromDraft)\n- [ContentFromSubmittedVersion](#ContentFromSubmittedVersion)\n - [JSON representation](#ContentFromSubmittedVersion.SCHEMA_REPRESENTATION)\n- [PreviewSettings](#PreviewSettings)\n - [JSON representation](#PreviewSettings.SCHEMA_REPRESENTATION)\n\nUpdates the user's project preview based on the model.\n\n### HTTP request\n\n`POST https://actions.googleapis.com/v2/{parent=projects/*}/preview:write`\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 parent resource name in the format `projects/{project}`. The `{project}` is the cloud project ID associated with the project. |\n\n### Request body\n\nThe request body contains data with the following structure:\n\n| JSON representation ||\n|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---|\n| ``` { \"previewSettings\": { object (/assistant/actions/api/reference/rest/v2/projects.preview/write#PreviewSettings) }, // Union field `source` can be only one of the following: \"files\": { object (/assistant/actions/api/reference/rest/v2/Files) }, \"draft\": { object (/assistant/actions/api/reference/rest/v2/projects.preview/write#ContentFromDraft) }, \"submittedVersion\": { object (/assistant/actions/api/reference/rest/v2/projects.preview/write#ContentFromSubmittedVersion) } // End of list of possible types for union field `source`. } ``` |\n\n| Fields ||\n|--------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---|\n| `previewSettings` | `object (`[PreviewSettings](/assistant/actions/api/reference/rest/v2/projects.preview/write#PreviewSettings)`)` Required. The settings for updating the user's preview. |\n| Union field `source`. Data source used to created the preview. `source` can be only one of the following: |||\n| `files` | `object (`[Files](/assistant/actions/api/reference/rest/v2/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. |\n| `draft` | `object (`[ContentFromDraft](/assistant/actions/api/reference/rest/v2/projects.preview/write#ContentFromDraft)`)` Content sourced from the project draft. |\n| `submittedVersion` | `object (`[ContentFromSubmittedVersion](/assistant/actions/api/reference/rest/v2/projects.preview/write#ContentFromSubmittedVersion)`)` Content sourced from the an exiting version. |\n\n### Response body\n\nIf successful, the response body contains data with the following structure:\nDefinition of preview resource.\n\n| JSON representation ||\n|--------------------------------------------------------------------------------------------------------------------------------------------------|---|\n| ``` { \"name\": string, \"validationResults\": { object (/assistant/actions/api/reference/rest/v2/ValidationResults) }, \"simulatorUrl\": string } ``` |\n\n| Fields ||\n|---------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `name` | `string` The unique identifier of the preview. Format: `projects/{project}/preview` |\n| `validationResults` | `object (`[ValidationResults](/assistant/actions/api/reference/rest/v2/ValidationResults)`)` Validation results associated with the user project preview content. |\n| `simulatorUrl` | `string` The simulator URL to test the user preview. |\n\nContentFromDraft\n----------------\n\nIndicates the preview content will be coming from the Draft.\n\nContentFromSubmittedVersion\n---------------------------\n\nIndicates the preview content will be coming from an exiting version.\n\n| JSON representation ||\n|-------------------------------|---|\n| ``` { \"version\": string } ``` |\n\n| Fields ||\n|-----------|-------------------------------------------------------------------------------------------------------------------------------------|\n| `version` | `string` Required. Submitted version of the project to be used to create a preview. Format: `projects/{project}/versions/{version}` |\n\nPreviewSettings\n---------------\n\nSettings for updating the preview.\n\n| JSON representation ||\n|--------------------------------|---|\n| ``` { \"sandbox\": boolean } ``` |\n\n| Fields ||\n|-----------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `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`. |"]]