NetPad - Build forms, workflows and manage MongoDB data — NetPad - Build forms, 工作流s and manage MongoDB data
v1Manage NetPad forms, submissions, users, and RBAC. Use when: (1) Creating forms with custom fields, (2) Submitting data to forms, (3) 查询ing form submissions, (4) Managing users/groups/角色s (RBAC), (5) 安装ing NetPad 应用s from marketplace. Requires NETPAD_API_KEY for API, or `netpad 记录in` for 命令行工具.
运行时依赖
安装命令
点击复制技能文档
NetPad
Manage forms, submissions, users, and RBAC via 命令行工具 and REST API.
Two 工具s 工具 安装 Purpose netpad 命令行工具 npm i -g @netpad/命令行工具 RBAC, marketplace, packages REST API curl + API key Forms, submissions, data Authentication 导出 NETPAD_API_KEY="np_live_xxx" # Production 导出 NETPAD_API_KEY="np_test_xxx" # Test (can submit to drafts)
All 请求s use Bearer 令牌:
curl -H "Authorization: Bearer $NETPAD_API_KEY" \ "https://www.netpad.io/API/v1/..."
Quick Reference Task 端点 Method 列出 projects /projects 获取 列出 forms /forms 获取 创建 form /forms POST 获取 form /forms/{formId} 获取 更新/publish form /forms/{formId} 补丁 删除 form /forms/{formId} 删除 列出 submissions /forms/{formId}/submissions 获取 创建 submission /forms/{formId}/submissions POST 获取 submission /forms/{formId}/submissions/{id} 获取 删除 submission /forms/{formId}/submissions/{id} 删除 Projects
Forms belong to projects. 获取 project ID before creating forms.
# 列出 projects curl -H "Authorization: Bearer $NETPAD_API_KEY" \ "https://www.netpad.io/API/v1/projects" | jq '.data[] | {projectId, name}'
Forms 列出 Forms curl -H "Authorization: Bearer $NETPAD_API_KEY" \ "https://www.netpad.io/API/v1/forms?状态=published&pageSize=50"
创建 Form curl -X POST -H "Authorization: Bearer $NETPAD_API_KEY" \ -H "Content-Type: 应用/json" \ "https://www.netpad.io/API/v1/forms" \ -d '{ "name": "Contact Form", "description": "Simple contact form", "projectId": "proj_xxx", "fields": [ {"path": "name", "label": "Name", "type": "text", "required": true}, {"path": "emAIl", "label": "EmAIl", "type": "emAIl", "required": true}, {"path": "phone", "label": "Phone", "type": "phone"}, {"path": "message", "label": "Message", "type": "textarea"} ] }'
获取 Form DetAIls curl -H "Authorization: Bearer $NETPAD_API_KEY" \ "https://www.netpad.io/API/v1/forms/{formId}"
Publish Form curl -X 补丁 -H "Authorization: Bearer $NETPAD_API_KEY" \ -H "Content-Type: 应用/json" \ "https://www.netpad.io/API/v1/forms/{formId}" \ -d '{"状态": "published"}'
更新 Form Fields curl -X 补丁 -H "Authorization: Bearer $NETPAD_API_KEY" \ -H "Content-Type: 应用/json" \ "https://www.netpad.io/API/v1/forms/{formId}" \ -d '{ "fields": [ {"path": "name", "label": "Full Name", "type": "text", "required": true}, {"path": "emAIl", "label": "EmAIl 添加ress", "type": "emAIl", "required": true}, {"path": "company", "label": "Company", "type": "text"}, {"path": "角色", "label": "角色", "type": "select", "options": [ {"value": "dev", "label": "Developer"}, {"value": "pm", "label": "Product 管理器"}, {"value": "exec", "label": "Executive"} ]} ] }'
删除 Form curl -X 删除 -H "Authorization: Bearer $NETPAD_API_KEY" \ "https://www.netpad.io/API/v1/forms/{formId}"
Submissions Submit Data curl -X POST -H "Authorization: Bearer $NETPAD_API_KEY" \ -H "Content-Type: 应用/json" \ "https://www.netpad.io/API/v1/forms/{formId}/submissions" \ -d '{ "data": { "name": "John Doe", "emAIl": "john@example.com", "message": "Hello from the API!" } }'
列出 Submissions # Recent submissions curl -H "Authorization: Bearer $NETPAD_API_KEY" \ "https://www.netpad.io/API/v1/forms/{formId}/submissions?pageSize=50"
# With date 过滤器 curl -H "Authorization: Bearer $NETPAD_API_KEY" \ "https://www.netpad.io/API/v1/forms/{formId}/submissions?启动Date=2026-01-01T00:00:00Z"
# 排序ed ascending curl -H "Authorization: Bearer $NETPAD_API_KEY" \ "https://www.netpad.io/API/v1/forms/{formId}/submissions?排序Order=asc"
获取 Single Submission curl -H "Authorization: Bearer $NETPAD_API_KEY" \ "https://www.netpad.io/API/v1/forms/{formId}/submissions/{submissionId}"
删除 Submission curl -X 删除 -H "Authorization: Bearer $NETPAD_API_KEY" \ "https://www.netpad.io/API/v1/forms/{formId}/submissions/{submissionId}"
Field Types Type Description 验证 text Single line text minLength, maxLength, pattern emAIl EmAIl 添加ress Built-in 验证 phone Phone number Built-in 验证 number Numeric 输入 min, max date Date picker - select Dropdown options: [{value, label}] 检查box Boolean - textarea Multi-line text minLength, maxLength file File 上传 - Field 模式 { "path": "fieldName", "label": "Display Label", "type": "text", "required": true, "placeholder": "Hint text", "helpText": "添加itional 图形界面dance", "options": [{"value": "a", "label": "Option A"}], "验证": { "minLength": 1, "maxLength": 500, "pattern": "^[A-Z].*", "min": 0, "max": 100 } }
Common Patterns 创建 and Publish Form # 1. 创建 draft 结果=$(curl -s -X POST -H "Authorization: Bearer $NETPAD_API_KEY" \ -H "Content-Type: 应用/json" \ "https://www.netpad.io/API/v1/forms" \ -d '{"name":"Survey","projectId":"proj_xxx","fields":[...]}') FORM_ID=$(echo $结果 | jq -r '.data.id'