Method: forms.watches.create

建立新的手錶。如提供手錶 ID,該 ID 必須未使用。每個叫用專案的每個表單限制為每個 Watch.EventType 一個 Watch。觀測值的有效期限為建立後七天 (請參閱 Watch.expire_time)。

HTTP 要求

POST https://forms.googleapis.com/v1/forms/{formId}/watches

這個網址使用 gRPC 轉碼語法。

路徑參數

參數
formId

string

必要欄位。要監控的表單 ID。

要求主體

要求主體的資料會採用以下結構:

JSON 表示法
{
  "watch": {
    object (Watch)
  },
  "watchId": string
}
欄位
watch

object (Watch)

必要欄位。watch 物件。請勿在這個物件上設定 ID,請改用 watchId

watchId

string

要用於智慧手錶的 ID。如果指定了 ID,則該 ID 不得已在使用中。如果未指定,系統會產生 ID。這個值的長度應為 4 至 63 個字元,有效字元為 /[a-z][0-9]-/。

回應主體

如果成功,回應主體會包含新建立的 Watch 例項。

授權範圍

需要下列其中一種 OAuth 範圍:

  • https://www.googleapis.com/auth/drive
  • https://www.googleapis.com/auth/drive.file
  • https://www.googleapis.com/auth/drive.readonly
  • https://www.googleapis.com/auth/forms.body
  • https://www.googleapis.com/auth/forms.body.readonly
  • https://www.googleapis.com/auth/forms.responses.readonly

詳情請參閱授權指南