forms (v1)
PREREQUISITE: Read ../gws-shared/SKILL.md for auth, global flags, and security rules. If missing, run gws generate-skills to create it.
CODEBLOCK0
API Resources
forms
- batchUpdate — Change the form with a batch of updates.
- create — Create a new form using the title given in the provided form message in the request. Important: Only the form.info.title and form.info.document_title fields are copied to the new form. All other fields including the form description, items and settings are disallowed. To create a new form and add items, you must first call forms.create to create an empty form with a title and (optional) document title, and then call forms.update to add the items.
- get — Get a form.
- setPublishSettings — Updates the publish settings of a form. Legacy forms aren't supported because they don't have the publish_settings field.
- responses — Operations on the 'responses' resource
- watches — Operations on the 'watches' resource
Discovering Commands
Before calling any API method, inspect it:
CODEBLOCK1
Use gws schema output to build your --params and --json flags.
forms (v1)
前置条件: 请先阅读 ../gws-shared/SKILL.md 了解认证、全局标志和安全规则。如果该文件缺失,请运行 gws generate-skills 创建。
bash
gws forms <资源> <方法> [标志]
API 资源
forms
- batchUpdate — 通过批量更新修改表单。
- create — 使用请求中提供的表单消息中的标题创建新表单。重要提示: 只有 form.info.title 和 form.info.document_title 字段会被复制到新表单中。所有其他字段(包括表单描述、项目和设置)均不允许。要创建新表单并添加项目,必须先调用 forms.create 创建一个带有标题和(可选)文档标题的空表单,然后调用 forms.update 添加项目。
- get — 获取表单。
- setPublishSettings — 更新表单的发布设置。旧版表单不支持此操作,因为它们没有 publish_settings 字段。
- responses — 对 responses 资源的操作
- watches — 对 watches 资源的操作
发现命令
在调用任何 API 方法之前,请先检查它:
bash
浏览资源和方法
gws forms --help
检查方法的必需参数、类型和默认值
gws schema forms.<资源>.<方法>
使用 gws schema 的输出构建你的 --params 和 --json 标志。