@jinshuju/mcp 0.0.0-stage → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +17 -0
- package/README.md +87 -2
- package/dist/analytics.d.ts +84 -0
- package/dist/analytics.js +192 -0
- package/dist/api.d.ts +54 -0
- package/dist/api.js +167 -0
- package/dist/app.d.ts +35 -0
- package/dist/app.js +224 -0
- package/dist/auth.d.ts +36 -0
- package/dist/auth.js +94 -0
- package/dist/cli-credential.d.ts +21 -0
- package/dist/cli-credential.js +120 -0
- package/dist/composites.d.ts +12 -0
- package/dist/composites.js +82 -0
- package/dist/config.d.ts +34 -0
- package/dist/config.js +44 -0
- package/dist/credential.d.ts +26 -0
- package/dist/credential.js +32 -0
- package/dist/generated/meta.json +114 -0
- package/dist/generated/operations.json +4152 -0
- package/dist/generated/schemas.json +32593 -0
- package/dist/generated/tools.json +6818 -0
- package/dist/index.d.ts +12 -0
- package/dist/index.js +12 -0
- package/dist/node.d.ts +2 -0
- package/dist/node.js +27 -0
- package/dist/result.d.ts +10 -0
- package/dist/result.js +81 -0
- package/dist/server.d.ts +20 -0
- package/dist/server.js +59 -0
- package/dist/stdio.d.ts +2 -0
- package/dist/stdio.js +29 -0
- package/dist/tools.d.ts +21 -0
- package/dist/tools.js +84 -0
- package/dist/types.d.ts +75 -0
- package/dist/types.js +2 -0
- package/dist/validation.d.ts +16 -0
- package/dist/validation.js +56 -0
- package/dist/version.d.ts +3 -0
- package/dist/version.js +5 -0
- package/dist/worker.d.ts +13 -0
- package/dist/worker.js +30 -0
- package/package.json +74 -4
|
@@ -0,0 +1,4152 @@
|
|
|
1
|
+
{
|
|
2
|
+
"listForms": {
|
|
3
|
+
"operationId": "listForms",
|
|
4
|
+
"summary": "List forms",
|
|
5
|
+
"description": "Returns the forms visible to the current identity (`kind=form`, excluding tables and quick payment forms). A personal token returns the forms the user created and those shared with them; an account token returns every form in the account.\nBy default sorted by id descending (that is, by creation time descending), and `next` is the id of the first row of the next page; when `sort` is passed, rows are sorted by the given field and `next` becomes `row:<offset>`.\n50 per page by default, adjustable with `limit` (max 1000).\n- Each row carries `entries_count` (entry count) and `last_entry_created_at` (when the last entry was received), usable with `filters` / `sort`.\n- With `include_transactions=true`, forms bound to a payment account carry `transactions` payment statistics.",
|
|
6
|
+
"tag": "Forms",
|
|
7
|
+
"method": "get",
|
|
8
|
+
"path": "/forms",
|
|
9
|
+
"params": [
|
|
10
|
+
{
|
|
11
|
+
"name": "q",
|
|
12
|
+
"in": "query",
|
|
13
|
+
"required": false
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
"name": "filters",
|
|
17
|
+
"in": "query",
|
|
18
|
+
"required": false,
|
|
19
|
+
"json": true
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
"name": "sort",
|
|
23
|
+
"in": "query",
|
|
24
|
+
"required": false,
|
|
25
|
+
"json": true
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
"name": "next",
|
|
29
|
+
"in": "query",
|
|
30
|
+
"required": false
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
"name": "skip",
|
|
34
|
+
"in": "query",
|
|
35
|
+
"required": false
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
"name": "limit",
|
|
39
|
+
"in": "query",
|
|
40
|
+
"required": false
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
"name": "include_transactions",
|
|
44
|
+
"in": "query",
|
|
45
|
+
"required": false
|
|
46
|
+
}
|
|
47
|
+
],
|
|
48
|
+
"paramNames": [
|
|
49
|
+
"q",
|
|
50
|
+
"filters",
|
|
51
|
+
"sort",
|
|
52
|
+
"next",
|
|
53
|
+
"skip",
|
|
54
|
+
"limit",
|
|
55
|
+
"include_transactions"
|
|
56
|
+
],
|
|
57
|
+
"successStatus": 200,
|
|
58
|
+
"scopes": [
|
|
59
|
+
"forms"
|
|
60
|
+
],
|
|
61
|
+
"responseSchema": "FormListResponse"
|
|
62
|
+
},
|
|
63
|
+
"createForm": {
|
|
64
|
+
"operationId": "createForm",
|
|
65
|
+
"summary": "Create a form",
|
|
66
|
+
"description": "Creates a form from a list of field definitions and returns the full form structure. `name` and `fields` are required.\n- `scene` sets the form's scene; exam / evaluation question types (such as `SingleSelect`, `FillInBlank`) can only be used in the scenes that support them.\n- `layout=card` (paged) does not support PageBreak, Matrix*, TableField, GoodsField, ESignatureField, FormAssociation, MultipleBlanksField or any kind of Widget field.\n- The folder named by `folder_token` must be manageable and of kind form; otherwise returns 404 / 400 respectively.\n- `setting` accepts only whitelisted keys (see `FormSettingWriteInput`); `setting.notification_rules` replaces, as a whole, the notification rules created through the API.\n- The returned form structure carries `url` (the public fill URL).",
|
|
67
|
+
"tag": "Forms",
|
|
68
|
+
"method": "post",
|
|
69
|
+
"path": "/forms",
|
|
70
|
+
"params": [],
|
|
71
|
+
"paramNames": [],
|
|
72
|
+
"body": {
|
|
73
|
+
"contentType": "application/json",
|
|
74
|
+
"required": true,
|
|
75
|
+
"flatten": true
|
|
76
|
+
},
|
|
77
|
+
"successStatus": 201,
|
|
78
|
+
"scopes": [
|
|
79
|
+
"forms"
|
|
80
|
+
],
|
|
81
|
+
"responseSchema": "Form"
|
|
82
|
+
},
|
|
83
|
+
"getForm": {
|
|
84
|
+
"operationId": "getForm",
|
|
85
|
+
"summary": "Show a form's structure",
|
|
86
|
+
"description": "Returns the form's name, `kind`, `scene`, public URL (`url`), description, field definitions and settings. Each element of `fields` is a single-key object `{ \"<api_code>\": {...} }`, in field order.\nAlso answers for a table or a quick payment form token; `kind` says which it is.\nThe following are included when the matching parameter is `true`:\n- `include_analytics`: each analysable field's definition carries `analytics`;\n- `include_theme`: carries `theme` (the form theme);\n- `include_field_rules`: carries `field_rules` (field display rules);\n- `include_extended_attributes`: carries `extended_attributes` (source-tracking links);\n- `include_transactions`: carries `transactions` (payment statistics) when the form is bound to a payment account.",
|
|
87
|
+
"tag": "Forms",
|
|
88
|
+
"method": "get",
|
|
89
|
+
"path": "/forms/{form_token}",
|
|
90
|
+
"params": [
|
|
91
|
+
{
|
|
92
|
+
"name": "form_token",
|
|
93
|
+
"in": "path",
|
|
94
|
+
"required": true
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
"name": "include_analytics",
|
|
98
|
+
"in": "query",
|
|
99
|
+
"required": false
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
"name": "include_theme",
|
|
103
|
+
"in": "query",
|
|
104
|
+
"required": false
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
"name": "include_field_rules",
|
|
108
|
+
"in": "query",
|
|
109
|
+
"required": false
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
"name": "include_extended_attributes",
|
|
113
|
+
"in": "query",
|
|
114
|
+
"required": false
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
"name": "include_transactions",
|
|
118
|
+
"in": "query",
|
|
119
|
+
"required": false
|
|
120
|
+
}
|
|
121
|
+
],
|
|
122
|
+
"paramNames": [
|
|
123
|
+
"form_token",
|
|
124
|
+
"include_analytics",
|
|
125
|
+
"include_theme",
|
|
126
|
+
"include_field_rules",
|
|
127
|
+
"include_extended_attributes",
|
|
128
|
+
"include_transactions"
|
|
129
|
+
],
|
|
130
|
+
"successStatus": 200,
|
|
131
|
+
"scopes": [
|
|
132
|
+
"forms"
|
|
133
|
+
],
|
|
134
|
+
"responseSchema": "FormDetail"
|
|
135
|
+
},
|
|
136
|
+
"createEntryLegacy": {
|
|
137
|
+
"operationId": "createEntryLegacy",
|
|
138
|
+
"summary": "Create an entry (legacy path)",
|
|
139
|
+
"description": "Legacy alias of `POST /forms/{form_token}/entries`, with identical behavior. New integrations should use the new path.",
|
|
140
|
+
"tag": "Entries",
|
|
141
|
+
"method": "post",
|
|
142
|
+
"path": "/forms/{form_token}",
|
|
143
|
+
"params": [
|
|
144
|
+
{
|
|
145
|
+
"name": "form_token",
|
|
146
|
+
"in": "path",
|
|
147
|
+
"required": true
|
|
148
|
+
}
|
|
149
|
+
],
|
|
150
|
+
"paramNames": [
|
|
151
|
+
"form_token"
|
|
152
|
+
],
|
|
153
|
+
"body": {
|
|
154
|
+
"contentType": "application/json",
|
|
155
|
+
"required": true,
|
|
156
|
+
"flatten": false,
|
|
157
|
+
"param": "body"
|
|
158
|
+
},
|
|
159
|
+
"successStatus": 201,
|
|
160
|
+
"scopes": [
|
|
161
|
+
"write_entries"
|
|
162
|
+
],
|
|
163
|
+
"responseSchema": "Entry"
|
|
164
|
+
},
|
|
165
|
+
"updateForm": {
|
|
166
|
+
"operationId": "updateForm",
|
|
167
|
+
"summary": "Edit a form",
|
|
168
|
+
"description": "Edits a form partially; also accepts `PUT`. The request body must contain at least one of `name` / `description` / `fields` / `setting` / `field_rules`, otherwise returns 400.\n- `fields` is changed incrementally through four kinds of operation, `add` / `remove` / `update` / `update_choices`; fields, choices and api_codes not mentioned are all kept;\n `update[].type` changes a field's type in place, and a change that clears entry data must carry `confirm_data_loss: true`.\n- `field_rules` does `add` / `remove` / `update` on rules located by the `index` that `GET /forms/{form_token}/field_rules` returns.\n- `setting`, as on create, accepts only whitelisted keys.\nReturns the full updated form structure.",
|
|
169
|
+
"tag": "Forms",
|
|
170
|
+
"method": "patch",
|
|
171
|
+
"path": "/forms/{form_token}",
|
|
172
|
+
"params": [
|
|
173
|
+
{
|
|
174
|
+
"name": "form_token",
|
|
175
|
+
"in": "path",
|
|
176
|
+
"required": true
|
|
177
|
+
}
|
|
178
|
+
],
|
|
179
|
+
"paramNames": [
|
|
180
|
+
"form_token"
|
|
181
|
+
],
|
|
182
|
+
"body": {
|
|
183
|
+
"contentType": "application/json",
|
|
184
|
+
"required": true,
|
|
185
|
+
"flatten": true
|
|
186
|
+
},
|
|
187
|
+
"successStatus": 200,
|
|
188
|
+
"scopes": [
|
|
189
|
+
"forms"
|
|
190
|
+
],
|
|
191
|
+
"responseSchema": "Form"
|
|
192
|
+
},
|
|
193
|
+
"checkFormFieldData": {
|
|
194
|
+
"operationId": "checkFormFieldData",
|
|
195
|
+
"summary": "Check whether fields already hold data",
|
|
196
|
+
"description": "Use before deleting a field or choice: checks in batch whether fields (or single choices of a field) already have submitted entries. Deleting a field or choice that still has entries deletes those entries with it, and they cannot be recovered.\nMatches the check the web editor runs before deleting.\n- Put every deletion target of one edit in the `checks` of a single call (at most 100, may span several fields); `results` matches `checks` one to one, in order.\n- When a target cannot be checked (for example, the field does not exist), its row returns `unavailable` with the reason; the other targets return as usual.\n- Returns 400 when `checks` is missing, empty, over 100, not a JSON array, or has an item that is not an object.",
|
|
197
|
+
"tag": "Forms",
|
|
198
|
+
"method": "get",
|
|
199
|
+
"path": "/forms/{form_token}/fields/check",
|
|
200
|
+
"params": [
|
|
201
|
+
{
|
|
202
|
+
"name": "form_token",
|
|
203
|
+
"in": "path",
|
|
204
|
+
"required": true
|
|
205
|
+
},
|
|
206
|
+
{
|
|
207
|
+
"name": "checks",
|
|
208
|
+
"in": "query",
|
|
209
|
+
"required": true,
|
|
210
|
+
"json": true
|
|
211
|
+
}
|
|
212
|
+
],
|
|
213
|
+
"paramNames": [
|
|
214
|
+
"form_token",
|
|
215
|
+
"checks"
|
|
216
|
+
],
|
|
217
|
+
"successStatus": 200,
|
|
218
|
+
"scopes": [
|
|
219
|
+
"forms"
|
|
220
|
+
],
|
|
221
|
+
"responseSchema": "FieldDataCheckResponse"
|
|
222
|
+
},
|
|
223
|
+
"previewFormFieldTypeChange": {
|
|
224
|
+
"operationId": "previewFormFieldTypeChange",
|
|
225
|
+
"summary": "Preview a field type change",
|
|
226
|
+
"description": "Use before changing a field's type (the field's `type` in PATCH /forms/{form_token}): changes no data, and counts, from the field's current entries, how many would be kept and how many cleared after the conversion.\nThe conversion happens on the original field (api_code and data column unchanged), so only entry data is affected; matches the preview the web editor shows before converting.\n- Put every conversion of one edit in the `checks` of a single call (at most 20); `results` matches `checks` one to one, in order.\n- `supported=false` means the field cannot be converted to the target type, and the actual edit is refused too.\n- When converting multi-line text to a choice field such as single choice / multiple choice, also returns `choice_count`, the number of choices that would be generated from existing entries, and `choice_limit_exceeded`, whether that exceeds the choice limit (when it does, the conversion is refused rather than truncated).\n- When an item cannot be previewed (the field does not exist, `target_type` is not a type available to this form, etc.), its row returns `unavailable` with the reason; the other items return as usual.\n- Returns 400 when `checks` is missing, empty, over 20, not a JSON array, or has an item that is not an object.",
|
|
227
|
+
"tag": "Forms",
|
|
228
|
+
"method": "get",
|
|
229
|
+
"path": "/forms/{form_token}/fields/preview_convert",
|
|
230
|
+
"params": [
|
|
231
|
+
{
|
|
232
|
+
"name": "form_token",
|
|
233
|
+
"in": "path",
|
|
234
|
+
"required": true
|
|
235
|
+
},
|
|
236
|
+
{
|
|
237
|
+
"name": "checks",
|
|
238
|
+
"in": "query",
|
|
239
|
+
"required": true,
|
|
240
|
+
"json": true
|
|
241
|
+
}
|
|
242
|
+
],
|
|
243
|
+
"paramNames": [
|
|
244
|
+
"form_token",
|
|
245
|
+
"checks"
|
|
246
|
+
],
|
|
247
|
+
"successStatus": 200,
|
|
248
|
+
"scopes": [
|
|
249
|
+
"forms"
|
|
250
|
+
],
|
|
251
|
+
"responseSchema": "FieldTypeChangePreviewResponse"
|
|
252
|
+
},
|
|
253
|
+
"listEntries": {
|
|
254
|
+
"operationId": "listEntries",
|
|
255
|
+
"summary": "List entries",
|
|
256
|
+
"description": "Returns form entries page by page, 50 per page by default, set with `limit` (max 1000). Sorted by serial number ascending by default; `next` is the serial number of the first entry of the next page.\n- `filters` / `keyword` trigger a conditional query; `created_at` returns only entries created at or after that time (and sorts by creation time instead);\n in both these cases, and when `sort` is passed, `next` becomes a row offset.\n- `fields` returns only the given fields (the serial number is always returned).\n- Each entry is keyed by field api_code (a field with api_code_alias set is keyed by its alias); for the value shapes see `EntryData`.",
|
|
257
|
+
"tag": "Entries",
|
|
258
|
+
"method": "get",
|
|
259
|
+
"path": "/forms/{form_token}/entries",
|
|
260
|
+
"params": [
|
|
261
|
+
{
|
|
262
|
+
"name": "form_token",
|
|
263
|
+
"in": "path",
|
|
264
|
+
"required": true
|
|
265
|
+
},
|
|
266
|
+
{
|
|
267
|
+
"name": "fields",
|
|
268
|
+
"in": "query",
|
|
269
|
+
"required": false
|
|
270
|
+
},
|
|
271
|
+
{
|
|
272
|
+
"name": "filters",
|
|
273
|
+
"in": "query",
|
|
274
|
+
"required": false,
|
|
275
|
+
"json": true
|
|
276
|
+
},
|
|
277
|
+
{
|
|
278
|
+
"name": "keyword",
|
|
279
|
+
"in": "query",
|
|
280
|
+
"required": false
|
|
281
|
+
},
|
|
282
|
+
{
|
|
283
|
+
"name": "sort",
|
|
284
|
+
"in": "query",
|
|
285
|
+
"required": false,
|
|
286
|
+
"json": true
|
|
287
|
+
},
|
|
288
|
+
{
|
|
289
|
+
"name": "created_at",
|
|
290
|
+
"in": "query",
|
|
291
|
+
"required": false
|
|
292
|
+
},
|
|
293
|
+
{
|
|
294
|
+
"name": "next",
|
|
295
|
+
"in": "query",
|
|
296
|
+
"required": false
|
|
297
|
+
},
|
|
298
|
+
{
|
|
299
|
+
"name": "skip",
|
|
300
|
+
"in": "query",
|
|
301
|
+
"required": false
|
|
302
|
+
},
|
|
303
|
+
{
|
|
304
|
+
"name": "include_labels",
|
|
305
|
+
"in": "query",
|
|
306
|
+
"required": false
|
|
307
|
+
},
|
|
308
|
+
{
|
|
309
|
+
"name": "limit",
|
|
310
|
+
"in": "query",
|
|
311
|
+
"required": false
|
|
312
|
+
}
|
|
313
|
+
],
|
|
314
|
+
"paramNames": [
|
|
315
|
+
"form_token",
|
|
316
|
+
"fields",
|
|
317
|
+
"filters",
|
|
318
|
+
"keyword",
|
|
319
|
+
"sort",
|
|
320
|
+
"created_at",
|
|
321
|
+
"next",
|
|
322
|
+
"skip",
|
|
323
|
+
"include_labels",
|
|
324
|
+
"limit"
|
|
325
|
+
],
|
|
326
|
+
"successStatus": 200,
|
|
327
|
+
"scopes": [
|
|
328
|
+
"read_entries"
|
|
329
|
+
],
|
|
330
|
+
"responseSchema": "EntryListResponse"
|
|
331
|
+
},
|
|
332
|
+
"createEntry": {
|
|
333
|
+
"operationId": "createEntry",
|
|
334
|
+
"summary": "Create an entry",
|
|
335
|
+
"description": "Submits one entry keyed by field api_code (or api_code_alias). Unknown keys are ignored; when no valid key remains, returns 400, with `error_description` starting with `Entry attributes cannot be empty` and naming each dropped key (not a field of this form, or a signature / calculated field that cannot be written).\n- The form's field display rules and field validation still apply; a validation failure returns 400, and `error_description` is `{ \"<api_code>\": [\"error\"] }` serialized as a JSON string.\n- Mobile fields skip SMS verification; signature fields and calculated fields cannot be written.\n- Returns 403 when the form's entry count has reached the plan limit.\n- Attachment fields accept several forms of input; see `EntryInput`.",
|
|
336
|
+
"tag": "Entries",
|
|
337
|
+
"method": "post",
|
|
338
|
+
"path": "/forms/{form_token}/entries",
|
|
339
|
+
"params": [
|
|
340
|
+
{
|
|
341
|
+
"name": "form_token",
|
|
342
|
+
"in": "path",
|
|
343
|
+
"required": true
|
|
344
|
+
}
|
|
345
|
+
],
|
|
346
|
+
"paramNames": [
|
|
347
|
+
"form_token"
|
|
348
|
+
],
|
|
349
|
+
"body": {
|
|
350
|
+
"contentType": "application/json",
|
|
351
|
+
"required": true,
|
|
352
|
+
"flatten": false,
|
|
353
|
+
"param": "body"
|
|
354
|
+
},
|
|
355
|
+
"successStatus": 201,
|
|
356
|
+
"scopes": [
|
|
357
|
+
"write_entries"
|
|
358
|
+
],
|
|
359
|
+
"responseSchema": "Entry"
|
|
360
|
+
},
|
|
361
|
+
"countEntries": {
|
|
362
|
+
"operationId": "countEntries",
|
|
363
|
+
"summary": "Count entries",
|
|
364
|
+
"description": "Returns the number of entries matching the filters, without the entries themselves. `filters` / `keyword` are the same as for `GET /forms/{form_token}/entries`; with neither, returns the total entry count of the form.\nA cooperator counts only the entries visible to their role.",
|
|
365
|
+
"tag": "Entries",
|
|
366
|
+
"method": "get",
|
|
367
|
+
"path": "/forms/{form_token}/entries/count",
|
|
368
|
+
"params": [
|
|
369
|
+
{
|
|
370
|
+
"name": "form_token",
|
|
371
|
+
"in": "path",
|
|
372
|
+
"required": true
|
|
373
|
+
},
|
|
374
|
+
{
|
|
375
|
+
"name": "filters",
|
|
376
|
+
"in": "query",
|
|
377
|
+
"required": false,
|
|
378
|
+
"json": true
|
|
379
|
+
},
|
|
380
|
+
{
|
|
381
|
+
"name": "keyword",
|
|
382
|
+
"in": "query",
|
|
383
|
+
"required": false
|
|
384
|
+
}
|
|
385
|
+
],
|
|
386
|
+
"paramNames": [
|
|
387
|
+
"form_token",
|
|
388
|
+
"filters",
|
|
389
|
+
"keyword"
|
|
390
|
+
],
|
|
391
|
+
"successStatus": 200,
|
|
392
|
+
"scopes": [
|
|
393
|
+
"read_entries"
|
|
394
|
+
],
|
|
395
|
+
"responseSchema": "EntryCountResponse"
|
|
396
|
+
},
|
|
397
|
+
"aggregateEntries": {
|
|
398
|
+
"operationId": "aggregateEntries",
|
|
399
|
+
"summary": "Aggregate entries",
|
|
400
|
+
"description": "Aggregates whole columns on the server over the entries matching the filters (sum, average, count, percentiles, etc.), optionally grouped by 1 to 2 fields. The response size depends only on the number of metrics and groups, not on the amount of data.\n- `metrics` is required, 1 to 20 items; the functions each field takes are in the `analytics.agg_funcs` returned by `GET /forms/{form_token}?include_analytics=true`.\n- `dimensions` is optional, at most 2 items; only fields whose `analytics.groupable` is true (single-value choice fields and date fields) can be grouped by, and a date field must specify `bucket`.\n- Without `dimensions`, `rows` has a single row; when grouped, one row per group, at most `limit` groups; `row_count` is the total number of groups, and `truncated` is true when there are more.\n- `filters` / `keyword` are the same as for the entry list, but `creator_id`, `serial_number` and association field conditions are not supported (returns 400).\n- Returns 400 when a field does not exist or is not readable by the caller, or a function or grouping does not apply to the field, and says which fields / functions / groupings are available.",
|
|
401
|
+
"tag": "Entries",
|
|
402
|
+
"method": "get",
|
|
403
|
+
"path": "/forms/{form_token}/entries/aggregate",
|
|
404
|
+
"params": [
|
|
405
|
+
{
|
|
406
|
+
"name": "form_token",
|
|
407
|
+
"in": "path",
|
|
408
|
+
"required": true
|
|
409
|
+
},
|
|
410
|
+
{
|
|
411
|
+
"name": "metrics",
|
|
412
|
+
"in": "query",
|
|
413
|
+
"required": false,
|
|
414
|
+
"json": true
|
|
415
|
+
},
|
|
416
|
+
{
|
|
417
|
+
"name": "dimensions",
|
|
418
|
+
"in": "query",
|
|
419
|
+
"required": false,
|
|
420
|
+
"json": true
|
|
421
|
+
},
|
|
422
|
+
{
|
|
423
|
+
"name": "limit",
|
|
424
|
+
"in": "query",
|
|
425
|
+
"required": false
|
|
426
|
+
},
|
|
427
|
+
{
|
|
428
|
+
"name": "filters",
|
|
429
|
+
"in": "query",
|
|
430
|
+
"required": false,
|
|
431
|
+
"json": true
|
|
432
|
+
},
|
|
433
|
+
{
|
|
434
|
+
"name": "keyword",
|
|
435
|
+
"in": "query",
|
|
436
|
+
"required": false
|
|
437
|
+
}
|
|
438
|
+
],
|
|
439
|
+
"paramNames": [
|
|
440
|
+
"form_token",
|
|
441
|
+
"metrics",
|
|
442
|
+
"dimensions",
|
|
443
|
+
"limit",
|
|
444
|
+
"filters",
|
|
445
|
+
"keyword"
|
|
446
|
+
],
|
|
447
|
+
"successStatus": 200,
|
|
448
|
+
"scopes": [
|
|
449
|
+
"read_entries"
|
|
450
|
+
],
|
|
451
|
+
"responseSchema": "EntryAggregateResponse"
|
|
452
|
+
},
|
|
453
|
+
"summarizeEntries": {
|
|
454
|
+
"operationId": "summarizeEntries",
|
|
455
|
+
"summary": "Summarize entries",
|
|
456
|
+
"description": "Reads an overall summary of the form's entries in one call: an overview (matching count, added today) plus the distribution or numeric statistics of each analysable field. The response is only a few KB, regardless of the amount of data.\n- Each field returns a uniform structure by `kind`: choice fields give each choice's count and share, matrix fields are grouped by question, numbers give min / max / sum / average, dates give earliest / latest, text gives the distinct count.\n- By default includes every analysable field (fields whose `analytics.summarisable` is true, plus `created_at`), at most 60; fields beyond that are listed in `omitted_fields`, and `truncated` is true.\n- Returns 400 when a field named in `fields` is not analysable or not readable by the caller.\n- `filters` / `keyword` are the same as for the entry list, but `creator_id`, `serial_number` and association field conditions are not supported (returns 400).",
|
|
457
|
+
"tag": "Entries",
|
|
458
|
+
"method": "get",
|
|
459
|
+
"path": "/forms/{form_token}/entries/summary",
|
|
460
|
+
"params": [
|
|
461
|
+
{
|
|
462
|
+
"name": "form_token",
|
|
463
|
+
"in": "path",
|
|
464
|
+
"required": true
|
|
465
|
+
},
|
|
466
|
+
{
|
|
467
|
+
"name": "fields",
|
|
468
|
+
"in": "query",
|
|
469
|
+
"required": false
|
|
470
|
+
},
|
|
471
|
+
{
|
|
472
|
+
"name": "include_overview",
|
|
473
|
+
"in": "query",
|
|
474
|
+
"required": false
|
|
475
|
+
},
|
|
476
|
+
{
|
|
477
|
+
"name": "filters",
|
|
478
|
+
"in": "query",
|
|
479
|
+
"required": false,
|
|
480
|
+
"json": true
|
|
481
|
+
},
|
|
482
|
+
{
|
|
483
|
+
"name": "keyword",
|
|
484
|
+
"in": "query",
|
|
485
|
+
"required": false
|
|
486
|
+
}
|
|
487
|
+
],
|
|
488
|
+
"paramNames": [
|
|
489
|
+
"form_token",
|
|
490
|
+
"fields",
|
|
491
|
+
"include_overview",
|
|
492
|
+
"filters",
|
|
493
|
+
"keyword"
|
|
494
|
+
],
|
|
495
|
+
"successStatus": 200,
|
|
496
|
+
"scopes": [
|
|
497
|
+
"read_entries"
|
|
498
|
+
],
|
|
499
|
+
"responseSchema": "EntrySummaryResponse"
|
|
500
|
+
},
|
|
501
|
+
"countFormViewEntries": {
|
|
502
|
+
"operationId": "countFormViewEntries",
|
|
503
|
+
"summary": "Count the entries of a view",
|
|
504
|
+
"description": "Same as `GET /forms/{form_token}/entries/count`, but only over the entries the view's filters select: the view's filters apply first, and `filters` / `keyword` narrow the range further on top of them. The view's columns and sort do not affect the result; a view with no filters is the same as the whole form.\nOnly views visible to the caller are accessible; otherwise 404 (View cannot be found).",
|
|
505
|
+
"tag": "Views",
|
|
506
|
+
"method": "get",
|
|
507
|
+
"path": "/forms/{form_token}/views/{view_token}/entries/count",
|
|
508
|
+
"params": [
|
|
509
|
+
{
|
|
510
|
+
"name": "form_token",
|
|
511
|
+
"in": "path",
|
|
512
|
+
"required": true
|
|
513
|
+
},
|
|
514
|
+
{
|
|
515
|
+
"name": "view_token",
|
|
516
|
+
"in": "path",
|
|
517
|
+
"required": true
|
|
518
|
+
},
|
|
519
|
+
{
|
|
520
|
+
"name": "filters",
|
|
521
|
+
"in": "query",
|
|
522
|
+
"required": false,
|
|
523
|
+
"json": true
|
|
524
|
+
},
|
|
525
|
+
{
|
|
526
|
+
"name": "keyword",
|
|
527
|
+
"in": "query",
|
|
528
|
+
"required": false
|
|
529
|
+
}
|
|
530
|
+
],
|
|
531
|
+
"paramNames": [
|
|
532
|
+
"form_token",
|
|
533
|
+
"view_token",
|
|
534
|
+
"filters",
|
|
535
|
+
"keyword"
|
|
536
|
+
],
|
|
537
|
+
"successStatus": 200,
|
|
538
|
+
"scopes": [
|
|
539
|
+
"read_entries"
|
|
540
|
+
],
|
|
541
|
+
"responseSchema": "EntryCountResponse"
|
|
542
|
+
},
|
|
543
|
+
"aggregateFormViewEntries": {
|
|
544
|
+
"operationId": "aggregateFormViewEntries",
|
|
545
|
+
"summary": "Aggregate the entries of a view",
|
|
546
|
+
"description": "Same as `GET /forms/{form_token}/entries/aggregate`, but only over the entries the view's filters select: the view's filters apply first, and `filters` / `keyword` narrow the range further on top of them. The view's columns and sort do not affect the result; a view with no filters is the same as the whole form.\nOnly views visible to the caller are accessible; otherwise 404 (View cannot be found).",
|
|
547
|
+
"tag": "Views",
|
|
548
|
+
"method": "get",
|
|
549
|
+
"path": "/forms/{form_token}/views/{view_token}/entries/aggregate",
|
|
550
|
+
"params": [
|
|
551
|
+
{
|
|
552
|
+
"name": "form_token",
|
|
553
|
+
"in": "path",
|
|
554
|
+
"required": true
|
|
555
|
+
},
|
|
556
|
+
{
|
|
557
|
+
"name": "view_token",
|
|
558
|
+
"in": "path",
|
|
559
|
+
"required": true
|
|
560
|
+
},
|
|
561
|
+
{
|
|
562
|
+
"name": "metrics",
|
|
563
|
+
"in": "query",
|
|
564
|
+
"required": false,
|
|
565
|
+
"json": true
|
|
566
|
+
},
|
|
567
|
+
{
|
|
568
|
+
"name": "dimensions",
|
|
569
|
+
"in": "query",
|
|
570
|
+
"required": false,
|
|
571
|
+
"json": true
|
|
572
|
+
},
|
|
573
|
+
{
|
|
574
|
+
"name": "limit",
|
|
575
|
+
"in": "query",
|
|
576
|
+
"required": false
|
|
577
|
+
},
|
|
578
|
+
{
|
|
579
|
+
"name": "filters",
|
|
580
|
+
"in": "query",
|
|
581
|
+
"required": false,
|
|
582
|
+
"json": true
|
|
583
|
+
},
|
|
584
|
+
{
|
|
585
|
+
"name": "keyword",
|
|
586
|
+
"in": "query",
|
|
587
|
+
"required": false
|
|
588
|
+
}
|
|
589
|
+
],
|
|
590
|
+
"paramNames": [
|
|
591
|
+
"form_token",
|
|
592
|
+
"view_token",
|
|
593
|
+
"metrics",
|
|
594
|
+
"dimensions",
|
|
595
|
+
"limit",
|
|
596
|
+
"filters",
|
|
597
|
+
"keyword"
|
|
598
|
+
],
|
|
599
|
+
"successStatus": 200,
|
|
600
|
+
"scopes": [
|
|
601
|
+
"read_entries"
|
|
602
|
+
],
|
|
603
|
+
"responseSchema": "EntryAggregateResponse"
|
|
604
|
+
},
|
|
605
|
+
"summarizeFormViewEntries": {
|
|
606
|
+
"operationId": "summarizeFormViewEntries",
|
|
607
|
+
"summary": "Summarize the entries of a view",
|
|
608
|
+
"description": "Same as `GET /forms/{form_token}/entries/summary`, but only over the entries the view's filters select: the view's filters apply first, and `filters` / `keyword` narrow the range further on top of them. The view's columns and sort do not affect the result; a view with no filters is the same as the whole form.\nOnly views visible to the caller are accessible; otherwise 404 (View cannot be found).",
|
|
609
|
+
"tag": "Views",
|
|
610
|
+
"method": "get",
|
|
611
|
+
"path": "/forms/{form_token}/views/{view_token}/entries/summary",
|
|
612
|
+
"params": [
|
|
613
|
+
{
|
|
614
|
+
"name": "form_token",
|
|
615
|
+
"in": "path",
|
|
616
|
+
"required": true
|
|
617
|
+
},
|
|
618
|
+
{
|
|
619
|
+
"name": "view_token",
|
|
620
|
+
"in": "path",
|
|
621
|
+
"required": true
|
|
622
|
+
},
|
|
623
|
+
{
|
|
624
|
+
"name": "fields",
|
|
625
|
+
"in": "query",
|
|
626
|
+
"required": false
|
|
627
|
+
},
|
|
628
|
+
{
|
|
629
|
+
"name": "include_overview",
|
|
630
|
+
"in": "query",
|
|
631
|
+
"required": false
|
|
632
|
+
},
|
|
633
|
+
{
|
|
634
|
+
"name": "filters",
|
|
635
|
+
"in": "query",
|
|
636
|
+
"required": false,
|
|
637
|
+
"json": true
|
|
638
|
+
},
|
|
639
|
+
{
|
|
640
|
+
"name": "keyword",
|
|
641
|
+
"in": "query",
|
|
642
|
+
"required": false
|
|
643
|
+
}
|
|
644
|
+
],
|
|
645
|
+
"paramNames": [
|
|
646
|
+
"form_token",
|
|
647
|
+
"view_token",
|
|
648
|
+
"fields",
|
|
649
|
+
"include_overview",
|
|
650
|
+
"filters",
|
|
651
|
+
"keyword"
|
|
652
|
+
],
|
|
653
|
+
"successStatus": 200,
|
|
654
|
+
"scopes": [
|
|
655
|
+
"read_entries"
|
|
656
|
+
],
|
|
657
|
+
"responseSchema": "EntrySummaryResponse"
|
|
658
|
+
},
|
|
659
|
+
"createEntriesBatch": {
|
|
660
|
+
"operationId": "createEntriesBatch",
|
|
661
|
+
"summary": "Create entries in batch",
|
|
662
|
+
"description": "Submits up to 200 entries at a time. Each entry is validated on its own; valid ones are written in bulk, invalid ones are recorded in `errors` (`index` is the position in the request array).\nReturns 201 when at least one succeeds and 422 when all fail; returns 400 when `entries` is empty or has over 200 entries.\nBefore writing, the entry count limit is checked against the number of entries submitted; over the limit returns 403. A batch write does not trigger the callbacks of a single create, but creates one \"import\" activity record and backfills calculated fields.",
|
|
663
|
+
"tag": "Entries",
|
|
664
|
+
"method": "post",
|
|
665
|
+
"path": "/forms/{form_token}/entries/batch",
|
|
666
|
+
"params": [
|
|
667
|
+
{
|
|
668
|
+
"name": "form_token",
|
|
669
|
+
"in": "path",
|
|
670
|
+
"required": true
|
|
671
|
+
}
|
|
672
|
+
],
|
|
673
|
+
"paramNames": [
|
|
674
|
+
"form_token"
|
|
675
|
+
],
|
|
676
|
+
"body": {
|
|
677
|
+
"contentType": "application/json",
|
|
678
|
+
"required": true,
|
|
679
|
+
"flatten": true
|
|
680
|
+
},
|
|
681
|
+
"successStatus": 201,
|
|
682
|
+
"scopes": [
|
|
683
|
+
"write_entries"
|
|
684
|
+
],
|
|
685
|
+
"responseSchema": "BatchCreateResult"
|
|
686
|
+
},
|
|
687
|
+
"patchEntriesBatch": {
|
|
688
|
+
"operationId": "patchEntriesBatch",
|
|
689
|
+
"summary": "Update entries in batch",
|
|
690
|
+
"description": "Partially updates entries in batch by serial number, up to 200 rows at a time. Each row requires `serial_number`; `entry` holds the fields to change (fields not mentioned stay unchanged).\nEach row is validated on its own; failed rows are recorded in `failed_rows` (`reason` is `invalid_serial_number` / `invalid_attributes`, etc.).\nReturns 200 when at least one row succeeds and 422 when all fail; returns 400 when `entries` is empty or has over 200 rows.\nBatch update does not handle the attachment lifecycle, so it **cannot write attachment fields** (including attachment columns inside table fields); update those one entry at a time.",
|
|
691
|
+
"tag": "Entries",
|
|
692
|
+
"method": "patch",
|
|
693
|
+
"path": "/forms/{form_token}/entries/batch",
|
|
694
|
+
"params": [
|
|
695
|
+
{
|
|
696
|
+
"name": "form_token",
|
|
697
|
+
"in": "path",
|
|
698
|
+
"required": true
|
|
699
|
+
}
|
|
700
|
+
],
|
|
701
|
+
"paramNames": [
|
|
702
|
+
"form_token"
|
|
703
|
+
],
|
|
704
|
+
"body": {
|
|
705
|
+
"contentType": "application/json",
|
|
706
|
+
"required": true,
|
|
707
|
+
"flatten": true
|
|
708
|
+
},
|
|
709
|
+
"successStatus": 200,
|
|
710
|
+
"scopes": [
|
|
711
|
+
"write_entries"
|
|
712
|
+
],
|
|
713
|
+
"responseSchema": "BatchPatchResult"
|
|
714
|
+
},
|
|
715
|
+
"getEntry": {
|
|
716
|
+
"operationId": "getEntry",
|
|
717
|
+
"summary": "Show an entry",
|
|
718
|
+
"description": "Returns one entry by serial number. `fields` limits the fields returned.",
|
|
719
|
+
"tag": "Entries",
|
|
720
|
+
"method": "get",
|
|
721
|
+
"path": "/forms/{form_token}/entries/{serial_number}",
|
|
722
|
+
"params": [
|
|
723
|
+
{
|
|
724
|
+
"name": "form_token",
|
|
725
|
+
"in": "path",
|
|
726
|
+
"required": true
|
|
727
|
+
},
|
|
728
|
+
{
|
|
729
|
+
"name": "serial_number",
|
|
730
|
+
"in": "path",
|
|
731
|
+
"required": true
|
|
732
|
+
},
|
|
733
|
+
{
|
|
734
|
+
"name": "fields",
|
|
735
|
+
"in": "query",
|
|
736
|
+
"required": false
|
|
737
|
+
},
|
|
738
|
+
{
|
|
739
|
+
"name": "include_labels",
|
|
740
|
+
"in": "query",
|
|
741
|
+
"required": false
|
|
742
|
+
}
|
|
743
|
+
],
|
|
744
|
+
"paramNames": [
|
|
745
|
+
"form_token",
|
|
746
|
+
"serial_number",
|
|
747
|
+
"fields",
|
|
748
|
+
"include_labels"
|
|
749
|
+
],
|
|
750
|
+
"successStatus": 200,
|
|
751
|
+
"scopes": [
|
|
752
|
+
"read_entries"
|
|
753
|
+
],
|
|
754
|
+
"responseSchema": "Entry"
|
|
755
|
+
},
|
|
756
|
+
"updateEntryViaPost": {
|
|
757
|
+
"operationId": "updateEntryViaPost",
|
|
758
|
+
"summary": "Partially update an entry (POST)",
|
|
759
|
+
"description": "A POST alias of `PATCH` on the same path, with the same partial-update semantics, for clients that cannot easily send PATCH.",
|
|
760
|
+
"tag": "Entries",
|
|
761
|
+
"method": "post",
|
|
762
|
+
"path": "/forms/{form_token}/entries/{serial_number}",
|
|
763
|
+
"params": [
|
|
764
|
+
{
|
|
765
|
+
"name": "form_token",
|
|
766
|
+
"in": "path",
|
|
767
|
+
"required": true
|
|
768
|
+
},
|
|
769
|
+
{
|
|
770
|
+
"name": "serial_number",
|
|
771
|
+
"in": "path",
|
|
772
|
+
"required": true
|
|
773
|
+
}
|
|
774
|
+
],
|
|
775
|
+
"paramNames": [
|
|
776
|
+
"form_token",
|
|
777
|
+
"serial_number"
|
|
778
|
+
],
|
|
779
|
+
"body": {
|
|
780
|
+
"contentType": "application/json",
|
|
781
|
+
"required": true,
|
|
782
|
+
"flatten": false,
|
|
783
|
+
"param": "body"
|
|
784
|
+
},
|
|
785
|
+
"successStatus": 200,
|
|
786
|
+
"scopes": [
|
|
787
|
+
"write_entries"
|
|
788
|
+
],
|
|
789
|
+
"responseSchema": "Entry"
|
|
790
|
+
},
|
|
791
|
+
"replaceEntry": {
|
|
792
|
+
"operationId": "replaceEntry",
|
|
793
|
+
"summary": "Replace an entry",
|
|
794
|
+
"description": "**Full replace**: writable fields absent from the request body are cleared, and only the values submitted in this request are kept. For a partial update use `PATCH`.\nReturns 400 when validation fails, with `error_description` being the JSON string of the field errors.",
|
|
795
|
+
"tag": "Entries",
|
|
796
|
+
"method": "put",
|
|
797
|
+
"path": "/forms/{form_token}/entries/{serial_number}",
|
|
798
|
+
"params": [
|
|
799
|
+
{
|
|
800
|
+
"name": "form_token",
|
|
801
|
+
"in": "path",
|
|
802
|
+
"required": true
|
|
803
|
+
},
|
|
804
|
+
{
|
|
805
|
+
"name": "serial_number",
|
|
806
|
+
"in": "path",
|
|
807
|
+
"required": true
|
|
808
|
+
}
|
|
809
|
+
],
|
|
810
|
+
"paramNames": [
|
|
811
|
+
"form_token",
|
|
812
|
+
"serial_number"
|
|
813
|
+
],
|
|
814
|
+
"body": {
|
|
815
|
+
"contentType": "application/json",
|
|
816
|
+
"required": true,
|
|
817
|
+
"flatten": false,
|
|
818
|
+
"param": "body"
|
|
819
|
+
},
|
|
820
|
+
"successStatus": 200,
|
|
821
|
+
"scopes": [
|
|
822
|
+
"write_entries"
|
|
823
|
+
],
|
|
824
|
+
"responseSchema": "Entry"
|
|
825
|
+
},
|
|
826
|
+
"updateEntry": {
|
|
827
|
+
"operationId": "updateEntry",
|
|
828
|
+
"summary": "Partially update an entry",
|
|
829
|
+
"description": "**Partial update**: only the fields present in the request body change; the rest keep their values. An attachment field is replaced as a whole set: to keep existing files, send back the URLs or attachment ids you read along with the new ones.\nReturns 400 when validation fails, with `error_description` being the JSON string of the field errors.",
|
|
830
|
+
"tag": "Entries",
|
|
831
|
+
"method": "patch",
|
|
832
|
+
"path": "/forms/{form_token}/entries/{serial_number}",
|
|
833
|
+
"params": [
|
|
834
|
+
{
|
|
835
|
+
"name": "form_token",
|
|
836
|
+
"in": "path",
|
|
837
|
+
"required": true
|
|
838
|
+
},
|
|
839
|
+
{
|
|
840
|
+
"name": "serial_number",
|
|
841
|
+
"in": "path",
|
|
842
|
+
"required": true
|
|
843
|
+
}
|
|
844
|
+
],
|
|
845
|
+
"paramNames": [
|
|
846
|
+
"form_token",
|
|
847
|
+
"serial_number"
|
|
848
|
+
],
|
|
849
|
+
"body": {
|
|
850
|
+
"contentType": "application/json",
|
|
851
|
+
"required": true,
|
|
852
|
+
"flatten": false,
|
|
853
|
+
"param": "body"
|
|
854
|
+
},
|
|
855
|
+
"successStatus": 200,
|
|
856
|
+
"scopes": [
|
|
857
|
+
"write_entries"
|
|
858
|
+
],
|
|
859
|
+
"responseSchema": "Entry"
|
|
860
|
+
},
|
|
861
|
+
"deleteEntry": {
|
|
862
|
+
"operationId": "deleteEntry",
|
|
863
|
+
"summary": "Delete an entry",
|
|
864
|
+
"description": "Deletes one entry and records a delete activity. On success returns the serial number of the deleted entry; returns 400 when deletion fails (for example, the form's state does not allow it).",
|
|
865
|
+
"tag": "Entries",
|
|
866
|
+
"method": "delete",
|
|
867
|
+
"path": "/forms/{form_token}/entries/{serial_number}",
|
|
868
|
+
"params": [
|
|
869
|
+
{
|
|
870
|
+
"name": "form_token",
|
|
871
|
+
"in": "path",
|
|
872
|
+
"required": true
|
|
873
|
+
},
|
|
874
|
+
{
|
|
875
|
+
"name": "serial_number",
|
|
876
|
+
"in": "path",
|
|
877
|
+
"required": true
|
|
878
|
+
}
|
|
879
|
+
],
|
|
880
|
+
"paramNames": [
|
|
881
|
+
"form_token",
|
|
882
|
+
"serial_number"
|
|
883
|
+
],
|
|
884
|
+
"successStatus": 200,
|
|
885
|
+
"scopes": [
|
|
886
|
+
"write_entries"
|
|
887
|
+
]
|
|
888
|
+
},
|
|
889
|
+
"listEntryComments": {
|
|
890
|
+
"operationId": "listEntryComments",
|
|
891
|
+
"summary": "List an entry's comments",
|
|
892
|
+
"description": "Returns all comments on the entry, oldest first, with their creators, mentioned users and attachments. A caller who is a cooperator needs entry read permission on the form, and the entry must be within their data scope; otherwise returns 400.",
|
|
893
|
+
"tag": "Comments",
|
|
894
|
+
"method": "get",
|
|
895
|
+
"path": "/forms/{form_token}/entries/{serial_number}/comments",
|
|
896
|
+
"params": [
|
|
897
|
+
{
|
|
898
|
+
"name": "form_token",
|
|
899
|
+
"in": "path",
|
|
900
|
+
"required": true
|
|
901
|
+
},
|
|
902
|
+
{
|
|
903
|
+
"name": "serial_number",
|
|
904
|
+
"in": "path",
|
|
905
|
+
"required": true
|
|
906
|
+
}
|
|
907
|
+
],
|
|
908
|
+
"paramNames": [
|
|
909
|
+
"form_token",
|
|
910
|
+
"serial_number"
|
|
911
|
+
],
|
|
912
|
+
"successStatus": 200,
|
|
913
|
+
"scopes": [
|
|
914
|
+
"read_entries"
|
|
915
|
+
]
|
|
916
|
+
},
|
|
917
|
+
"createEntryComment": {
|
|
918
|
+
"operationId": "createEntryComment",
|
|
919
|
+
"summary": "Comment on an entry",
|
|
920
|
+
"description": "Creates a comment on the entry, authored by the caller; content is stripped of leading and trailing whitespace. Returns 400 when content is empty or longer than 2000 characters. Mention a user in content with @[<user_id>] (a 24-character hex user id); the mentioned user must be a cooperator on the form, otherwise returns 400 and no comment is created. parent_id makes the comment a reply; the parent comment must belong to the same entry, otherwise returns 400. This endpoint cannot attach files. A caller who is a cooperator needs entry read permission, and the entry must be within their data scope; otherwise returns 400.",
|
|
921
|
+
"tag": "Comments",
|
|
922
|
+
"method": "post",
|
|
923
|
+
"path": "/forms/{form_token}/entries/{serial_number}/comments",
|
|
924
|
+
"params": [
|
|
925
|
+
{
|
|
926
|
+
"name": "form_token",
|
|
927
|
+
"in": "path",
|
|
928
|
+
"required": true
|
|
929
|
+
},
|
|
930
|
+
{
|
|
931
|
+
"name": "serial_number",
|
|
932
|
+
"in": "path",
|
|
933
|
+
"required": true
|
|
934
|
+
}
|
|
935
|
+
],
|
|
936
|
+
"paramNames": [
|
|
937
|
+
"form_token",
|
|
938
|
+
"serial_number"
|
|
939
|
+
],
|
|
940
|
+
"body": {
|
|
941
|
+
"contentType": "application/json",
|
|
942
|
+
"required": true,
|
|
943
|
+
"flatten": true
|
|
944
|
+
},
|
|
945
|
+
"successStatus": 201,
|
|
946
|
+
"scopes": [
|
|
947
|
+
"read_entries"
|
|
948
|
+
],
|
|
949
|
+
"responseSchema": "EntryComment"
|
|
950
|
+
},
|
|
951
|
+
"updateEntryComment": {
|
|
952
|
+
"operationId": "updateEntryComment",
|
|
953
|
+
"summary": "Update a comment on an entry",
|
|
954
|
+
"description": "Changes a comment's content; PUT is accepted too. Only the comment's author can edit it; not even a form admin can edit someone else's comment; otherwise returns 400. content follows the same rules as on create (leading and trailing whitespace stripped, at most 2000 characters, mentioned users must be cooperators); the comment's existing attachments stay unchanged. Returns 404 (comment cannot be found) when the comment does not belong to the entry.",
|
|
955
|
+
"tag": "Comments",
|
|
956
|
+
"method": "patch",
|
|
957
|
+
"path": "/forms/{form_token}/entries/{serial_number}/comments/{comment_id}",
|
|
958
|
+
"params": [
|
|
959
|
+
{
|
|
960
|
+
"name": "form_token",
|
|
961
|
+
"in": "path",
|
|
962
|
+
"required": true
|
|
963
|
+
},
|
|
964
|
+
{
|
|
965
|
+
"name": "serial_number",
|
|
966
|
+
"in": "path",
|
|
967
|
+
"required": true
|
|
968
|
+
},
|
|
969
|
+
{
|
|
970
|
+
"name": "comment_id",
|
|
971
|
+
"in": "path",
|
|
972
|
+
"required": true
|
|
973
|
+
}
|
|
974
|
+
],
|
|
975
|
+
"paramNames": [
|
|
976
|
+
"form_token",
|
|
977
|
+
"serial_number",
|
|
978
|
+
"comment_id"
|
|
979
|
+
],
|
|
980
|
+
"body": {
|
|
981
|
+
"contentType": "application/json",
|
|
982
|
+
"required": true,
|
|
983
|
+
"flatten": true
|
|
984
|
+
},
|
|
985
|
+
"successStatus": 200,
|
|
986
|
+
"scopes": [
|
|
987
|
+
"read_entries"
|
|
988
|
+
],
|
|
989
|
+
"responseSchema": "EntryComment"
|
|
990
|
+
},
|
|
991
|
+
"deleteEntryComment": {
|
|
992
|
+
"operationId": "deleteEntryComment",
|
|
993
|
+
"summary": "Delete a comment on an entry",
|
|
994
|
+
"description": "Deletes a comment. The comment's author, the form's creator, or a cooperator with the admin role can delete it; any other cooperator gets 400. Returns 404 (comment cannot be found) for a comment that is already deleted or does not belong to the entry.",
|
|
995
|
+
"tag": "Comments",
|
|
996
|
+
"method": "delete",
|
|
997
|
+
"path": "/forms/{form_token}/entries/{serial_number}/comments/{comment_id}",
|
|
998
|
+
"params": [
|
|
999
|
+
{
|
|
1000
|
+
"name": "form_token",
|
|
1001
|
+
"in": "path",
|
|
1002
|
+
"required": true
|
|
1003
|
+
},
|
|
1004
|
+
{
|
|
1005
|
+
"name": "serial_number",
|
|
1006
|
+
"in": "path",
|
|
1007
|
+
"required": true
|
|
1008
|
+
},
|
|
1009
|
+
{
|
|
1010
|
+
"name": "comment_id",
|
|
1011
|
+
"in": "path",
|
|
1012
|
+
"required": true
|
|
1013
|
+
}
|
|
1014
|
+
],
|
|
1015
|
+
"paramNames": [
|
|
1016
|
+
"form_token",
|
|
1017
|
+
"serial_number",
|
|
1018
|
+
"comment_id"
|
|
1019
|
+
],
|
|
1020
|
+
"successStatus": 200,
|
|
1021
|
+
"scopes": [
|
|
1022
|
+
"read_entries"
|
|
1023
|
+
]
|
|
1024
|
+
},
|
|
1025
|
+
"getFormSetting": {
|
|
1026
|
+
"operationId": "getFormSetting",
|
|
1027
|
+
"summary": "Show a form's settings",
|
|
1028
|
+
"description": "Returns the form's after-submission settings, collection rules (closing rules, fill frequency), access policy, WeChat restrictions and Webhook settings.\nThe `weixin` key is returned only when the form has a WeChat Official Account selected (selected_weixin_appid is present).",
|
|
1029
|
+
"tag": "Form Settings",
|
|
1030
|
+
"method": "get",
|
|
1031
|
+
"path": "/forms/{form_token}/setting",
|
|
1032
|
+
"params": [
|
|
1033
|
+
{
|
|
1034
|
+
"name": "form_token",
|
|
1035
|
+
"in": "path",
|
|
1036
|
+
"required": true
|
|
1037
|
+
}
|
|
1038
|
+
],
|
|
1039
|
+
"paramNames": [
|
|
1040
|
+
"form_token"
|
|
1041
|
+
],
|
|
1042
|
+
"successStatus": 200,
|
|
1043
|
+
"scopes": [
|
|
1044
|
+
"form_setting"
|
|
1045
|
+
],
|
|
1046
|
+
"responseSchema": "FormSetting"
|
|
1047
|
+
},
|
|
1048
|
+
"updateFormSetting": {
|
|
1049
|
+
"operationId": "updateFormSetting",
|
|
1050
|
+
"summary": "Update a form's settings",
|
|
1051
|
+
"description": "Partially updates the form's settings, writing only the keys present in the request; PUT is accepted too.\n- `submission_region_limited` / `submission_regions` are a paid feature and read-only here; to write them, use `setting` on the \"Edit a form\" endpoint.\n- `manually_close_rule`, `by_time_range_close_rule`, `by_entries_close_rule` and `fill_frequency` are nested objects; the server creates or updates them as nested attributes.\n- Returns `{ \"status\": \"ok\" }` on success; returns 400 when model validation fails, with body `{ \"errors\": \"...\", \"status\": \"failed\" }` (not the common error shape).",
|
|
1052
|
+
"tag": "Form Settings",
|
|
1053
|
+
"method": "patch",
|
|
1054
|
+
"path": "/forms/{form_token}/setting",
|
|
1055
|
+
"params": [
|
|
1056
|
+
{
|
|
1057
|
+
"name": "form_token",
|
|
1058
|
+
"in": "path",
|
|
1059
|
+
"required": true
|
|
1060
|
+
}
|
|
1061
|
+
],
|
|
1062
|
+
"paramNames": [
|
|
1063
|
+
"form_token"
|
|
1064
|
+
],
|
|
1065
|
+
"body": {
|
|
1066
|
+
"contentType": "application/json",
|
|
1067
|
+
"required": true,
|
|
1068
|
+
"flatten": false,
|
|
1069
|
+
"param": "body"
|
|
1070
|
+
},
|
|
1071
|
+
"successStatus": 200,
|
|
1072
|
+
"scopes": [
|
|
1073
|
+
"form_setting"
|
|
1074
|
+
],
|
|
1075
|
+
"responseSchema": "FormSettingSaveOk"
|
|
1076
|
+
},
|
|
1077
|
+
"getManuallyCloseRule": {
|
|
1078
|
+
"operationId": "getManuallyCloseRule",
|
|
1079
|
+
"summary": "Show whether a form is manually closed",
|
|
1080
|
+
"description": "Returns whether the form has been manually closed for collection. Returns `{ \"closed\": false }` when no manual closing rule has ever been created.",
|
|
1081
|
+
"tag": "Form Settings",
|
|
1082
|
+
"method": "get",
|
|
1083
|
+
"path": "/forms/{form_token}/manually_close_rule",
|
|
1084
|
+
"params": [
|
|
1085
|
+
{
|
|
1086
|
+
"name": "form_token",
|
|
1087
|
+
"in": "path",
|
|
1088
|
+
"required": true
|
|
1089
|
+
}
|
|
1090
|
+
],
|
|
1091
|
+
"paramNames": [
|
|
1092
|
+
"form_token"
|
|
1093
|
+
],
|
|
1094
|
+
"successStatus": 200,
|
|
1095
|
+
"scopes": [
|
|
1096
|
+
"form_setting"
|
|
1097
|
+
],
|
|
1098
|
+
"responseSchema": "ManuallyCloseRule"
|
|
1099
|
+
},
|
|
1100
|
+
"updateManuallyCloseRule": {
|
|
1101
|
+
"operationId": "updateManuallyCloseRule",
|
|
1102
|
+
"summary": "Open or close collection manually",
|
|
1103
|
+
"description": "Opens (true) or closes (false) the form for collection manually through `open`; PUT is accepted too.\nCreates the manual closing rule when none exists, updates it otherwise. When the manual closed state changes, the server deletes the form's other closing rules (by time, by entry count, etc.).\nReturns 400 when the `open` parameter is missing (the response body depends on the server implementation); returns 400 when saving fails, with body `{ \"errors\": \"...\", \"status\": \"failed\" }`.",
|
|
1104
|
+
"tag": "Form Settings",
|
|
1105
|
+
"method": "patch",
|
|
1106
|
+
"path": "/forms/{form_token}/manually_close_rule",
|
|
1107
|
+
"params": [
|
|
1108
|
+
{
|
|
1109
|
+
"name": "form_token",
|
|
1110
|
+
"in": "path",
|
|
1111
|
+
"required": true
|
|
1112
|
+
}
|
|
1113
|
+
],
|
|
1114
|
+
"paramNames": [
|
|
1115
|
+
"form_token"
|
|
1116
|
+
],
|
|
1117
|
+
"body": {
|
|
1118
|
+
"contentType": "application/json",
|
|
1119
|
+
"required": true,
|
|
1120
|
+
"flatten": true
|
|
1121
|
+
},
|
|
1122
|
+
"successStatus": 200,
|
|
1123
|
+
"scopes": [
|
|
1124
|
+
"form_setting"
|
|
1125
|
+
],
|
|
1126
|
+
"responseSchema": "ManuallyCloseRule"
|
|
1127
|
+
},
|
|
1128
|
+
"updateAccessPolicy": {
|
|
1129
|
+
"operationId": "updateAccessPolicy",
|
|
1130
|
+
"summary": "Update the fill frequency limit",
|
|
1131
|
+
"description": "Updates the form's fill frequency limit (fill_frequency); PUT is accepted too.\nThis endpoint takes only the `fill_frequency` key; for the other access policy keys, use PATCH /forms/{form_token}/setting.\nReturns `{ \"status\": \"ok\" }` on success; returns 400 when validation fails, with body `{ \"errors\": \"...\", \"status\": \"failed\" }` (not the common error shape).",
|
|
1132
|
+
"tag": "Form Settings",
|
|
1133
|
+
"method": "patch",
|
|
1134
|
+
"path": "/forms/{form_token}/access_policy",
|
|
1135
|
+
"params": [
|
|
1136
|
+
{
|
|
1137
|
+
"name": "form_token",
|
|
1138
|
+
"in": "path",
|
|
1139
|
+
"required": true
|
|
1140
|
+
}
|
|
1141
|
+
],
|
|
1142
|
+
"paramNames": [
|
|
1143
|
+
"form_token"
|
|
1144
|
+
],
|
|
1145
|
+
"body": {
|
|
1146
|
+
"contentType": "application/json",
|
|
1147
|
+
"required": true,
|
|
1148
|
+
"flatten": true
|
|
1149
|
+
},
|
|
1150
|
+
"successStatus": 200,
|
|
1151
|
+
"scopes": [
|
|
1152
|
+
"form_setting"
|
|
1153
|
+
],
|
|
1154
|
+
"responseSchema": "FormSettingSaveOk"
|
|
1155
|
+
},
|
|
1156
|
+
"createFormWebhook": {
|
|
1157
|
+
"operationId": "createFormWebhook",
|
|
1158
|
+
"summary": "Set the Webhook",
|
|
1159
|
+
"description": "Sets the form's entry push URL `entry_post_url` and turns on pushing new entries (post_new_entry = true).\nThe plan must support Webhook; otherwise returns 402 with an empty body.\nThe server does not check the save result and echoes `entry_post_url` from the settings as is (whether an invalid URL was persisted depends on the server implementation).",
|
|
1160
|
+
"tag": "Form Settings",
|
|
1161
|
+
"method": "post",
|
|
1162
|
+
"path": "/forms/{form_token}/webhook",
|
|
1163
|
+
"params": [
|
|
1164
|
+
{
|
|
1165
|
+
"name": "form_token",
|
|
1166
|
+
"in": "path",
|
|
1167
|
+
"required": true
|
|
1168
|
+
}
|
|
1169
|
+
],
|
|
1170
|
+
"paramNames": [
|
|
1171
|
+
"form_token"
|
|
1172
|
+
],
|
|
1173
|
+
"body": {
|
|
1174
|
+
"contentType": "application/json",
|
|
1175
|
+
"required": true,
|
|
1176
|
+
"flatten": true
|
|
1177
|
+
},
|
|
1178
|
+
"successStatus": 200,
|
|
1179
|
+
"scopes": [
|
|
1180
|
+
"form_setting"
|
|
1181
|
+
],
|
|
1182
|
+
"responseSchema": "FormWebhook"
|
|
1183
|
+
},
|
|
1184
|
+
"deleteFormWebhook": {
|
|
1185
|
+
"operationId": "deleteFormWebhook",
|
|
1186
|
+
"summary": "Delete the Webhook",
|
|
1187
|
+
"description": "Removes `entry_post_url` from the form's settings. Returns 200 with an empty body on success.",
|
|
1188
|
+
"tag": "Form Settings",
|
|
1189
|
+
"method": "delete",
|
|
1190
|
+
"path": "/forms/{form_token}/webhook",
|
|
1191
|
+
"params": [
|
|
1192
|
+
{
|
|
1193
|
+
"name": "form_token",
|
|
1194
|
+
"in": "path",
|
|
1195
|
+
"required": true
|
|
1196
|
+
}
|
|
1197
|
+
],
|
|
1198
|
+
"paramNames": [
|
|
1199
|
+
"form_token"
|
|
1200
|
+
],
|
|
1201
|
+
"successStatus": 200,
|
|
1202
|
+
"scopes": [
|
|
1203
|
+
"form_setting"
|
|
1204
|
+
]
|
|
1205
|
+
},
|
|
1206
|
+
"updateFormTheme": {
|
|
1207
|
+
"operationId": "updateFormTheme",
|
|
1208
|
+
"summary": "Update a form's theme",
|
|
1209
|
+
"description": "Partially updates the form's theme (colors, background, header image, typography, form container, submit button); PUT is accepted too.\n- The request body must contain at least one of primary_color / secondary_color / wallpaper / header / typography / form_container / submit_button (`generate_header_image` is turned into header.header_image_url, so it counts too); otherwise 400.\n- Header image source precedence: header_image_upload_token > header_image_base64 > header_image_url > header_image_attachment_id; when a header image is set and header.type is not given, header.type is set to image.\n- Background image source precedence: background_image_upload_token > background_image_url > background_image_attachment_id. Setting or removing the background image also removes the preset background image that comes with the theme template; the background color is kept.\n- `header_image_attachment_id` / `background_image_attachment_id` take the `attachment_id` returned by \"Upload a form image\" (image_type header / wallpaper); pass an empty string `\"\"` to remove the current image.\n- `header.carousel_images` replaces the carousel images as a whole: at most 5, not empty; each item gives one of image_upload_token / image_url / attachment_id, and an attachment_id must be a carousel image the form already has; when it is passed and header.type is not given, header.type is set to carousel.\n- Keys in `text_style` and `typography.*` use underscores (e.g. font_size); the server converts them to hyphenated CSS keys and merges them into the existing styles; the response uses the hyphenated keys.\n- `generate_header_image` has AI generate a header image and consumes AI points; returns 402 when points are insufficient, 400 when generation fails.\n- An image upload_token is the `form_image_token` used by \"Upload a form image\"; the image purpose it records must match (header / wallpaper / carousel), and its upload must be complete.",
|
|
1210
|
+
"tag": "Form Settings",
|
|
1211
|
+
"method": "patch",
|
|
1212
|
+
"path": "/forms/{form_token}/theme",
|
|
1213
|
+
"params": [
|
|
1214
|
+
{
|
|
1215
|
+
"name": "form_token",
|
|
1216
|
+
"in": "path",
|
|
1217
|
+
"required": true
|
|
1218
|
+
}
|
|
1219
|
+
],
|
|
1220
|
+
"paramNames": [
|
|
1221
|
+
"form_token"
|
|
1222
|
+
],
|
|
1223
|
+
"body": {
|
|
1224
|
+
"contentType": "application/json",
|
|
1225
|
+
"required": true,
|
|
1226
|
+
"flatten": false,
|
|
1227
|
+
"param": "body"
|
|
1228
|
+
},
|
|
1229
|
+
"successStatus": 200,
|
|
1230
|
+
"scopes": [
|
|
1231
|
+
"form_setting"
|
|
1232
|
+
],
|
|
1233
|
+
"responseSchema": "FormTheme"
|
|
1234
|
+
},
|
|
1235
|
+
"getExamSetting": {
|
|
1236
|
+
"operationId": "getExamSetting",
|
|
1237
|
+
"summary": "Show a form's exam settings",
|
|
1238
|
+
"description": "Returns an exam form's settings for what is shown after the exam is submitted, the time limit, the pre-exam notice and score range comments.\nOnly for forms in the exam scene (scene = exam); otherwise returns 400. Returns an empty object `{}` when the form has no exam settings record yet.",
|
|
1239
|
+
"tag": "Form Settings",
|
|
1240
|
+
"method": "get",
|
|
1241
|
+
"path": "/forms/{form_token}/exam_setting",
|
|
1242
|
+
"params": [
|
|
1243
|
+
{
|
|
1244
|
+
"name": "form_token",
|
|
1245
|
+
"in": "path",
|
|
1246
|
+
"required": true
|
|
1247
|
+
}
|
|
1248
|
+
],
|
|
1249
|
+
"paramNames": [
|
|
1250
|
+
"form_token"
|
|
1251
|
+
],
|
|
1252
|
+
"successStatus": 200,
|
|
1253
|
+
"scopes": [
|
|
1254
|
+
"form_setting"
|
|
1255
|
+
],
|
|
1256
|
+
"responseSchema": "ExamSetting"
|
|
1257
|
+
},
|
|
1258
|
+
"updateExamSetting": {
|
|
1259
|
+
"operationId": "updateExamSetting",
|
|
1260
|
+
"summary": "Update a form's exam settings",
|
|
1261
|
+
"description": "Partially updates an exam form's settings; PUT is accepted too. Only for exam-scene forms; otherwise returns 400.\n- When the plan does not support \"show the score after submission\", `notice_after_filling_mode` is forced to none and `success_message_rich_text` is ignored.\n- `interval_comments` replaces the existing range comments as a whole; it takes effect only when `notice_after_filling_mode` (passed in this request or already saved) is grade / explaination / answer; passing an empty array does not turn range comments off.\n- Range comments must have end_point ≥ start_point and must not overlap; otherwise 400.\n- Passing `show_timeout: true` returns 400 when the form already has required questions; once the time limit is on, question fields cannot be made required (required candidate info fields are not affected); to turn on the time limit, make the questions optional first.\n- When `notice_after_filling_mode` is not none, the server clears success_redirect_url / success_redirect_fields in the form's settings.\n- A request body with no recognized keys is a no-op and returns the current settings.",
|
|
1262
|
+
"tag": "Form Settings",
|
|
1263
|
+
"method": "patch",
|
|
1264
|
+
"path": "/forms/{form_token}/exam_setting",
|
|
1265
|
+
"params": [
|
|
1266
|
+
{
|
|
1267
|
+
"name": "form_token",
|
|
1268
|
+
"in": "path",
|
|
1269
|
+
"required": true
|
|
1270
|
+
}
|
|
1271
|
+
],
|
|
1272
|
+
"paramNames": [
|
|
1273
|
+
"form_token"
|
|
1274
|
+
],
|
|
1275
|
+
"body": {
|
|
1276
|
+
"contentType": "application/json",
|
|
1277
|
+
"required": true,
|
|
1278
|
+
"flatten": true
|
|
1279
|
+
},
|
|
1280
|
+
"successStatus": 200,
|
|
1281
|
+
"scopes": [
|
|
1282
|
+
"form_setting"
|
|
1283
|
+
],
|
|
1284
|
+
"responseSchema": "ExamSetting"
|
|
1285
|
+
},
|
|
1286
|
+
"getEvaluationSetting": {
|
|
1287
|
+
"operationId": "getEvaluationSetting",
|
|
1288
|
+
"summary": "Show a form's evaluation settings",
|
|
1289
|
+
"description": "Returns an evaluation form's report display, dimension (indicator) settings and total score range comments.\nOnly for forms in the evaluation scene (scene = evaluation); otherwise returns 400. Returns an empty object `{}` when the form has no evaluation settings record yet.",
|
|
1290
|
+
"tag": "Form Settings",
|
|
1291
|
+
"method": "get",
|
|
1292
|
+
"path": "/forms/{form_token}/evaluation_setting",
|
|
1293
|
+
"params": [
|
|
1294
|
+
{
|
|
1295
|
+
"name": "form_token",
|
|
1296
|
+
"in": "path",
|
|
1297
|
+
"required": true
|
|
1298
|
+
}
|
|
1299
|
+
],
|
|
1300
|
+
"paramNames": [
|
|
1301
|
+
"form_token"
|
|
1302
|
+
],
|
|
1303
|
+
"successStatus": 200,
|
|
1304
|
+
"scopes": [
|
|
1305
|
+
"form_setting"
|
|
1306
|
+
],
|
|
1307
|
+
"responseSchema": "EvaluationSetting"
|
|
1308
|
+
},
|
|
1309
|
+
"updateEvaluationSetting": {
|
|
1310
|
+
"operationId": "updateEvaluationSetting",
|
|
1311
|
+
"summary": "Update a form's evaluation settings",
|
|
1312
|
+
"description": "Partially updates an evaluation form's settings; PUT is accepted too. Only for evaluation-scene forms; otherwise returns 400.\n- When the plan does not support \"show the evaluation report after submission\", `notice_after_filling_mode` is forced to none.\n- `evaluation_comments` replaces the total score range comments as a whole, and an empty array turns range comments off; it takes effect only when `notice_after_filling_mode` (passed in this request or already saved) is reports / customize.\n- A comment by score range must give both start_point and end_point; comments written with conditions in the form editor read back as `id` + `conditions` and must be passed back with their original id when updating (only comment / retry may change; the conditions cannot be changed and no range can be added); leaving one out or changing it returns 400.\n- `indicator_setting.indicators` replaces the dimensions as a whole; pass `api_code` back to keep an existing dimension's identity. A dimension can bind only scorable questions visible on the form, referenced by `field_api_codes` or `field_cids`; referencing an unknown field returns 400.\n- When `notice_after_filling_mode` is not none, the server clears success_redirect_url / success_redirect_fields in the form's settings.\n- A request body with no recognized keys is a no-op and returns the current settings.",
|
|
1313
|
+
"tag": "Form Settings",
|
|
1314
|
+
"method": "patch",
|
|
1315
|
+
"path": "/forms/{form_token}/evaluation_setting",
|
|
1316
|
+
"params": [
|
|
1317
|
+
{
|
|
1318
|
+
"name": "form_token",
|
|
1319
|
+
"in": "path",
|
|
1320
|
+
"required": true
|
|
1321
|
+
}
|
|
1322
|
+
],
|
|
1323
|
+
"paramNames": [
|
|
1324
|
+
"form_token"
|
|
1325
|
+
],
|
|
1326
|
+
"body": {
|
|
1327
|
+
"contentType": "application/json",
|
|
1328
|
+
"required": true,
|
|
1329
|
+
"flatten": false,
|
|
1330
|
+
"param": "body"
|
|
1331
|
+
},
|
|
1332
|
+
"successStatus": 200,
|
|
1333
|
+
"scopes": [
|
|
1334
|
+
"form_setting"
|
|
1335
|
+
],
|
|
1336
|
+
"responseSchema": "EvaluationSetting"
|
|
1337
|
+
},
|
|
1338
|
+
"listFieldRules": {
|
|
1339
|
+
"operationId": "listFieldRules",
|
|
1340
|
+
"summary": "Show a form's field display rules",
|
|
1341
|
+
"description": "Returns the form's effective field display rules (logic jumps). `index` is the 0-based position; field_rules updates and removals in PATCH /forms/{form_token} locate rules by this index.",
|
|
1342
|
+
"tag": "Forms",
|
|
1343
|
+
"method": "get",
|
|
1344
|
+
"path": "/forms/{form_token}/field_rules",
|
|
1345
|
+
"params": [
|
|
1346
|
+
{
|
|
1347
|
+
"name": "form_token",
|
|
1348
|
+
"in": "path",
|
|
1349
|
+
"required": true
|
|
1350
|
+
}
|
|
1351
|
+
],
|
|
1352
|
+
"paramNames": [
|
|
1353
|
+
"form_token"
|
|
1354
|
+
],
|
|
1355
|
+
"successStatus": 200,
|
|
1356
|
+
"scopes": [
|
|
1357
|
+
"forms"
|
|
1358
|
+
]
|
|
1359
|
+
},
|
|
1360
|
+
"listExtendedAttributes": {
|
|
1361
|
+
"operationId": "listExtendedAttributes",
|
|
1362
|
+
"summary": "List the source-tracking links",
|
|
1363
|
+
"description": "Returns the \"track entry source\" extended attributes generated for the form (oldest first), each with the fill link that carries its value.",
|
|
1364
|
+
"tag": "Forms",
|
|
1365
|
+
"method": "get",
|
|
1366
|
+
"path": "/forms/{form_token}/extended_attributes",
|
|
1367
|
+
"params": [
|
|
1368
|
+
{
|
|
1369
|
+
"name": "form_token",
|
|
1370
|
+
"in": "path",
|
|
1371
|
+
"required": true
|
|
1372
|
+
}
|
|
1373
|
+
],
|
|
1374
|
+
"paramNames": [
|
|
1375
|
+
"form_token"
|
|
1376
|
+
],
|
|
1377
|
+
"successStatus": 200,
|
|
1378
|
+
"scopes": [
|
|
1379
|
+
"forms"
|
|
1380
|
+
]
|
|
1381
|
+
},
|
|
1382
|
+
"listFormCooperators": {
|
|
1383
|
+
"operationId": "listFormCooperators",
|
|
1384
|
+
"summary": "List a form's cooperators",
|
|
1385
|
+
"description": "Returns the form's cooperators and their role names, including roles inherited from folders; when a user gets roles through several paths, only the nearest one is returned.",
|
|
1386
|
+
"tag": "Forms",
|
|
1387
|
+
"method": "get",
|
|
1388
|
+
"path": "/forms/{form_token}/cooperators",
|
|
1389
|
+
"params": [
|
|
1390
|
+
{
|
|
1391
|
+
"name": "form_token",
|
|
1392
|
+
"in": "path",
|
|
1393
|
+
"required": true
|
|
1394
|
+
}
|
|
1395
|
+
],
|
|
1396
|
+
"paramNames": [
|
|
1397
|
+
"form_token"
|
|
1398
|
+
],
|
|
1399
|
+
"successStatus": 200,
|
|
1400
|
+
"scopes": [
|
|
1401
|
+
"forms"
|
|
1402
|
+
]
|
|
1403
|
+
},
|
|
1404
|
+
"copyForm": {
|
|
1405
|
+
"operationId": "copyForm",
|
|
1406
|
+
"summary": "Copy a form",
|
|
1407
|
+
"description": "Copies the form and returns the new form (same shape as GET /forms/{form_token}). The new form's creator is the calling user (the account owner for an account token).\n- When the source form allows public copying (can_duplicated_in_public), the caller needs no access to the source form; otherwise a caller without access gets 404.\n- Returns 403 when the source form is frozen or its creator's account is disabled, with body `{ \"errors\": ..., \"status_code\": \"form_forbidden\" }` (not the common error shape).\n- `folder_token` takes a folder token or id; returns 404 when the folder does not exist or the caller lacks manage permission on it.\n- Returns 400 when copying fails (model validation does not pass).",
|
|
1408
|
+
"tag": "Forms",
|
|
1409
|
+
"method": "post",
|
|
1410
|
+
"path": "/forms/{form_token}/copy",
|
|
1411
|
+
"params": [
|
|
1412
|
+
{
|
|
1413
|
+
"name": "form_token",
|
|
1414
|
+
"in": "path",
|
|
1415
|
+
"required": true
|
|
1416
|
+
}
|
|
1417
|
+
],
|
|
1418
|
+
"paramNames": [
|
|
1419
|
+
"form_token"
|
|
1420
|
+
],
|
|
1421
|
+
"body": {
|
|
1422
|
+
"contentType": "application/json",
|
|
1423
|
+
"required": false,
|
|
1424
|
+
"flatten": true
|
|
1425
|
+
},
|
|
1426
|
+
"successStatus": 200,
|
|
1427
|
+
"scopes": [
|
|
1428
|
+
"forms"
|
|
1429
|
+
],
|
|
1430
|
+
"responseSchema": "Form"
|
|
1431
|
+
},
|
|
1432
|
+
"moveFormToFolder": {
|
|
1433
|
+
"operationId": "moveFormToFolder",
|
|
1434
|
+
"summary": "Move a form into a folder",
|
|
1435
|
+
"description": "Moves the form into a folder, or out of one (pass null as `folder_token`); PUT is accepted too. The move affects only the calling user's folder placement.\n- The request body must contain the `folder_token` key (its value may be null); otherwise 400.\n- `folder_token` takes only a folder token (not an id); returns 404 when the folder does not exist or the current user lacks manage permission on it.\n- The folder type (form / table) must match the form's type; otherwise 400.\n- To move a table, use `PATCH /tables/{table_token}/folder`.",
|
|
1436
|
+
"tag": "Forms",
|
|
1437
|
+
"method": "patch",
|
|
1438
|
+
"path": "/forms/{form_token}/folder",
|
|
1439
|
+
"params": [
|
|
1440
|
+
{
|
|
1441
|
+
"name": "form_token",
|
|
1442
|
+
"in": "path",
|
|
1443
|
+
"required": true
|
|
1444
|
+
}
|
|
1445
|
+
],
|
|
1446
|
+
"paramNames": [
|
|
1447
|
+
"form_token"
|
|
1448
|
+
],
|
|
1449
|
+
"body": {
|
|
1450
|
+
"contentType": "application/json",
|
|
1451
|
+
"required": true,
|
|
1452
|
+
"flatten": true
|
|
1453
|
+
},
|
|
1454
|
+
"successStatus": 200,
|
|
1455
|
+
"scopes": [
|
|
1456
|
+
"forms"
|
|
1457
|
+
],
|
|
1458
|
+
"responseSchema": "FormFolderMoveResult"
|
|
1459
|
+
},
|
|
1460
|
+
"createWeixinOauthSession": {
|
|
1461
|
+
"operationId": "createWeixinOauthSession",
|
|
1462
|
+
"summary": "Exchange a WeChat authorization code for an openid",
|
|
1463
|
+
"description": "Exchanges the `code` returned by WeChat web authorization for the user's openid, through the WeChat Official Account the form has selected.\nWhen the form's WeChat authorization scope is userinfo, also returns `unionid` (when WeChat returns one) and `profile`.\n- Returns 400 when the form has no WeChat Official Account configured or that account does not exist; returns 400 when `code` is missing.\n- Returns 502 when the exchange fails on the WeChat side (invalid code, etc.) or fetching the user info fails.",
|
|
1464
|
+
"tag": "Forms",
|
|
1465
|
+
"method": "post",
|
|
1466
|
+
"path": "/forms/{form_token}/weixin_oauth_session",
|
|
1467
|
+
"params": [
|
|
1468
|
+
{
|
|
1469
|
+
"name": "form_token",
|
|
1470
|
+
"in": "path",
|
|
1471
|
+
"required": true
|
|
1472
|
+
}
|
|
1473
|
+
],
|
|
1474
|
+
"paramNames": [
|
|
1475
|
+
"form_token"
|
|
1476
|
+
],
|
|
1477
|
+
"body": {
|
|
1478
|
+
"contentType": "application/json",
|
|
1479
|
+
"required": true,
|
|
1480
|
+
"flatten": true
|
|
1481
|
+
},
|
|
1482
|
+
"successStatus": 200,
|
|
1483
|
+
"scopes": [
|
|
1484
|
+
"write_entries"
|
|
1485
|
+
],
|
|
1486
|
+
"responseSchema": "FormWeixinOauthSession"
|
|
1487
|
+
},
|
|
1488
|
+
"listFormViews": {
|
|
1489
|
+
"operationId": "listFormViews",
|
|
1490
|
+
"summary": "List a form's views",
|
|
1491
|
+
"description": "Returns the views the caller can see on the form: views they created, and views whose visibility other cooperators set to cooperators; other users' personal views are not returned. The order follows the caller's own saved view order; views not in it are appended by position, then created_at.",
|
|
1492
|
+
"tag": "Views",
|
|
1493
|
+
"method": "get",
|
|
1494
|
+
"path": "/forms/{form_token}/views",
|
|
1495
|
+
"params": [
|
|
1496
|
+
{
|
|
1497
|
+
"name": "form_token",
|
|
1498
|
+
"in": "path",
|
|
1499
|
+
"required": true
|
|
1500
|
+
}
|
|
1501
|
+
],
|
|
1502
|
+
"paramNames": [
|
|
1503
|
+
"form_token"
|
|
1504
|
+
],
|
|
1505
|
+
"successStatus": 200,
|
|
1506
|
+
"scopes": [
|
|
1507
|
+
"forms"
|
|
1508
|
+
]
|
|
1509
|
+
},
|
|
1510
|
+
"createFormView": {
|
|
1511
|
+
"operationId": "createFormView",
|
|
1512
|
+
"summary": "Create a view on a form",
|
|
1513
|
+
"description": "Creates a new view on the form, created by the caller; visibility defaults to cooperators when not passed, and position is the highest position among the currently visible views plus 1. Each user can have at most 100 views on one form; at the limit, returns 422 (View limit reached). When view_type is kanban and kanban_group_by_api_code is not passed, the server picks the grouping field; when kanban_hidden_groups is not passed, the __unset__ group is hidden by default; when prefer_columns is empty, the form's default columns are used (at most 5 columns for a kanban view, serial_number included). Returns 422 when filter is invalid (not an array, unknown field, unsupported operator, invalid value). Returns 422 when model validation fails (e.g. name is empty or longer than 120 characters, or the grouping field does not support kanban grouping). Form views (view_type form): supported only on tables, otherwise 422; title defaults to the table name; without field_overrides, all fillable columns are selected in the current column order; published defaults to false (the fill link does not work while unpublished). title / description / published / field_overrides apply only to form views; using them on another type returns 422. Creating, updating or deleting a form view (including switching a view to or from a form view) requires the caller to hold a predefined role on the table that can add entries, otherwise 403; an account token is exempt. Returns 422 when a fill item's column does not exist, cannot be a fill item, or sets a validation its column type does not support; the error message names the column's api_code.",
|
|
1514
|
+
"tag": "Views",
|
|
1515
|
+
"method": "post",
|
|
1516
|
+
"path": "/forms/{form_token}/views",
|
|
1517
|
+
"params": [
|
|
1518
|
+
{
|
|
1519
|
+
"name": "form_token",
|
|
1520
|
+
"in": "path",
|
|
1521
|
+
"required": true
|
|
1522
|
+
}
|
|
1523
|
+
],
|
|
1524
|
+
"paramNames": [
|
|
1525
|
+
"form_token"
|
|
1526
|
+
],
|
|
1527
|
+
"body": {
|
|
1528
|
+
"contentType": "application/json",
|
|
1529
|
+
"required": true,
|
|
1530
|
+
"flatten": false,
|
|
1531
|
+
"param": "body"
|
|
1532
|
+
},
|
|
1533
|
+
"successStatus": 201,
|
|
1534
|
+
"scopes": [
|
|
1535
|
+
"forms"
|
|
1536
|
+
],
|
|
1537
|
+
"responseSchema": "FormView"
|
|
1538
|
+
},
|
|
1539
|
+
"getFormView": {
|
|
1540
|
+
"operationId": "getFormView",
|
|
1541
|
+
"summary": "Show a view of a form",
|
|
1542
|
+
"description": "Returns one view. Only views visible to the caller can be read (created by the caller or visible to cooperators); another user's personal view returns 404 (View cannot be found).",
|
|
1543
|
+
"tag": "Views",
|
|
1544
|
+
"method": "get",
|
|
1545
|
+
"path": "/forms/{form_token}/views/{view_token}",
|
|
1546
|
+
"params": [
|
|
1547
|
+
{
|
|
1548
|
+
"name": "form_token",
|
|
1549
|
+
"in": "path",
|
|
1550
|
+
"required": true
|
|
1551
|
+
},
|
|
1552
|
+
{
|
|
1553
|
+
"name": "view_token",
|
|
1554
|
+
"in": "path",
|
|
1555
|
+
"required": true
|
|
1556
|
+
}
|
|
1557
|
+
],
|
|
1558
|
+
"paramNames": [
|
|
1559
|
+
"form_token",
|
|
1560
|
+
"view_token"
|
|
1561
|
+
],
|
|
1562
|
+
"successStatus": 200,
|
|
1563
|
+
"scopes": [
|
|
1564
|
+
"forms"
|
|
1565
|
+
],
|
|
1566
|
+
"responseSchema": "FormView"
|
|
1567
|
+
},
|
|
1568
|
+
"updateFormView": {
|
|
1569
|
+
"operationId": "updateFormView",
|
|
1570
|
+
"summary": "Update a view of a form",
|
|
1571
|
+
"description": "Updates the view's configuration; PUT is accepted too. Only the keys present in the request are updated: an empty array for filter clears the filters, and leaving filter out keeps them unchanged; when kanban_group_by_api_code changes and kanban_group_order / kanban_hidden_groups are not passed with it, those two lists reset to their defaults. Cooperators can change the configuration of a view visible to cooperators, but only the view's creator can switch visibility, otherwise returns 403; a view whose view_scope is form cannot switch visibility. Returns 422 when filter is invalid or model validation fails. field_overrides replaces the fill item settings as a whole; form views have the same permission requirements and parameter limits as on create.",
|
|
1572
|
+
"tag": "Views",
|
|
1573
|
+
"method": "patch",
|
|
1574
|
+
"path": "/forms/{form_token}/views/{view_token}",
|
|
1575
|
+
"params": [
|
|
1576
|
+
{
|
|
1577
|
+
"name": "form_token",
|
|
1578
|
+
"in": "path",
|
|
1579
|
+
"required": true
|
|
1580
|
+
},
|
|
1581
|
+
{
|
|
1582
|
+
"name": "view_token",
|
|
1583
|
+
"in": "path",
|
|
1584
|
+
"required": true
|
|
1585
|
+
}
|
|
1586
|
+
],
|
|
1587
|
+
"paramNames": [
|
|
1588
|
+
"form_token",
|
|
1589
|
+
"view_token"
|
|
1590
|
+
],
|
|
1591
|
+
"body": {
|
|
1592
|
+
"contentType": "application/json",
|
|
1593
|
+
"required": true,
|
|
1594
|
+
"flatten": false,
|
|
1595
|
+
"param": "body"
|
|
1596
|
+
},
|
|
1597
|
+
"successStatus": 200,
|
|
1598
|
+
"scopes": [
|
|
1599
|
+
"forms"
|
|
1600
|
+
],
|
|
1601
|
+
"responseSchema": "FormView"
|
|
1602
|
+
},
|
|
1603
|
+
"deleteFormView": {
|
|
1604
|
+
"operationId": "deleteFormView",
|
|
1605
|
+
"summary": "Delete a view of a form",
|
|
1606
|
+
"description": "Deletes a view. Predefined views (predefined) and views whose view_scope is form cannot be deleted, and the deletion is also refused when it would leave the caller with no visible view; all of these return 422. Deleting a form view needs the same permission as creating one (otherwise 403); once it is deleted, its fill link stops working immediately, and this cannot be undone.",
|
|
1607
|
+
"tag": "Views",
|
|
1608
|
+
"method": "delete",
|
|
1609
|
+
"path": "/forms/{form_token}/views/{view_token}",
|
|
1610
|
+
"params": [
|
|
1611
|
+
{
|
|
1612
|
+
"name": "form_token",
|
|
1613
|
+
"in": "path",
|
|
1614
|
+
"required": true
|
|
1615
|
+
},
|
|
1616
|
+
{
|
|
1617
|
+
"name": "view_token",
|
|
1618
|
+
"in": "path",
|
|
1619
|
+
"required": true
|
|
1620
|
+
}
|
|
1621
|
+
],
|
|
1622
|
+
"paramNames": [
|
|
1623
|
+
"form_token",
|
|
1624
|
+
"view_token"
|
|
1625
|
+
],
|
|
1626
|
+
"successStatus": 200,
|
|
1627
|
+
"scopes": [
|
|
1628
|
+
"forms"
|
|
1629
|
+
]
|
|
1630
|
+
},
|
|
1631
|
+
"listFormViewEntries": {
|
|
1632
|
+
"operationId": "listFormViewEntries",
|
|
1633
|
+
"summary": "List a view's entries",
|
|
1634
|
+
"description": "Returns the form's entries under the view's filters and sort rules, at most 50 per page. The returned fields are limited to those in the view's prefer_columns (serial_number always included); when prefer_columns is empty, all pushable fields are returned. Sorting follows the view's sort rules, with serial_number ascending appended when they do not include serial_number. Paginate with the next parameter (a row offset); next is null on the last page. Returns 400 when the view's filters use an operator the query engine does not support. Only views visible to the caller are accessible, otherwise 404 (View cannot be found).",
|
|
1635
|
+
"tag": "Views",
|
|
1636
|
+
"method": "get",
|
|
1637
|
+
"path": "/forms/{form_token}/views/{view_token}/entries",
|
|
1638
|
+
"params": [
|
|
1639
|
+
{
|
|
1640
|
+
"name": "form_token",
|
|
1641
|
+
"in": "path",
|
|
1642
|
+
"required": true
|
|
1643
|
+
},
|
|
1644
|
+
{
|
|
1645
|
+
"name": "view_token",
|
|
1646
|
+
"in": "path",
|
|
1647
|
+
"required": true
|
|
1648
|
+
},
|
|
1649
|
+
{
|
|
1650
|
+
"name": "next",
|
|
1651
|
+
"in": "query",
|
|
1652
|
+
"required": false
|
|
1653
|
+
},
|
|
1654
|
+
{
|
|
1655
|
+
"name": "include_labels",
|
|
1656
|
+
"in": "query",
|
|
1657
|
+
"required": false
|
|
1658
|
+
}
|
|
1659
|
+
],
|
|
1660
|
+
"paramNames": [
|
|
1661
|
+
"form_token",
|
|
1662
|
+
"view_token",
|
|
1663
|
+
"next",
|
|
1664
|
+
"include_labels"
|
|
1665
|
+
],
|
|
1666
|
+
"successStatus": 200,
|
|
1667
|
+
"scopes": [
|
|
1668
|
+
"read_entries"
|
|
1669
|
+
],
|
|
1670
|
+
"responseSchema": "EntryListResponse"
|
|
1671
|
+
},
|
|
1672
|
+
"uploadEntryAttachment": {
|
|
1673
|
+
"operationId": "uploadEntryAttachment",
|
|
1674
|
+
"summary": "Upload an entry attachment",
|
|
1675
|
+
"description": "Uploads a file ahead of time for a form's attachment field (or an attachment column in a table field) and returns the attachment ID; then, when creating / updating an entry, put that ID (or the upload token) into the matching field to bind it. An uploaded attachment that no entry references stays unused.\nAuthenticate in one of two ways:\n1. Regular API credentials (a Bearer token).\n2. A one-time upload token `attachment_token` (instead of regular credentials): the token starts with `entry_att_tok_`, is valid for 30 minutes, can be used only once, and is bound to the form, field, column and file metadata. When the request carries `attachment_token`, regular credentials are not checked and the request acts as the token's user; returns 400 `attachment_token is invalid or expired; prepare upload again` when the token is invalid, expired, already used, its user has been deleted, or it does not match the requested form / field / column; also returns 400 when the uploaded file's name, Content-Type or byte size does not match the token.\nReturns 401 when there are neither credentials nor `attachment_token`.\nSend the file content in one of two ways: the `file` field of `multipart/form-data`; or a Base64 string in the `base64` (or `data`) field of a JSON / form-encoded body (a `data:<mime>;base64,` prefix is allowed), with `file_name` (or `filename`) and `content_type`. Base64 content cannot exceed 5 MB once decoded; larger returns 400 `attachment exceeds 5MB limit`, and a decoding failure returns 400 `base64 is invalid`; returns 400 `file or base64 is required` when neither is given.\n`field_api_code` must point to an attachment field or a table field; for a table field, `dimension_api_code` must also be passed and point to an attachment column in that table field, otherwise returns 400; returns 404 when the field or column does not exist.\nThe file size is capped by the per-file limit set on the field (or column); a larger file returns 422, with the specific validation message in `error_description` (e.g. `文件超过了10 MB`); returns 422 `上传失败,请重试` when uploading to object storage fails (the server's wording is authoritative).\nReturns 404 `form cannot be found` when the form does not exist or is not accessible to the current identity.",
|
|
1676
|
+
"tag": "Uploads",
|
|
1677
|
+
"method": "post",
|
|
1678
|
+
"path": "/forms/{form_token}/entry_attachments",
|
|
1679
|
+
"params": [
|
|
1680
|
+
{
|
|
1681
|
+
"name": "form_token",
|
|
1682
|
+
"in": "path",
|
|
1683
|
+
"required": true
|
|
1684
|
+
}
|
|
1685
|
+
],
|
|
1686
|
+
"paramNames": [
|
|
1687
|
+
"form_token"
|
|
1688
|
+
],
|
|
1689
|
+
"body": {
|
|
1690
|
+
"contentType": "application/json",
|
|
1691
|
+
"required": true,
|
|
1692
|
+
"flatten": true
|
|
1693
|
+
},
|
|
1694
|
+
"successStatus": 201,
|
|
1695
|
+
"scopes": [
|
|
1696
|
+
"write_entries"
|
|
1697
|
+
],
|
|
1698
|
+
"responseSchema": "UploadedEntryAttachment"
|
|
1699
|
+
},
|
|
1700
|
+
"uploadImportFile": {
|
|
1701
|
+
"operationId": "uploadImportFile",
|
|
1702
|
+
"summary": "Upload an import file",
|
|
1703
|
+
"description": "Uploads a spreadsheet file (`.xlsx` / `.xls` / `.csv`) for bulk-importing entries into the given form, and returns the import attachment ID; then pass it as `attachment_id` to \"Import entries from an uploaded spreadsheet\" (`POST /forms/{form_token}/entry_imports`) to start the import.\nAuthenticate in one of two ways:\n1. Regular API credentials (a Bearer token).\n2. A one-time upload token `import_file_token` (instead of regular credentials): the token starts with `import_file_tok_`, is valid for 30 minutes, can be used only once, and is bound to the form and the file metadata. When the request carries `import_file_token`, regular credentials are not checked, and the request acts as the user the token belongs to; the uploaded file's original file name, Content-Type and byte size must match what the token recorded, otherwise returns 400. Returns 400 `import_file_token is invalid or expired; prepare upload again` when the token does not exist, has expired, has been used, or its user has been deleted; returns 400 `import_file_token was issued for another form; prepare upload again` when the token belongs to another form.\nReturns 401 when there are neither credentials nor an `import_file_token`.\nThe request must be `multipart/form-data`, with the file in the `file` field; a missing file returns 400 `file is required`.\nThe file size is capped by the plan's Excel import limit (in MB), and the extension must be xls / xlsx / csv; otherwise returns 422, with the validation details in `error_description` (with an upload token, the token stays usable, so the file can be uploaded again).\nReturns 404 `form cannot be found` when the form does not exist or is not accessible to the current caller.",
|
|
1704
|
+
"tag": "Uploads",
|
|
1705
|
+
"method": "post",
|
|
1706
|
+
"path": "/forms/{form_token}/import_files",
|
|
1707
|
+
"params": [
|
|
1708
|
+
{
|
|
1709
|
+
"name": "form_token",
|
|
1710
|
+
"in": "path",
|
|
1711
|
+
"required": true
|
|
1712
|
+
}
|
|
1713
|
+
],
|
|
1714
|
+
"paramNames": [
|
|
1715
|
+
"form_token"
|
|
1716
|
+
],
|
|
1717
|
+
"body": {
|
|
1718
|
+
"contentType": "multipart/form-data",
|
|
1719
|
+
"required": true,
|
|
1720
|
+
"flatten": true
|
|
1721
|
+
},
|
|
1722
|
+
"successStatus": 201,
|
|
1723
|
+
"scopes": [
|
|
1724
|
+
"write_entries"
|
|
1725
|
+
],
|
|
1726
|
+
"responseSchema": "UploadedImportFile"
|
|
1727
|
+
},
|
|
1728
|
+
"createEntryImport": {
|
|
1729
|
+
"operationId": "createEntryImport",
|
|
1730
|
+
"summary": "Import entries from an uploaded spreadsheet",
|
|
1731
|
+
"description": "Appends each row of a spreadsheet uploaded with \"Upload an import file\" as an entry of this form. Upload the file first to get the import attachment ID (`attachment_id`), then say here which column goes into which field.\nProblems that can be detected up front, such as the file, the plan's import limit, the header row and the column mapping, are checked before the job is created; a rejected import writes no entries. Error messages include the spreadsheet's actual layout (row and column range, and the header contents), so the request can be fixed and retried.\nOnce validation passes, returns `201` and the entries are written in the background: `201` means the job has started, not finished; poll \"Show an entry import job\" for the result.\n- `attachment_id` must be an import file the current user uploaded for this form, otherwise returns 400 (the file cannot be found; upload it again); returns 400 when the file is not xls / xlsx / csv or cannot be read.\n- `columns` must not be empty; each item names the target field with `field_api_code`, and the source column with `column_label` (the header text, which must exactly match the header cell after trimming leading and trailing spaces) or `sheet_column_index` (the column number); when both are given, `sheet_column_index` wins.\n- The field must be one this form can import into; one field cannot map to several columns; when several header columns share a name, use `sheet_column_index` instead; the column number must be within the spreadsheet's column range.\n- `header_row_index` defaults to the first row of the spreadsheet, and there must be data rows below it.\n- Every required field of the form must have a column, otherwise returns 400 listing the missing fields.\n- `unique_field_code` names a field to deduplicate on: when a row's value for that field already exists in the form's entries, the row is skipped (counted in `skip_count`).\n- Returns 404 `form cannot be found` when the form does not exist or is not accessible to the current caller.",
|
|
1732
|
+
"tag": "Entries",
|
|
1733
|
+
"method": "post",
|
|
1734
|
+
"path": "/forms/{form_token}/entry_imports",
|
|
1735
|
+
"params": [
|
|
1736
|
+
{
|
|
1737
|
+
"name": "form_token",
|
|
1738
|
+
"in": "path",
|
|
1739
|
+
"required": true
|
|
1740
|
+
}
|
|
1741
|
+
],
|
|
1742
|
+
"paramNames": [
|
|
1743
|
+
"form_token"
|
|
1744
|
+
],
|
|
1745
|
+
"body": {
|
|
1746
|
+
"contentType": "application/json",
|
|
1747
|
+
"required": true,
|
|
1748
|
+
"flatten": true
|
|
1749
|
+
},
|
|
1750
|
+
"successStatus": 201,
|
|
1751
|
+
"scopes": [
|
|
1752
|
+
"write_entries"
|
|
1753
|
+
],
|
|
1754
|
+
"responseSchema": "EntryImportCreated"
|
|
1755
|
+
},
|
|
1756
|
+
"getEntryImport": {
|
|
1757
|
+
"operationId": "getEntryImport",
|
|
1758
|
+
"summary": "Show an entry import job",
|
|
1759
|
+
"description": "Returns the progress and result of an entry import job. While `status` is `pending` / `running`, the job is still in progress, and `processed_rows` and `total_rows` can be used to show progress;\n`success` / `failed` / `cancelled` are final states; `imported_count` / `skip_count` / `invalid_count` are the numbers of rows written, skipped and failing validation, `warnings` holds per-row notices, and `error_message` is why the job failed.\nA job can be read only through the form it imports into: when the id does not exist, is not a valid id, or belongs to another form, returns 404 `Import job not found for this form — check the id, and that it belongs to this form.`.\nReturns 404 `form cannot be found` when the form does not exist or is not accessible to the current caller.",
|
|
1760
|
+
"tag": "Entries",
|
|
1761
|
+
"method": "get",
|
|
1762
|
+
"path": "/forms/{form_token}/entry_imports/{id}",
|
|
1763
|
+
"params": [
|
|
1764
|
+
{
|
|
1765
|
+
"name": "form_token",
|
|
1766
|
+
"in": "path",
|
|
1767
|
+
"required": true
|
|
1768
|
+
},
|
|
1769
|
+
{
|
|
1770
|
+
"name": "id",
|
|
1771
|
+
"in": "path",
|
|
1772
|
+
"required": true
|
|
1773
|
+
}
|
|
1774
|
+
],
|
|
1775
|
+
"paramNames": [
|
|
1776
|
+
"form_token",
|
|
1777
|
+
"id"
|
|
1778
|
+
],
|
|
1779
|
+
"successStatus": 200,
|
|
1780
|
+
"scopes": [
|
|
1781
|
+
"write_entries"
|
|
1782
|
+
],
|
|
1783
|
+
"responseSchema": "EntryImportJob"
|
|
1784
|
+
},
|
|
1785
|
+
"uploadFormImage": {
|
|
1786
|
+
"operationId": "uploadFormImage",
|
|
1787
|
+
"summary": "Upload a form image",
|
|
1788
|
+
"description": "Uploads an image that belongs to the form itself (a picture choice image, a header image, a background image, one frame of the header carousel, the header image of the form's public query page, or an inline image in the form description / a field description), and returns the image attachment ID. The image is not bound to any form yet; it takes effect only when a form or theme references it later.\nAuthenticate in one of two ways:\n1. Regular API credentials (a Bearer token). `image_type` must then say what the image is for, and can only be `header` (header image), `wallpaper` (background image), `opensearch_header` (public query page header image) or `description` (inline description image): pass the returned `attachment_id` to `header.header_image_attachment_id` / `wallpaper.background_image_attachment_id` of \"Update a form's theme\", or to `header.background_image.attachment_id` of \"Update a public query\"; `description` also returns the image address `url`, which goes into the `<img src>` of the form `description` or of a field's `notes`. When the form is saved, the image belongs to that form (at most 30 per form); images not used by any form within 7 days are cleaned up. Returns 400 `image_type must be one of: field_choice, header, wallpaper, carousel, opensearch_header, description.` when `image_type` is missing or not one of `field_choice` / `header` / `wallpaper` / `carousel` / `opensearch_header` / `description`; `field_choice` / `carousel` have nowhere that accepts an attachment ID, so they can only be uploaded with an upload token, otherwise returns 400.\n2. A one-time upload token `form_image_token` (instead of regular credentials): the token starts with `form_img_tok_`, is valid for 30 minutes, can be used only once, and has already recorded the image purpose (`field_choice` / `header` / `wallpaper` / `carousel` / `opensearch_header` / `description`; `image_type` is then ignored) and the file metadata; the uploaded file's original file name, Content-Type and byte size must match what the token recorded, otherwise returns 400. After a successful upload, do not use the returned `attachment_id` directly; instead reference the same token in a choice's `image_upload_token` in \"Create a form\" / \"Edit a form\", in `header.header_image_upload_token` / `wallpaper.background_image_upload_token` / `header.carousel_images[].image_upload_token` of \"Update a form's theme\", or in `header.background_image.image_upload_token` of \"Update a public query\"; for the `description` purpose nothing references the token, so use the returned `url` directly. Returns 400 `form_image_token is invalid or expired; prepare upload again` when the token does not exist, has expired, has been used, or its user has been deleted.\nReturns 401 when there are neither credentials nor a `form_image_token`. The request must be `multipart/form-data`, with the image binary in the `file` field; a missing file returns 400 `file is required`.",
|
|
1789
|
+
"tag": "Uploads",
|
|
1790
|
+
"method": "post",
|
|
1791
|
+
"path": "/form_image_attachments",
|
|
1792
|
+
"params": [],
|
|
1793
|
+
"paramNames": [],
|
|
1794
|
+
"body": {
|
|
1795
|
+
"contentType": "multipart/form-data",
|
|
1796
|
+
"required": true,
|
|
1797
|
+
"flatten": true
|
|
1798
|
+
},
|
|
1799
|
+
"successStatus": 201,
|
|
1800
|
+
"scopes": [
|
|
1801
|
+
"forms",
|
|
1802
|
+
"form_setting"
|
|
1803
|
+
],
|
|
1804
|
+
"responseSchema": "UploadedFormImage"
|
|
1805
|
+
},
|
|
1806
|
+
"listTables": {
|
|
1807
|
+
"operationId": "listTables",
|
|
1808
|
+
"summary": "List tables",
|
|
1809
|
+
"description": "Returns the tables (`kind=table`) visible to the current caller. Pagination, `q`, `filters`, `sort`, `next`, `skip` and `limit` mean the same as in the form list; 50 per page by default, up to 1000.",
|
|
1810
|
+
"tag": "Tables",
|
|
1811
|
+
"method": "get",
|
|
1812
|
+
"path": "/tables",
|
|
1813
|
+
"params": [
|
|
1814
|
+
{
|
|
1815
|
+
"name": "q",
|
|
1816
|
+
"in": "query",
|
|
1817
|
+
"required": false
|
|
1818
|
+
},
|
|
1819
|
+
{
|
|
1820
|
+
"name": "filters",
|
|
1821
|
+
"in": "query",
|
|
1822
|
+
"required": false,
|
|
1823
|
+
"json": true
|
|
1824
|
+
},
|
|
1825
|
+
{
|
|
1826
|
+
"name": "sort",
|
|
1827
|
+
"in": "query",
|
|
1828
|
+
"required": false,
|
|
1829
|
+
"json": true
|
|
1830
|
+
},
|
|
1831
|
+
{
|
|
1832
|
+
"name": "next",
|
|
1833
|
+
"in": "query",
|
|
1834
|
+
"required": false
|
|
1835
|
+
},
|
|
1836
|
+
{
|
|
1837
|
+
"name": "skip",
|
|
1838
|
+
"in": "query",
|
|
1839
|
+
"required": false
|
|
1840
|
+
},
|
|
1841
|
+
{
|
|
1842
|
+
"name": "limit",
|
|
1843
|
+
"in": "query",
|
|
1844
|
+
"required": false
|
|
1845
|
+
}
|
|
1846
|
+
],
|
|
1847
|
+
"paramNames": [
|
|
1848
|
+
"q",
|
|
1849
|
+
"filters",
|
|
1850
|
+
"sort",
|
|
1851
|
+
"next",
|
|
1852
|
+
"skip",
|
|
1853
|
+
"limit"
|
|
1854
|
+
],
|
|
1855
|
+
"successStatus": 200,
|
|
1856
|
+
"scopes": [
|
|
1857
|
+
"forms"
|
|
1858
|
+
],
|
|
1859
|
+
"responseSchema": "TableListResponse"
|
|
1860
|
+
},
|
|
1861
|
+
"createTable": {
|
|
1862
|
+
"operationId": "createTable",
|
|
1863
|
+
"summary": "Create a table",
|
|
1864
|
+
"description": "Creates a table. Same as creating a form, except:\n- field types can only be the column types tables support: `TextArea`, `RadioButton`, `CheckBox`, `BooleanField`, `MobileField`, `NumberField`, `DateTimeField`, `EmailField`, `LinkField`, `AttachmentField`, `FormulaField`, `RelationField`;\n- attachment columns do not accept limit properties such as count / size limits, and number / formula columns have limited precision; a violation returns 400 listing the offending columns;\n- choice columns do not get an \"Other\" choice; `folder_token` must be a table folder; `layout` is not supported.\n- with `with_default_entries: true`, 3 blank entries are added after creation (as when creating a table in the product); by default none are added.\nReturns the table structure, including fields and views.",
|
|
1865
|
+
"tag": "Tables",
|
|
1866
|
+
"method": "post",
|
|
1867
|
+
"path": "/tables",
|
|
1868
|
+
"params": [],
|
|
1869
|
+
"paramNames": [],
|
|
1870
|
+
"body": {
|
|
1871
|
+
"contentType": "application/json",
|
|
1872
|
+
"required": true,
|
|
1873
|
+
"flatten": true
|
|
1874
|
+
},
|
|
1875
|
+
"successStatus": 201,
|
|
1876
|
+
"scopes": [
|
|
1877
|
+
"forms"
|
|
1878
|
+
],
|
|
1879
|
+
"responseSchema": "Table"
|
|
1880
|
+
},
|
|
1881
|
+
"getTable": {
|
|
1882
|
+
"operationId": "getTable",
|
|
1883
|
+
"summary": "Show a table's structure",
|
|
1884
|
+
"description": "Returns the table's basic information, field definitions and the views visible to the current caller. Returns 404 `table cannot be found` when the token is not a table (for example, a regular form).",
|
|
1885
|
+
"tag": "Tables",
|
|
1886
|
+
"method": "get",
|
|
1887
|
+
"path": "/tables/{table_token}",
|
|
1888
|
+
"params": [
|
|
1889
|
+
{
|
|
1890
|
+
"name": "table_token",
|
|
1891
|
+
"in": "path",
|
|
1892
|
+
"required": true
|
|
1893
|
+
},
|
|
1894
|
+
{
|
|
1895
|
+
"name": "include_analytics",
|
|
1896
|
+
"in": "query",
|
|
1897
|
+
"required": false
|
|
1898
|
+
}
|
|
1899
|
+
],
|
|
1900
|
+
"paramNames": [
|
|
1901
|
+
"table_token",
|
|
1902
|
+
"include_analytics"
|
|
1903
|
+
],
|
|
1904
|
+
"successStatus": 200,
|
|
1905
|
+
"scopes": [
|
|
1906
|
+
"forms"
|
|
1907
|
+
],
|
|
1908
|
+
"responseSchema": "Table"
|
|
1909
|
+
},
|
|
1910
|
+
"updateTable": {
|
|
1911
|
+
"operationId": "updateTable",
|
|
1912
|
+
"summary": "Edit a table",
|
|
1913
|
+
"description": "Edits a table incrementally; `PUT` is also accepted. The request body is the same as for editing a form (`kind` is ignored); attachment columns in `fields.add` and `fields.update` do not accept limit properties, and types in `fields.add` must be column types tables support.",
|
|
1914
|
+
"tag": "Tables",
|
|
1915
|
+
"method": "patch",
|
|
1916
|
+
"path": "/tables/{table_token}",
|
|
1917
|
+
"params": [
|
|
1918
|
+
{
|
|
1919
|
+
"name": "table_token",
|
|
1920
|
+
"in": "path",
|
|
1921
|
+
"required": true
|
|
1922
|
+
}
|
|
1923
|
+
],
|
|
1924
|
+
"paramNames": [
|
|
1925
|
+
"table_token"
|
|
1926
|
+
],
|
|
1927
|
+
"body": {
|
|
1928
|
+
"contentType": "application/json",
|
|
1929
|
+
"required": true,
|
|
1930
|
+
"flatten": true
|
|
1931
|
+
},
|
|
1932
|
+
"successStatus": 200,
|
|
1933
|
+
"scopes": [
|
|
1934
|
+
"forms"
|
|
1935
|
+
],
|
|
1936
|
+
"responseSchema": "Table"
|
|
1937
|
+
},
|
|
1938
|
+
"deleteTable": {
|
|
1939
|
+
"operationId": "deleteTable",
|
|
1940
|
+
"summary": "Delete a table",
|
|
1941
|
+
"description": "Deletes a table and its entries; on success, returns the table token.",
|
|
1942
|
+
"tag": "Tables",
|
|
1943
|
+
"method": "delete",
|
|
1944
|
+
"path": "/tables/{table_token}",
|
|
1945
|
+
"params": [
|
|
1946
|
+
{
|
|
1947
|
+
"name": "table_token",
|
|
1948
|
+
"in": "path",
|
|
1949
|
+
"required": true
|
|
1950
|
+
}
|
|
1951
|
+
],
|
|
1952
|
+
"paramNames": [
|
|
1953
|
+
"table_token"
|
|
1954
|
+
],
|
|
1955
|
+
"successStatus": 200,
|
|
1956
|
+
"scopes": [
|
|
1957
|
+
"forms"
|
|
1958
|
+
]
|
|
1959
|
+
},
|
|
1960
|
+
"checkTableFieldData": {
|
|
1961
|
+
"operationId": "checkTableFieldData",
|
|
1962
|
+
"summary": "Check whether table columns already hold data",
|
|
1963
|
+
"description": "Same as GET /forms/{form_token}/fields/check, applied to the columns of a table. Returns 404 (`table cannot be found`) when `table_token` does not point to a table.",
|
|
1964
|
+
"tag": "Tables",
|
|
1965
|
+
"method": "get",
|
|
1966
|
+
"path": "/tables/{table_token}/fields/check",
|
|
1967
|
+
"params": [
|
|
1968
|
+
{
|
|
1969
|
+
"name": "table_token",
|
|
1970
|
+
"in": "path",
|
|
1971
|
+
"required": true
|
|
1972
|
+
},
|
|
1973
|
+
{
|
|
1974
|
+
"name": "checks",
|
|
1975
|
+
"in": "query",
|
|
1976
|
+
"required": true,
|
|
1977
|
+
"json": true
|
|
1978
|
+
}
|
|
1979
|
+
],
|
|
1980
|
+
"paramNames": [
|
|
1981
|
+
"table_token",
|
|
1982
|
+
"checks"
|
|
1983
|
+
],
|
|
1984
|
+
"successStatus": 200,
|
|
1985
|
+
"scopes": [
|
|
1986
|
+
"forms"
|
|
1987
|
+
],
|
|
1988
|
+
"responseSchema": "FieldDataCheckResponse"
|
|
1989
|
+
},
|
|
1990
|
+
"previewTableFieldTypeChange": {
|
|
1991
|
+
"operationId": "previewTableFieldTypeChange",
|
|
1992
|
+
"summary": "Preview a table column type change",
|
|
1993
|
+
"description": "Same as GET /forms/{form_token}/fields/preview_convert, applied to the columns of a table; `target_type` accepts only column types tables support (see `GET /field_types?kind=table`).\nReturns 404 (`table cannot be found`) when `table_token` does not point to a table.",
|
|
1994
|
+
"tag": "Tables",
|
|
1995
|
+
"method": "get",
|
|
1996
|
+
"path": "/tables/{table_token}/fields/preview_convert",
|
|
1997
|
+
"params": [
|
|
1998
|
+
{
|
|
1999
|
+
"name": "table_token",
|
|
2000
|
+
"in": "path",
|
|
2001
|
+
"required": true
|
|
2002
|
+
},
|
|
2003
|
+
{
|
|
2004
|
+
"name": "checks",
|
|
2005
|
+
"in": "query",
|
|
2006
|
+
"required": true,
|
|
2007
|
+
"json": true
|
|
2008
|
+
}
|
|
2009
|
+
],
|
|
2010
|
+
"paramNames": [
|
|
2011
|
+
"table_token",
|
|
2012
|
+
"checks"
|
|
2013
|
+
],
|
|
2014
|
+
"successStatus": 200,
|
|
2015
|
+
"scopes": [
|
|
2016
|
+
"forms"
|
|
2017
|
+
],
|
|
2018
|
+
"responseSchema": "FieldTypeChangePreviewResponse"
|
|
2019
|
+
},
|
|
2020
|
+
"listTableEntries": {
|
|
2021
|
+
"operationId": "listTableEntries",
|
|
2022
|
+
"summary": "List table entries",
|
|
2023
|
+
"description": "Exactly the same as `GET /forms/{form_token}/entries`, except that the target must be a table (otherwise 404 `table cannot be found`).",
|
|
2024
|
+
"tag": "Tables",
|
|
2025
|
+
"method": "get",
|
|
2026
|
+
"path": "/tables/{table_token}/entries",
|
|
2027
|
+
"params": [
|
|
2028
|
+
{
|
|
2029
|
+
"name": "table_token",
|
|
2030
|
+
"in": "path",
|
|
2031
|
+
"required": true
|
|
2032
|
+
},
|
|
2033
|
+
{
|
|
2034
|
+
"name": "fields",
|
|
2035
|
+
"in": "query",
|
|
2036
|
+
"required": false
|
|
2037
|
+
},
|
|
2038
|
+
{
|
|
2039
|
+
"name": "filters",
|
|
2040
|
+
"in": "query",
|
|
2041
|
+
"required": false,
|
|
2042
|
+
"json": true
|
|
2043
|
+
},
|
|
2044
|
+
{
|
|
2045
|
+
"name": "keyword",
|
|
2046
|
+
"in": "query",
|
|
2047
|
+
"required": false
|
|
2048
|
+
},
|
|
2049
|
+
{
|
|
2050
|
+
"name": "sort",
|
|
2051
|
+
"in": "query",
|
|
2052
|
+
"required": false,
|
|
2053
|
+
"json": true
|
|
2054
|
+
},
|
|
2055
|
+
{
|
|
2056
|
+
"name": "created_at",
|
|
2057
|
+
"in": "query",
|
|
2058
|
+
"required": false
|
|
2059
|
+
},
|
|
2060
|
+
{
|
|
2061
|
+
"name": "next",
|
|
2062
|
+
"in": "query",
|
|
2063
|
+
"required": false
|
|
2064
|
+
},
|
|
2065
|
+
{
|
|
2066
|
+
"name": "skip",
|
|
2067
|
+
"in": "query",
|
|
2068
|
+
"required": false
|
|
2069
|
+
},
|
|
2070
|
+
{
|
|
2071
|
+
"name": "include_labels",
|
|
2072
|
+
"in": "query",
|
|
2073
|
+
"required": false
|
|
2074
|
+
},
|
|
2075
|
+
{
|
|
2076
|
+
"name": "limit",
|
|
2077
|
+
"in": "query",
|
|
2078
|
+
"required": false
|
|
2079
|
+
}
|
|
2080
|
+
],
|
|
2081
|
+
"paramNames": [
|
|
2082
|
+
"table_token",
|
|
2083
|
+
"fields",
|
|
2084
|
+
"filters",
|
|
2085
|
+
"keyword",
|
|
2086
|
+
"sort",
|
|
2087
|
+
"created_at",
|
|
2088
|
+
"next",
|
|
2089
|
+
"skip",
|
|
2090
|
+
"include_labels",
|
|
2091
|
+
"limit"
|
|
2092
|
+
],
|
|
2093
|
+
"successStatus": 200,
|
|
2094
|
+
"scopes": [
|
|
2095
|
+
"read_entries"
|
|
2096
|
+
],
|
|
2097
|
+
"responseSchema": "EntryListResponse"
|
|
2098
|
+
},
|
|
2099
|
+
"createTableEntry": {
|
|
2100
|
+
"operationId": "createTableEntry",
|
|
2101
|
+
"summary": "Create a table entry",
|
|
2102
|
+
"description": "Same as `POST /forms/{form_token}/entries`.",
|
|
2103
|
+
"tag": "Tables",
|
|
2104
|
+
"method": "post",
|
|
2105
|
+
"path": "/tables/{table_token}/entries",
|
|
2106
|
+
"params": [
|
|
2107
|
+
{
|
|
2108
|
+
"name": "table_token",
|
|
2109
|
+
"in": "path",
|
|
2110
|
+
"required": true
|
|
2111
|
+
}
|
|
2112
|
+
],
|
|
2113
|
+
"paramNames": [
|
|
2114
|
+
"table_token"
|
|
2115
|
+
],
|
|
2116
|
+
"body": {
|
|
2117
|
+
"contentType": "application/json",
|
|
2118
|
+
"required": true,
|
|
2119
|
+
"flatten": false,
|
|
2120
|
+
"param": "body"
|
|
2121
|
+
},
|
|
2122
|
+
"successStatus": 201,
|
|
2123
|
+
"scopes": [
|
|
2124
|
+
"write_entries"
|
|
2125
|
+
],
|
|
2126
|
+
"responseSchema": "Entry"
|
|
2127
|
+
},
|
|
2128
|
+
"countTableEntries": {
|
|
2129
|
+
"operationId": "countTableEntries",
|
|
2130
|
+
"summary": "Count table entries",
|
|
2131
|
+
"description": "Exactly the same as `GET /forms/{form_token}/entries/count`, except that the target must be a table (otherwise 404 `table cannot be found`).",
|
|
2132
|
+
"tag": "Tables",
|
|
2133
|
+
"method": "get",
|
|
2134
|
+
"path": "/tables/{table_token}/entries/count",
|
|
2135
|
+
"params": [
|
|
2136
|
+
{
|
|
2137
|
+
"name": "table_token",
|
|
2138
|
+
"in": "path",
|
|
2139
|
+
"required": true
|
|
2140
|
+
},
|
|
2141
|
+
{
|
|
2142
|
+
"name": "filters",
|
|
2143
|
+
"in": "query",
|
|
2144
|
+
"required": false,
|
|
2145
|
+
"json": true
|
|
2146
|
+
},
|
|
2147
|
+
{
|
|
2148
|
+
"name": "keyword",
|
|
2149
|
+
"in": "query",
|
|
2150
|
+
"required": false
|
|
2151
|
+
}
|
|
2152
|
+
],
|
|
2153
|
+
"paramNames": [
|
|
2154
|
+
"table_token",
|
|
2155
|
+
"filters",
|
|
2156
|
+
"keyword"
|
|
2157
|
+
],
|
|
2158
|
+
"successStatus": 200,
|
|
2159
|
+
"scopes": [
|
|
2160
|
+
"read_entries"
|
|
2161
|
+
],
|
|
2162
|
+
"responseSchema": "EntryCountResponse"
|
|
2163
|
+
},
|
|
2164
|
+
"aggregateTableEntries": {
|
|
2165
|
+
"operationId": "aggregateTableEntries",
|
|
2166
|
+
"summary": "Aggregate table entries",
|
|
2167
|
+
"description": "Exactly the same as `GET /forms/{form_token}/entries/aggregate`, except that the target must be a table (otherwise 404 `table cannot be found`).\nFor the functions and groupings each field supports, see `GET /tables/{table_token}?include_analytics=true`.",
|
|
2168
|
+
"tag": "Tables",
|
|
2169
|
+
"method": "get",
|
|
2170
|
+
"path": "/tables/{table_token}/entries/aggregate",
|
|
2171
|
+
"params": [
|
|
2172
|
+
{
|
|
2173
|
+
"name": "table_token",
|
|
2174
|
+
"in": "path",
|
|
2175
|
+
"required": true
|
|
2176
|
+
},
|
|
2177
|
+
{
|
|
2178
|
+
"name": "metrics",
|
|
2179
|
+
"in": "query",
|
|
2180
|
+
"required": false,
|
|
2181
|
+
"json": true
|
|
2182
|
+
},
|
|
2183
|
+
{
|
|
2184
|
+
"name": "dimensions",
|
|
2185
|
+
"in": "query",
|
|
2186
|
+
"required": false,
|
|
2187
|
+
"json": true
|
|
2188
|
+
},
|
|
2189
|
+
{
|
|
2190
|
+
"name": "limit",
|
|
2191
|
+
"in": "query",
|
|
2192
|
+
"required": false
|
|
2193
|
+
},
|
|
2194
|
+
{
|
|
2195
|
+
"name": "filters",
|
|
2196
|
+
"in": "query",
|
|
2197
|
+
"required": false,
|
|
2198
|
+
"json": true
|
|
2199
|
+
},
|
|
2200
|
+
{
|
|
2201
|
+
"name": "keyword",
|
|
2202
|
+
"in": "query",
|
|
2203
|
+
"required": false
|
|
2204
|
+
}
|
|
2205
|
+
],
|
|
2206
|
+
"paramNames": [
|
|
2207
|
+
"table_token",
|
|
2208
|
+
"metrics",
|
|
2209
|
+
"dimensions",
|
|
2210
|
+
"limit",
|
|
2211
|
+
"filters",
|
|
2212
|
+
"keyword"
|
|
2213
|
+
],
|
|
2214
|
+
"successStatus": 200,
|
|
2215
|
+
"scopes": [
|
|
2216
|
+
"read_entries"
|
|
2217
|
+
],
|
|
2218
|
+
"responseSchema": "EntryAggregateResponse"
|
|
2219
|
+
},
|
|
2220
|
+
"summarizeTableEntries": {
|
|
2221
|
+
"operationId": "summarizeTableEntries",
|
|
2222
|
+
"summary": "Summarize table entries",
|
|
2223
|
+
"description": "Exactly the same as `GET /forms/{form_token}/entries/summary`, except that the target must be a table (otherwise 404 `table cannot be found`).",
|
|
2224
|
+
"tag": "Tables",
|
|
2225
|
+
"method": "get",
|
|
2226
|
+
"path": "/tables/{table_token}/entries/summary",
|
|
2227
|
+
"params": [
|
|
2228
|
+
{
|
|
2229
|
+
"name": "table_token",
|
|
2230
|
+
"in": "path",
|
|
2231
|
+
"required": true
|
|
2232
|
+
},
|
|
2233
|
+
{
|
|
2234
|
+
"name": "fields",
|
|
2235
|
+
"in": "query",
|
|
2236
|
+
"required": false
|
|
2237
|
+
},
|
|
2238
|
+
{
|
|
2239
|
+
"name": "include_overview",
|
|
2240
|
+
"in": "query",
|
|
2241
|
+
"required": false
|
|
2242
|
+
},
|
|
2243
|
+
{
|
|
2244
|
+
"name": "filters",
|
|
2245
|
+
"in": "query",
|
|
2246
|
+
"required": false,
|
|
2247
|
+
"json": true
|
|
2248
|
+
},
|
|
2249
|
+
{
|
|
2250
|
+
"name": "keyword",
|
|
2251
|
+
"in": "query",
|
|
2252
|
+
"required": false
|
|
2253
|
+
}
|
|
2254
|
+
],
|
|
2255
|
+
"paramNames": [
|
|
2256
|
+
"table_token",
|
|
2257
|
+
"fields",
|
|
2258
|
+
"include_overview",
|
|
2259
|
+
"filters",
|
|
2260
|
+
"keyword"
|
|
2261
|
+
],
|
|
2262
|
+
"successStatus": 200,
|
|
2263
|
+
"scopes": [
|
|
2264
|
+
"read_entries"
|
|
2265
|
+
],
|
|
2266
|
+
"responseSchema": "EntrySummaryResponse"
|
|
2267
|
+
},
|
|
2268
|
+
"countTableViewEntries": {
|
|
2269
|
+
"operationId": "countTableViewEntries",
|
|
2270
|
+
"summary": "Count the entries of a view",
|
|
2271
|
+
"description": "Exactly the same as `GET /forms/{form_token}/views/{view_token}/entries/count`, except that the target must be a table (otherwise 404 `table cannot be found`).",
|
|
2272
|
+
"tag": "Tables",
|
|
2273
|
+
"method": "get",
|
|
2274
|
+
"path": "/tables/{table_token}/views/{view_token}/entries/count",
|
|
2275
|
+
"params": [
|
|
2276
|
+
{
|
|
2277
|
+
"name": "table_token",
|
|
2278
|
+
"in": "path",
|
|
2279
|
+
"required": true
|
|
2280
|
+
},
|
|
2281
|
+
{
|
|
2282
|
+
"name": "view_token",
|
|
2283
|
+
"in": "path",
|
|
2284
|
+
"required": true
|
|
2285
|
+
},
|
|
2286
|
+
{
|
|
2287
|
+
"name": "filters",
|
|
2288
|
+
"in": "query",
|
|
2289
|
+
"required": false,
|
|
2290
|
+
"json": true
|
|
2291
|
+
},
|
|
2292
|
+
{
|
|
2293
|
+
"name": "keyword",
|
|
2294
|
+
"in": "query",
|
|
2295
|
+
"required": false
|
|
2296
|
+
}
|
|
2297
|
+
],
|
|
2298
|
+
"paramNames": [
|
|
2299
|
+
"table_token",
|
|
2300
|
+
"view_token",
|
|
2301
|
+
"filters",
|
|
2302
|
+
"keyword"
|
|
2303
|
+
],
|
|
2304
|
+
"successStatus": 200,
|
|
2305
|
+
"scopes": [
|
|
2306
|
+
"read_entries"
|
|
2307
|
+
],
|
|
2308
|
+
"responseSchema": "EntryCountResponse"
|
|
2309
|
+
},
|
|
2310
|
+
"aggregateTableViewEntries": {
|
|
2311
|
+
"operationId": "aggregateTableViewEntries",
|
|
2312
|
+
"summary": "Aggregate the entries of a view",
|
|
2313
|
+
"description": "Exactly the same as `GET /forms/{form_token}/views/{view_token}/entries/aggregate`, except that the target must be a table (otherwise 404 `table cannot be found`).",
|
|
2314
|
+
"tag": "Tables",
|
|
2315
|
+
"method": "get",
|
|
2316
|
+
"path": "/tables/{table_token}/views/{view_token}/entries/aggregate",
|
|
2317
|
+
"params": [
|
|
2318
|
+
{
|
|
2319
|
+
"name": "table_token",
|
|
2320
|
+
"in": "path",
|
|
2321
|
+
"required": true
|
|
2322
|
+
},
|
|
2323
|
+
{
|
|
2324
|
+
"name": "view_token",
|
|
2325
|
+
"in": "path",
|
|
2326
|
+
"required": true
|
|
2327
|
+
},
|
|
2328
|
+
{
|
|
2329
|
+
"name": "metrics",
|
|
2330
|
+
"in": "query",
|
|
2331
|
+
"required": false,
|
|
2332
|
+
"json": true
|
|
2333
|
+
},
|
|
2334
|
+
{
|
|
2335
|
+
"name": "dimensions",
|
|
2336
|
+
"in": "query",
|
|
2337
|
+
"required": false,
|
|
2338
|
+
"json": true
|
|
2339
|
+
},
|
|
2340
|
+
{
|
|
2341
|
+
"name": "limit",
|
|
2342
|
+
"in": "query",
|
|
2343
|
+
"required": false
|
|
2344
|
+
},
|
|
2345
|
+
{
|
|
2346
|
+
"name": "filters",
|
|
2347
|
+
"in": "query",
|
|
2348
|
+
"required": false,
|
|
2349
|
+
"json": true
|
|
2350
|
+
},
|
|
2351
|
+
{
|
|
2352
|
+
"name": "keyword",
|
|
2353
|
+
"in": "query",
|
|
2354
|
+
"required": false
|
|
2355
|
+
}
|
|
2356
|
+
],
|
|
2357
|
+
"paramNames": [
|
|
2358
|
+
"table_token",
|
|
2359
|
+
"view_token",
|
|
2360
|
+
"metrics",
|
|
2361
|
+
"dimensions",
|
|
2362
|
+
"limit",
|
|
2363
|
+
"filters",
|
|
2364
|
+
"keyword"
|
|
2365
|
+
],
|
|
2366
|
+
"successStatus": 200,
|
|
2367
|
+
"scopes": [
|
|
2368
|
+
"read_entries"
|
|
2369
|
+
],
|
|
2370
|
+
"responseSchema": "EntryAggregateResponse"
|
|
2371
|
+
},
|
|
2372
|
+
"summarizeTableViewEntries": {
|
|
2373
|
+
"operationId": "summarizeTableViewEntries",
|
|
2374
|
+
"summary": "Summarize the entries of a view",
|
|
2375
|
+
"description": "Exactly the same as `GET /forms/{form_token}/views/{view_token}/entries/summary`, except that the target must be a table (otherwise 404 `table cannot be found`).",
|
|
2376
|
+
"tag": "Tables",
|
|
2377
|
+
"method": "get",
|
|
2378
|
+
"path": "/tables/{table_token}/views/{view_token}/entries/summary",
|
|
2379
|
+
"params": [
|
|
2380
|
+
{
|
|
2381
|
+
"name": "table_token",
|
|
2382
|
+
"in": "path",
|
|
2383
|
+
"required": true
|
|
2384
|
+
},
|
|
2385
|
+
{
|
|
2386
|
+
"name": "view_token",
|
|
2387
|
+
"in": "path",
|
|
2388
|
+
"required": true
|
|
2389
|
+
},
|
|
2390
|
+
{
|
|
2391
|
+
"name": "fields",
|
|
2392
|
+
"in": "query",
|
|
2393
|
+
"required": false
|
|
2394
|
+
},
|
|
2395
|
+
{
|
|
2396
|
+
"name": "include_overview",
|
|
2397
|
+
"in": "query",
|
|
2398
|
+
"required": false
|
|
2399
|
+
},
|
|
2400
|
+
{
|
|
2401
|
+
"name": "filters",
|
|
2402
|
+
"in": "query",
|
|
2403
|
+
"required": false,
|
|
2404
|
+
"json": true
|
|
2405
|
+
},
|
|
2406
|
+
{
|
|
2407
|
+
"name": "keyword",
|
|
2408
|
+
"in": "query",
|
|
2409
|
+
"required": false
|
|
2410
|
+
}
|
|
2411
|
+
],
|
|
2412
|
+
"paramNames": [
|
|
2413
|
+
"table_token",
|
|
2414
|
+
"view_token",
|
|
2415
|
+
"fields",
|
|
2416
|
+
"include_overview",
|
|
2417
|
+
"filters",
|
|
2418
|
+
"keyword"
|
|
2419
|
+
],
|
|
2420
|
+
"successStatus": 200,
|
|
2421
|
+
"scopes": [
|
|
2422
|
+
"read_entries"
|
|
2423
|
+
],
|
|
2424
|
+
"responseSchema": "EntrySummaryResponse"
|
|
2425
|
+
},
|
|
2426
|
+
"getTableEntry": {
|
|
2427
|
+
"operationId": "getTableEntry",
|
|
2428
|
+
"summary": "Show a table entry",
|
|
2429
|
+
"description": "Same as `GET /forms/{form_token}/entries/{serial_number}`.",
|
|
2430
|
+
"tag": "Tables",
|
|
2431
|
+
"method": "get",
|
|
2432
|
+
"path": "/tables/{table_token}/entries/{serial_number}",
|
|
2433
|
+
"params": [
|
|
2434
|
+
{
|
|
2435
|
+
"name": "table_token",
|
|
2436
|
+
"in": "path",
|
|
2437
|
+
"required": true
|
|
2438
|
+
},
|
|
2439
|
+
{
|
|
2440
|
+
"name": "serial_number",
|
|
2441
|
+
"in": "path",
|
|
2442
|
+
"required": true
|
|
2443
|
+
},
|
|
2444
|
+
{
|
|
2445
|
+
"name": "fields",
|
|
2446
|
+
"in": "query",
|
|
2447
|
+
"required": false
|
|
2448
|
+
},
|
|
2449
|
+
{
|
|
2450
|
+
"name": "include_labels",
|
|
2451
|
+
"in": "query",
|
|
2452
|
+
"required": false
|
|
2453
|
+
}
|
|
2454
|
+
],
|
|
2455
|
+
"paramNames": [
|
|
2456
|
+
"table_token",
|
|
2457
|
+
"serial_number",
|
|
2458
|
+
"fields",
|
|
2459
|
+
"include_labels"
|
|
2460
|
+
],
|
|
2461
|
+
"successStatus": 200,
|
|
2462
|
+
"scopes": [
|
|
2463
|
+
"read_entries"
|
|
2464
|
+
],
|
|
2465
|
+
"responseSchema": "Entry"
|
|
2466
|
+
},
|
|
2467
|
+
"updateTableEntryViaPost": {
|
|
2468
|
+
"operationId": "updateTableEntryViaPost",
|
|
2469
|
+
"summary": "Partially update a table entry (POST)",
|
|
2470
|
+
"description": "A POST alias for `PATCH` on the same path; it performs an incremental update.",
|
|
2471
|
+
"tag": "Tables",
|
|
2472
|
+
"method": "post",
|
|
2473
|
+
"path": "/tables/{table_token}/entries/{serial_number}",
|
|
2474
|
+
"params": [
|
|
2475
|
+
{
|
|
2476
|
+
"name": "table_token",
|
|
2477
|
+
"in": "path",
|
|
2478
|
+
"required": true
|
|
2479
|
+
},
|
|
2480
|
+
{
|
|
2481
|
+
"name": "serial_number",
|
|
2482
|
+
"in": "path",
|
|
2483
|
+
"required": true
|
|
2484
|
+
}
|
|
2485
|
+
],
|
|
2486
|
+
"paramNames": [
|
|
2487
|
+
"table_token",
|
|
2488
|
+
"serial_number"
|
|
2489
|
+
],
|
|
2490
|
+
"body": {
|
|
2491
|
+
"contentType": "application/json",
|
|
2492
|
+
"required": true,
|
|
2493
|
+
"flatten": false,
|
|
2494
|
+
"param": "body"
|
|
2495
|
+
},
|
|
2496
|
+
"successStatus": 200,
|
|
2497
|
+
"scopes": [
|
|
2498
|
+
"write_entries"
|
|
2499
|
+
],
|
|
2500
|
+
"responseSchema": "Entry"
|
|
2501
|
+
},
|
|
2502
|
+
"replaceTableEntry": {
|
|
2503
|
+
"operationId": "replaceTableEntry",
|
|
2504
|
+
"summary": "Replace a table entry",
|
|
2505
|
+
"description": "Same as `PUT /forms/{form_token}/entries/{serial_number}` (full replacement).",
|
|
2506
|
+
"tag": "Tables",
|
|
2507
|
+
"method": "put",
|
|
2508
|
+
"path": "/tables/{table_token}/entries/{serial_number}",
|
|
2509
|
+
"params": [
|
|
2510
|
+
{
|
|
2511
|
+
"name": "table_token",
|
|
2512
|
+
"in": "path",
|
|
2513
|
+
"required": true
|
|
2514
|
+
},
|
|
2515
|
+
{
|
|
2516
|
+
"name": "serial_number",
|
|
2517
|
+
"in": "path",
|
|
2518
|
+
"required": true
|
|
2519
|
+
}
|
|
2520
|
+
],
|
|
2521
|
+
"paramNames": [
|
|
2522
|
+
"table_token",
|
|
2523
|
+
"serial_number"
|
|
2524
|
+
],
|
|
2525
|
+
"body": {
|
|
2526
|
+
"contentType": "application/json",
|
|
2527
|
+
"required": true,
|
|
2528
|
+
"flatten": false,
|
|
2529
|
+
"param": "body"
|
|
2530
|
+
},
|
|
2531
|
+
"successStatus": 200,
|
|
2532
|
+
"scopes": [
|
|
2533
|
+
"write_entries"
|
|
2534
|
+
],
|
|
2535
|
+
"responseSchema": "Entry"
|
|
2536
|
+
},
|
|
2537
|
+
"updateTableEntry": {
|
|
2538
|
+
"operationId": "updateTableEntry",
|
|
2539
|
+
"summary": "Partially update a table entry",
|
|
2540
|
+
"description": "Same as `PATCH /forms/{form_token}/entries/{serial_number}` (incremental update).",
|
|
2541
|
+
"tag": "Tables",
|
|
2542
|
+
"method": "patch",
|
|
2543
|
+
"path": "/tables/{table_token}/entries/{serial_number}",
|
|
2544
|
+
"params": [
|
|
2545
|
+
{
|
|
2546
|
+
"name": "table_token",
|
|
2547
|
+
"in": "path",
|
|
2548
|
+
"required": true
|
|
2549
|
+
},
|
|
2550
|
+
{
|
|
2551
|
+
"name": "serial_number",
|
|
2552
|
+
"in": "path",
|
|
2553
|
+
"required": true
|
|
2554
|
+
}
|
|
2555
|
+
],
|
|
2556
|
+
"paramNames": [
|
|
2557
|
+
"table_token",
|
|
2558
|
+
"serial_number"
|
|
2559
|
+
],
|
|
2560
|
+
"body": {
|
|
2561
|
+
"contentType": "application/json",
|
|
2562
|
+
"required": true,
|
|
2563
|
+
"flatten": false,
|
|
2564
|
+
"param": "body"
|
|
2565
|
+
},
|
|
2566
|
+
"successStatus": 200,
|
|
2567
|
+
"scopes": [
|
|
2568
|
+
"write_entries"
|
|
2569
|
+
],
|
|
2570
|
+
"responseSchema": "Entry"
|
|
2571
|
+
},
|
|
2572
|
+
"deleteTableEntry": {
|
|
2573
|
+
"operationId": "deleteTableEntry",
|
|
2574
|
+
"summary": "Delete a table entry",
|
|
2575
|
+
"description": "Same as `DELETE /forms/{form_token}/entries/{serial_number}`.",
|
|
2576
|
+
"tag": "Tables",
|
|
2577
|
+
"method": "delete",
|
|
2578
|
+
"path": "/tables/{table_token}/entries/{serial_number}",
|
|
2579
|
+
"params": [
|
|
2580
|
+
{
|
|
2581
|
+
"name": "table_token",
|
|
2582
|
+
"in": "path",
|
|
2583
|
+
"required": true
|
|
2584
|
+
},
|
|
2585
|
+
{
|
|
2586
|
+
"name": "serial_number",
|
|
2587
|
+
"in": "path",
|
|
2588
|
+
"required": true
|
|
2589
|
+
}
|
|
2590
|
+
],
|
|
2591
|
+
"paramNames": [
|
|
2592
|
+
"table_token",
|
|
2593
|
+
"serial_number"
|
|
2594
|
+
],
|
|
2595
|
+
"successStatus": 200,
|
|
2596
|
+
"scopes": [
|
|
2597
|
+
"write_entries"
|
|
2598
|
+
]
|
|
2599
|
+
},
|
|
2600
|
+
"listTableEntryComments": {
|
|
2601
|
+
"operationId": "listTableEntryComments",
|
|
2602
|
+
"summary": "List a table entry's comments",
|
|
2603
|
+
"description": "Returns all comments on this table entry in ascending order of creation time, under the same rules as form entry comments. Returns 404 (table cannot be found) when the token is not a table.",
|
|
2604
|
+
"tag": "Comments",
|
|
2605
|
+
"method": "get",
|
|
2606
|
+
"path": "/tables/{table_token}/entries/{serial_number}/comments",
|
|
2607
|
+
"params": [
|
|
2608
|
+
{
|
|
2609
|
+
"name": "table_token",
|
|
2610
|
+
"in": "path",
|
|
2611
|
+
"required": true
|
|
2612
|
+
},
|
|
2613
|
+
{
|
|
2614
|
+
"name": "serial_number",
|
|
2615
|
+
"in": "path",
|
|
2616
|
+
"required": true
|
|
2617
|
+
}
|
|
2618
|
+
],
|
|
2619
|
+
"paramNames": [
|
|
2620
|
+
"table_token",
|
|
2621
|
+
"serial_number"
|
|
2622
|
+
],
|
|
2623
|
+
"successStatus": 200,
|
|
2624
|
+
"scopes": [
|
|
2625
|
+
"read_entries"
|
|
2626
|
+
]
|
|
2627
|
+
},
|
|
2628
|
+
"createTableEntryComment": {
|
|
2629
|
+
"operationId": "createTableEntryComment",
|
|
2630
|
+
"summary": "Comment on a table entry",
|
|
2631
|
+
"description": "Creates a comment on this table entry, with the same parameters and limits as form entry comments (content is required, at most 2000 characters, mentioned users must be cooperators, parent_id must belong to the same entry). Returns 404 (table cannot be found) when the token is not a table.",
|
|
2632
|
+
"tag": "Comments",
|
|
2633
|
+
"method": "post",
|
|
2634
|
+
"path": "/tables/{table_token}/entries/{serial_number}/comments",
|
|
2635
|
+
"params": [
|
|
2636
|
+
{
|
|
2637
|
+
"name": "table_token",
|
|
2638
|
+
"in": "path",
|
|
2639
|
+
"required": true
|
|
2640
|
+
},
|
|
2641
|
+
{
|
|
2642
|
+
"name": "serial_number",
|
|
2643
|
+
"in": "path",
|
|
2644
|
+
"required": true
|
|
2645
|
+
}
|
|
2646
|
+
],
|
|
2647
|
+
"paramNames": [
|
|
2648
|
+
"table_token",
|
|
2649
|
+
"serial_number"
|
|
2650
|
+
],
|
|
2651
|
+
"body": {
|
|
2652
|
+
"contentType": "application/json",
|
|
2653
|
+
"required": true,
|
|
2654
|
+
"flatten": true
|
|
2655
|
+
},
|
|
2656
|
+
"successStatus": 201,
|
|
2657
|
+
"scopes": [
|
|
2658
|
+
"read_entries"
|
|
2659
|
+
],
|
|
2660
|
+
"responseSchema": "EntryComment"
|
|
2661
|
+
},
|
|
2662
|
+
"updateTableEntryComment": {
|
|
2663
|
+
"operationId": "updateTableEntryComment",
|
|
2664
|
+
"summary": "Update a comment on a table entry",
|
|
2665
|
+
"description": "Changes the content of a table entry comment; PUT is also accepted. Only the comment's author can edit it, otherwise returns 400; returns 404 when the comment does not belong to this entry. Returns 404 (table cannot be found) when the token is not a table.",
|
|
2666
|
+
"tag": "Comments",
|
|
2667
|
+
"method": "patch",
|
|
2668
|
+
"path": "/tables/{table_token}/entries/{serial_number}/comments/{comment_id}",
|
|
2669
|
+
"params": [
|
|
2670
|
+
{
|
|
2671
|
+
"name": "table_token",
|
|
2672
|
+
"in": "path",
|
|
2673
|
+
"required": true
|
|
2674
|
+
},
|
|
2675
|
+
{
|
|
2676
|
+
"name": "serial_number",
|
|
2677
|
+
"in": "path",
|
|
2678
|
+
"required": true
|
|
2679
|
+
},
|
|
2680
|
+
{
|
|
2681
|
+
"name": "comment_id",
|
|
2682
|
+
"in": "path",
|
|
2683
|
+
"required": true
|
|
2684
|
+
}
|
|
2685
|
+
],
|
|
2686
|
+
"paramNames": [
|
|
2687
|
+
"table_token",
|
|
2688
|
+
"serial_number",
|
|
2689
|
+
"comment_id"
|
|
2690
|
+
],
|
|
2691
|
+
"body": {
|
|
2692
|
+
"contentType": "application/json",
|
|
2693
|
+
"required": true,
|
|
2694
|
+
"flatten": true
|
|
2695
|
+
},
|
|
2696
|
+
"successStatus": 200,
|
|
2697
|
+
"scopes": [
|
|
2698
|
+
"read_entries"
|
|
2699
|
+
],
|
|
2700
|
+
"responseSchema": "EntryComment"
|
|
2701
|
+
},
|
|
2702
|
+
"deleteTableEntryComment": {
|
|
2703
|
+
"operationId": "deleteTableEntryComment",
|
|
2704
|
+
"summary": "Delete a comment on a table entry",
|
|
2705
|
+
"description": "Deletes a table entry comment. The comment's author, the table's creator, or a cooperator with the admin role can delete it; other cooperators get 400; a comment already deleted returns 404. Returns 404 (table cannot be found) when the token is not a table.",
|
|
2706
|
+
"tag": "Comments",
|
|
2707
|
+
"method": "delete",
|
|
2708
|
+
"path": "/tables/{table_token}/entries/{serial_number}/comments/{comment_id}",
|
|
2709
|
+
"params": [
|
|
2710
|
+
{
|
|
2711
|
+
"name": "table_token",
|
|
2712
|
+
"in": "path",
|
|
2713
|
+
"required": true
|
|
2714
|
+
},
|
|
2715
|
+
{
|
|
2716
|
+
"name": "serial_number",
|
|
2717
|
+
"in": "path",
|
|
2718
|
+
"required": true
|
|
2719
|
+
},
|
|
2720
|
+
{
|
|
2721
|
+
"name": "comment_id",
|
|
2722
|
+
"in": "path",
|
|
2723
|
+
"required": true
|
|
2724
|
+
}
|
|
2725
|
+
],
|
|
2726
|
+
"paramNames": [
|
|
2727
|
+
"table_token",
|
|
2728
|
+
"serial_number",
|
|
2729
|
+
"comment_id"
|
|
2730
|
+
],
|
|
2731
|
+
"successStatus": 200,
|
|
2732
|
+
"scopes": [
|
|
2733
|
+
"read_entries"
|
|
2734
|
+
]
|
|
2735
|
+
},
|
|
2736
|
+
"listTableViews": {
|
|
2737
|
+
"operationId": "listTableViews",
|
|
2738
|
+
"summary": "List a table's views",
|
|
2739
|
+
"description": "Returns the views of this table visible to the current caller, under the same rules as listing form views. Returns 404 (table cannot be found) when the token is not a table (kind is not table).",
|
|
2740
|
+
"tag": "Views",
|
|
2741
|
+
"method": "get",
|
|
2742
|
+
"path": "/tables/{table_token}/views",
|
|
2743
|
+
"params": [
|
|
2744
|
+
{
|
|
2745
|
+
"name": "table_token",
|
|
2746
|
+
"in": "path",
|
|
2747
|
+
"required": true
|
|
2748
|
+
}
|
|
2749
|
+
],
|
|
2750
|
+
"paramNames": [
|
|
2751
|
+
"table_token"
|
|
2752
|
+
],
|
|
2753
|
+
"successStatus": 200,
|
|
2754
|
+
"scopes": [
|
|
2755
|
+
"forms"
|
|
2756
|
+
]
|
|
2757
|
+
},
|
|
2758
|
+
"createTableView": {
|
|
2759
|
+
"operationId": "createTableView",
|
|
2760
|
+
"summary": "Create a view on a table",
|
|
2761
|
+
"description": "Creates a view on a table, with the same parameters and limits as creating a form view (at most 100 views per user per table, name at most 120 characters, an invalid filter returns 422). Returns 404 (table cannot be found) when the token is not a table. view_type can be form (a form view, a public fill page); see creating a form view for the rules.",
|
|
2762
|
+
"tag": "Views",
|
|
2763
|
+
"method": "post",
|
|
2764
|
+
"path": "/tables/{table_token}/views",
|
|
2765
|
+
"params": [
|
|
2766
|
+
{
|
|
2767
|
+
"name": "table_token",
|
|
2768
|
+
"in": "path",
|
|
2769
|
+
"required": true
|
|
2770
|
+
}
|
|
2771
|
+
],
|
|
2772
|
+
"paramNames": [
|
|
2773
|
+
"table_token"
|
|
2774
|
+
],
|
|
2775
|
+
"body": {
|
|
2776
|
+
"contentType": "application/json",
|
|
2777
|
+
"required": true,
|
|
2778
|
+
"flatten": false,
|
|
2779
|
+
"param": "body"
|
|
2780
|
+
},
|
|
2781
|
+
"successStatus": 201,
|
|
2782
|
+
"scopes": [
|
|
2783
|
+
"forms"
|
|
2784
|
+
],
|
|
2785
|
+
"responseSchema": "FormView"
|
|
2786
|
+
},
|
|
2787
|
+
"getTableView": {
|
|
2788
|
+
"operationId": "getTableView",
|
|
2789
|
+
"summary": "Show a view of a table",
|
|
2790
|
+
"description": "Returns one table view; only views visible to the caller can be read. Returns 404 (table cannot be found) when the token is not a table.",
|
|
2791
|
+
"tag": "Views",
|
|
2792
|
+
"method": "get",
|
|
2793
|
+
"path": "/tables/{table_token}/views/{view_token}",
|
|
2794
|
+
"params": [
|
|
2795
|
+
{
|
|
2796
|
+
"name": "table_token",
|
|
2797
|
+
"in": "path",
|
|
2798
|
+
"required": true
|
|
2799
|
+
},
|
|
2800
|
+
{
|
|
2801
|
+
"name": "view_token",
|
|
2802
|
+
"in": "path",
|
|
2803
|
+
"required": true
|
|
2804
|
+
}
|
|
2805
|
+
],
|
|
2806
|
+
"paramNames": [
|
|
2807
|
+
"table_token",
|
|
2808
|
+
"view_token"
|
|
2809
|
+
],
|
|
2810
|
+
"successStatus": 200,
|
|
2811
|
+
"scopes": [
|
|
2812
|
+
"forms"
|
|
2813
|
+
],
|
|
2814
|
+
"responseSchema": "FormView"
|
|
2815
|
+
},
|
|
2816
|
+
"updateTableView": {
|
|
2817
|
+
"operationId": "updateTableView",
|
|
2818
|
+
"summary": "Update a view of a table",
|
|
2819
|
+
"description": "Updates a table view's settings; PUT is also accepted. The rules are the same as for updating a form view: only the creator can change visibility (otherwise 403), and a filter or model validation failure returns 422. Returns 404 (table cannot be found) when the token is not a table.",
|
|
2820
|
+
"tag": "Views",
|
|
2821
|
+
"method": "patch",
|
|
2822
|
+
"path": "/tables/{table_token}/views/{view_token}",
|
|
2823
|
+
"params": [
|
|
2824
|
+
{
|
|
2825
|
+
"name": "table_token",
|
|
2826
|
+
"in": "path",
|
|
2827
|
+
"required": true
|
|
2828
|
+
},
|
|
2829
|
+
{
|
|
2830
|
+
"name": "view_token",
|
|
2831
|
+
"in": "path",
|
|
2832
|
+
"required": true
|
|
2833
|
+
}
|
|
2834
|
+
],
|
|
2835
|
+
"paramNames": [
|
|
2836
|
+
"table_token",
|
|
2837
|
+
"view_token"
|
|
2838
|
+
],
|
|
2839
|
+
"body": {
|
|
2840
|
+
"contentType": "application/json",
|
|
2841
|
+
"required": true,
|
|
2842
|
+
"flatten": false,
|
|
2843
|
+
"param": "body"
|
|
2844
|
+
},
|
|
2845
|
+
"successStatus": 200,
|
|
2846
|
+
"scopes": [
|
|
2847
|
+
"forms"
|
|
2848
|
+
],
|
|
2849
|
+
"responseSchema": "FormView"
|
|
2850
|
+
},
|
|
2851
|
+
"deleteTableView": {
|
|
2852
|
+
"operationId": "deleteTableView",
|
|
2853
|
+
"summary": "Delete a view of a table",
|
|
2854
|
+
"description": "Deletes a table view. Predefined views, views whose view_scope is form, and the caller's last visible view cannot be deleted; these return 422. Returns 404 (table cannot be found) when the token is not a table. Deleting a form view requires a predefined role that can add entries (otherwise 403); once deleted, its fill link stops working immediately, and this cannot be undone.",
|
|
2855
|
+
"tag": "Views",
|
|
2856
|
+
"method": "delete",
|
|
2857
|
+
"path": "/tables/{table_token}/views/{view_token}",
|
|
2858
|
+
"params": [
|
|
2859
|
+
{
|
|
2860
|
+
"name": "table_token",
|
|
2861
|
+
"in": "path",
|
|
2862
|
+
"required": true
|
|
2863
|
+
},
|
|
2864
|
+
{
|
|
2865
|
+
"name": "view_token",
|
|
2866
|
+
"in": "path",
|
|
2867
|
+
"required": true
|
|
2868
|
+
}
|
|
2869
|
+
],
|
|
2870
|
+
"paramNames": [
|
|
2871
|
+
"table_token",
|
|
2872
|
+
"view_token"
|
|
2873
|
+
],
|
|
2874
|
+
"successStatus": 200,
|
|
2875
|
+
"scopes": [
|
|
2876
|
+
"forms"
|
|
2877
|
+
]
|
|
2878
|
+
},
|
|
2879
|
+
"listTableViewEntries": {
|
|
2880
|
+
"operationId": "listTableViewEntries",
|
|
2881
|
+
"summary": "List a table view's entries",
|
|
2882
|
+
"description": "Returns entries using the table view's filters and sort, at most 50 per page; pagination and the rules for which fields are returned are the same as for form view entries. Returns 404 (table cannot be found) when the token is not a table.",
|
|
2883
|
+
"tag": "Views",
|
|
2884
|
+
"method": "get",
|
|
2885
|
+
"path": "/tables/{table_token}/views/{view_token}/entries",
|
|
2886
|
+
"params": [
|
|
2887
|
+
{
|
|
2888
|
+
"name": "table_token",
|
|
2889
|
+
"in": "path",
|
|
2890
|
+
"required": true
|
|
2891
|
+
},
|
|
2892
|
+
{
|
|
2893
|
+
"name": "view_token",
|
|
2894
|
+
"in": "path",
|
|
2895
|
+
"required": true
|
|
2896
|
+
},
|
|
2897
|
+
{
|
|
2898
|
+
"name": "next",
|
|
2899
|
+
"in": "query",
|
|
2900
|
+
"required": false
|
|
2901
|
+
},
|
|
2902
|
+
{
|
|
2903
|
+
"name": "include_labels",
|
|
2904
|
+
"in": "query",
|
|
2905
|
+
"required": false
|
|
2906
|
+
}
|
|
2907
|
+
],
|
|
2908
|
+
"paramNames": [
|
|
2909
|
+
"table_token",
|
|
2910
|
+
"view_token",
|
|
2911
|
+
"next",
|
|
2912
|
+
"include_labels"
|
|
2913
|
+
],
|
|
2914
|
+
"successStatus": 200,
|
|
2915
|
+
"scopes": [
|
|
2916
|
+
"read_entries"
|
|
2917
|
+
],
|
|
2918
|
+
"responseSchema": "EntryListResponse"
|
|
2919
|
+
},
|
|
2920
|
+
"listCheckinCampaigns": {
|
|
2921
|
+
"operationId": "listCheckinCampaigns",
|
|
2922
|
+
"summary": "List check-in campaigns",
|
|
2923
|
+
"description": "Lists the check-in campaigns the caller created, newest first. With an account-level credential, returns the ones the account owner created.",
|
|
2924
|
+
"tag": "Plugins",
|
|
2925
|
+
"method": "get",
|
|
2926
|
+
"path": "/plugins/checkin/campaigns",
|
|
2927
|
+
"params": [
|
|
2928
|
+
{
|
|
2929
|
+
"name": "form_token",
|
|
2930
|
+
"in": "query",
|
|
2931
|
+
"required": false
|
|
2932
|
+
},
|
|
2933
|
+
{
|
|
2934
|
+
"name": "limit",
|
|
2935
|
+
"in": "query",
|
|
2936
|
+
"required": false
|
|
2937
|
+
}
|
|
2938
|
+
],
|
|
2939
|
+
"paramNames": [
|
|
2940
|
+
"form_token",
|
|
2941
|
+
"limit"
|
|
2942
|
+
],
|
|
2943
|
+
"successStatus": 200,
|
|
2944
|
+
"scopes": [
|
|
2945
|
+
"form_setting"
|
|
2946
|
+
]
|
|
2947
|
+
},
|
|
2948
|
+
"createCheckinCampaign": {
|
|
2949
|
+
"operationId": "createCheckinCampaign",
|
|
2950
|
+
"summary": "Create a check-in campaign",
|
|
2951
|
+
"description": "Turns check-in on for a form. The caller must be able to reach the form.\n- Same limits as picking a form in the web app: returns 400 when the form has WeChat red envelope, lucky wheel, certificate or confirmation code on, is bound to a plugin that takes over the after-submit redirect (a check-in campaign with a check-in code included), or its after-submit action is not the default message. Turn that off first.\n- Only one check-in campaign is in effect on a form at a time; creating one turns off the one that was in effect.\n- Without `checkin_field_api_code`, the form's first mobile field is used, then its first name field; with neither, returns 400. The check-in field cannot be changed afterwards.\n- The campaign belongs to the caller, or to the account owner with an account-level credential. The caller is also added as a verifier.\n- `enable_checkin_code` (on by default) rewrites the form's after-submit redirect and data push URL to the check-in code page, and overrides any Webhook already on the form (and the other way round).",
|
|
2952
|
+
"tag": "Plugins",
|
|
2953
|
+
"method": "post",
|
|
2954
|
+
"path": "/plugins/checkin/campaigns",
|
|
2955
|
+
"params": [],
|
|
2956
|
+
"paramNames": [],
|
|
2957
|
+
"body": {
|
|
2958
|
+
"contentType": "application/json",
|
|
2959
|
+
"required": true,
|
|
2960
|
+
"flatten": true
|
|
2961
|
+
},
|
|
2962
|
+
"successStatus": 201,
|
|
2963
|
+
"scopes": [
|
|
2964
|
+
"form_setting"
|
|
2965
|
+
],
|
|
2966
|
+
"responseSchema": "CheckinCampaign"
|
|
2967
|
+
},
|
|
2968
|
+
"getCheckinCampaign": {
|
|
2969
|
+
"operationId": "getCheckinCampaign",
|
|
2970
|
+
"summary": "Get a check-in campaign",
|
|
2971
|
+
"description": "Returns the campaign's settings, how many have checked in, and its check-in, verifier invite and management links. Only campaigns the caller created.",
|
|
2972
|
+
"tag": "Plugins",
|
|
2973
|
+
"method": "get",
|
|
2974
|
+
"path": "/plugins/checkin/campaigns/{id}",
|
|
2975
|
+
"params": [
|
|
2976
|
+
{
|
|
2977
|
+
"name": "id",
|
|
2978
|
+
"in": "path",
|
|
2979
|
+
"required": true
|
|
2980
|
+
}
|
|
2981
|
+
],
|
|
2982
|
+
"paramNames": [
|
|
2983
|
+
"id"
|
|
2984
|
+
],
|
|
2985
|
+
"successStatus": 200,
|
|
2986
|
+
"scopes": [
|
|
2987
|
+
"form_setting"
|
|
2988
|
+
],
|
|
2989
|
+
"responseSchema": "CheckinCampaign"
|
|
2990
|
+
},
|
|
2991
|
+
"updateCheckinCampaign": {
|
|
2992
|
+
"operationId": "updateCheckinCampaign",
|
|
2993
|
+
"summary": "Update a check-in campaign",
|
|
2994
|
+
"description": "Updates only the keys present in the body; PUT is accepted too. Only campaigns the caller created.\nTurning it back on with `enabled: true` turns off any other campaign in effect on the form.",
|
|
2995
|
+
"tag": "Plugins",
|
|
2996
|
+
"method": "patch",
|
|
2997
|
+
"path": "/plugins/checkin/campaigns/{id}",
|
|
2998
|
+
"params": [
|
|
2999
|
+
{
|
|
3000
|
+
"name": "id",
|
|
3001
|
+
"in": "path",
|
|
3002
|
+
"required": true
|
|
3003
|
+
}
|
|
3004
|
+
],
|
|
3005
|
+
"paramNames": [
|
|
3006
|
+
"id"
|
|
3007
|
+
],
|
|
3008
|
+
"body": {
|
|
3009
|
+
"contentType": "application/json",
|
|
3010
|
+
"required": true,
|
|
3011
|
+
"flatten": true
|
|
3012
|
+
},
|
|
3013
|
+
"successStatus": 200,
|
|
3014
|
+
"scopes": [
|
|
3015
|
+
"form_setting"
|
|
3016
|
+
],
|
|
3017
|
+
"responseSchema": "CheckinCampaign"
|
|
3018
|
+
},
|
|
3019
|
+
"deleteCheckinCampaign": {
|
|
3020
|
+
"operationId": "deleteCheckinCampaign",
|
|
3021
|
+
"summary": "Delete a check-in campaign",
|
|
3022
|
+
"description": "Deletes the campaign and unbinds it from the form; its check-in records are no longer visible. To pause check-in only, PATCH `enabled: false`.",
|
|
3023
|
+
"tag": "Plugins",
|
|
3024
|
+
"method": "delete",
|
|
3025
|
+
"path": "/plugins/checkin/campaigns/{id}",
|
|
3026
|
+
"params": [
|
|
3027
|
+
{
|
|
3028
|
+
"name": "id",
|
|
3029
|
+
"in": "path",
|
|
3030
|
+
"required": true
|
|
3031
|
+
}
|
|
3032
|
+
],
|
|
3033
|
+
"paramNames": [
|
|
3034
|
+
"id"
|
|
3035
|
+
],
|
|
3036
|
+
"successStatus": 204,
|
|
3037
|
+
"scopes": [
|
|
3038
|
+
"form_setting"
|
|
3039
|
+
]
|
|
3040
|
+
},
|
|
3041
|
+
"listOpensearchQueries": {
|
|
3042
|
+
"operationId": "listOpensearchQueries",
|
|
3043
|
+
"summary": "List public queries",
|
|
3044
|
+
"description": "Returns the public queries created by the current caller (an account access token counts as the account owner), newest first, with summary fields only. With form_token, returns only the queries under that form; returns 404 when form_token does not exist or the caller cannot access it, instead of ignoring the parameter.",
|
|
3045
|
+
"tag": "OpenSearch",
|
|
3046
|
+
"method": "get",
|
|
3047
|
+
"path": "/opensearch/queries",
|
|
3048
|
+
"params": [
|
|
3049
|
+
{
|
|
3050
|
+
"name": "form_token",
|
|
3051
|
+
"in": "query",
|
|
3052
|
+
"required": false
|
|
3053
|
+
}
|
|
3054
|
+
],
|
|
3055
|
+
"paramNames": [
|
|
3056
|
+
"form_token"
|
|
3057
|
+
],
|
|
3058
|
+
"successStatus": 200,
|
|
3059
|
+
"scopes": [
|
|
3060
|
+
"forms"
|
|
3061
|
+
]
|
|
3062
|
+
},
|
|
3063
|
+
"createOpensearchQuery": {
|
|
3064
|
+
"operationId": "createOpensearchQuery",
|
|
3065
|
+
"summary": "Create a public query",
|
|
3066
|
+
"description": "Creates a public query on the form given by form_token, with the current caller as its creator. The caller must be able to manage the form: no access returns 404, read but not manage returns 403; a plan without the public query feature returns 402. Fields referenced in search_field_rules must be searchable fields of the form, and those in display_field_rules must be displayable fields; otherwise returns 400 listing the available api_code values. search_field_rules / display_field_rules, when passed, cannot be empty arrays; scope_conditions requires a plan that supports limiting the range of searchable entries. A preview image is generated asynchronously after saving.",
|
|
3067
|
+
"tag": "OpenSearch",
|
|
3068
|
+
"method": "post",
|
|
3069
|
+
"path": "/opensearch/queries",
|
|
3070
|
+
"params": [],
|
|
3071
|
+
"paramNames": [],
|
|
3072
|
+
"body": {
|
|
3073
|
+
"contentType": "application/json",
|
|
3074
|
+
"required": true,
|
|
3075
|
+
"flatten": false,
|
|
3076
|
+
"param": "body"
|
|
3077
|
+
},
|
|
3078
|
+
"successStatus": 201,
|
|
3079
|
+
"scopes": [
|
|
3080
|
+
"forms"
|
|
3081
|
+
],
|
|
3082
|
+
"responseSchema": "OpensearchQuery"
|
|
3083
|
+
},
|
|
3084
|
+
"getOpensearchQuery": {
|
|
3085
|
+
"operationId": "getOpensearchQuery",
|
|
3086
|
+
"summary": "Show a public query",
|
|
3087
|
+
"description": "Returns the public query details, including the search field rules and display field rules. The caller can read only queries it created; another user's query returns 404 (opensearch query cannot be found).",
|
|
3088
|
+
"tag": "OpenSearch",
|
|
3089
|
+
"method": "get",
|
|
3090
|
+
"path": "/opensearch/queries/{query_token}",
|
|
3091
|
+
"params": [
|
|
3092
|
+
{
|
|
3093
|
+
"name": "query_token",
|
|
3094
|
+
"in": "path",
|
|
3095
|
+
"required": true
|
|
3096
|
+
}
|
|
3097
|
+
],
|
|
3098
|
+
"paramNames": [
|
|
3099
|
+
"query_token"
|
|
3100
|
+
],
|
|
3101
|
+
"successStatus": 200,
|
|
3102
|
+
"scopes": [
|
|
3103
|
+
"forms"
|
|
3104
|
+
],
|
|
3105
|
+
"responseSchema": "OpensearchQuery"
|
|
3106
|
+
},
|
|
3107
|
+
"updateOpensearchQuery": {
|
|
3108
|
+
"operationId": "updateOpensearchQuery",
|
|
3109
|
+
"summary": "Update a public query",
|
|
3110
|
+
"description": "Updates a public query the caller created; PUT is also accepted. Only the keys present in the request are updated. Returns 400 when the query's form has been deleted. Field rules are validated as on create: referencing a field that cannot be searched / displayed, an empty rule array, an empty name and the like all return 400. An update does not check form manage permission or whether the plan includes public queries.",
|
|
3111
|
+
"tag": "OpenSearch",
|
|
3112
|
+
"method": "patch",
|
|
3113
|
+
"path": "/opensearch/queries/{query_token}",
|
|
3114
|
+
"params": [
|
|
3115
|
+
{
|
|
3116
|
+
"name": "query_token",
|
|
3117
|
+
"in": "path",
|
|
3118
|
+
"required": true
|
|
3119
|
+
}
|
|
3120
|
+
],
|
|
3121
|
+
"paramNames": [
|
|
3122
|
+
"query_token"
|
|
3123
|
+
],
|
|
3124
|
+
"body": {
|
|
3125
|
+
"contentType": "application/json",
|
|
3126
|
+
"required": true,
|
|
3127
|
+
"flatten": false,
|
|
3128
|
+
"param": "body"
|
|
3129
|
+
},
|
|
3130
|
+
"successStatus": 200,
|
|
3131
|
+
"scopes": [
|
|
3132
|
+
"forms"
|
|
3133
|
+
],
|
|
3134
|
+
"responseSchema": "OpensearchQuery"
|
|
3135
|
+
},
|
|
3136
|
+
"listOpensearchQuerySuggestions": {
|
|
3137
|
+
"operationId": "listOpensearchQuerySuggestions",
|
|
3138
|
+
"summary": "Suggest fields for a public query",
|
|
3139
|
+
"description": "Returns the search fields and display fields a form offers for public queries, plus the recommended field api_code values, for building search_field_rules / display_field_rules. The caller must be able to manage the form: no access returns 404, read but not manage returns 403. Whether the plan includes public queries is not checked.",
|
|
3140
|
+
"tag": "OpenSearch",
|
|
3141
|
+
"method": "get",
|
|
3142
|
+
"path": "/opensearch/query_suggestions",
|
|
3143
|
+
"params": [
|
|
3144
|
+
{
|
|
3145
|
+
"name": "form_token",
|
|
3146
|
+
"in": "query",
|
|
3147
|
+
"required": true
|
|
3148
|
+
}
|
|
3149
|
+
],
|
|
3150
|
+
"paramNames": [
|
|
3151
|
+
"form_token"
|
|
3152
|
+
],
|
|
3153
|
+
"successStatus": 200,
|
|
3154
|
+
"scopes": [
|
|
3155
|
+
"forms"
|
|
3156
|
+
]
|
|
3157
|
+
},
|
|
3158
|
+
"listFolders": {
|
|
3159
|
+
"operationId": "listFolders",
|
|
3160
|
+
"summary": "List folders",
|
|
3161
|
+
"description": "Lists the folders the current user has manage permission on (form folders and table folders alike, told apart by `kind`), newest first. With an account-level credential, returns the account owner's folders.\n`limit` defaults to 50 and is clamped to 1 to 100; there is no paging: `total` is the full count, `count` the number returned this time.",
|
|
3162
|
+
"tag": "Folders",
|
|
3163
|
+
"method": "get",
|
|
3164
|
+
"path": "/folders",
|
|
3165
|
+
"params": [
|
|
3166
|
+
{
|
|
3167
|
+
"name": "limit",
|
|
3168
|
+
"in": "query",
|
|
3169
|
+
"required": false
|
|
3170
|
+
}
|
|
3171
|
+
],
|
|
3172
|
+
"paramNames": [
|
|
3173
|
+
"limit"
|
|
3174
|
+
],
|
|
3175
|
+
"successStatus": 200,
|
|
3176
|
+
"scopes": [
|
|
3177
|
+
"forms"
|
|
3178
|
+
]
|
|
3179
|
+
},
|
|
3180
|
+
"createFolder": {
|
|
3181
|
+
"operationId": "createFolder",
|
|
3182
|
+
"summary": "Create a folder",
|
|
3183
|
+
"description": "Creates a folder as the current user; the creator becomes the folder's manager. `kind` decides whether the folder holds forms (`form`, the default) or tables (`table`).\nReturns 400 `Name cannot be empty` when `name` is empty; returns 400 `Kind must be one of: form, table` when `kind` is not form / table; returns 400 when model validation fails, with the validation message in `error_description`.",
|
|
3184
|
+
"tag": "Folders",
|
|
3185
|
+
"method": "post",
|
|
3186
|
+
"path": "/folders",
|
|
3187
|
+
"params": [],
|
|
3188
|
+
"paramNames": [],
|
|
3189
|
+
"body": {
|
|
3190
|
+
"contentType": "application/json",
|
|
3191
|
+
"required": true,
|
|
3192
|
+
"flatten": true
|
|
3193
|
+
},
|
|
3194
|
+
"successStatus": 201,
|
|
3195
|
+
"scopes": [
|
|
3196
|
+
"forms"
|
|
3197
|
+
],
|
|
3198
|
+
"responseSchema": "Folder"
|
|
3199
|
+
},
|
|
3200
|
+
"listPredefinedChoicesSets": {
|
|
3201
|
+
"operationId": "listPredefinedChoicesSets",
|
|
3202
|
+
"summary": "List predefined choice sets",
|
|
3203
|
+
"description": "Lists the current account's custom predefined choice sets (type custom), only those matching the locale of the current request (as the server implements it); the built-in global choice sets are not returned.",
|
|
3204
|
+
"tag": "Predefined Choices Sets",
|
|
3205
|
+
"method": "get",
|
|
3206
|
+
"path": "/predefined_choices_sets",
|
|
3207
|
+
"params": [],
|
|
3208
|
+
"paramNames": [],
|
|
3209
|
+
"successStatus": 200,
|
|
3210
|
+
"scopes": [
|
|
3211
|
+
"form_setting"
|
|
3212
|
+
]
|
|
3213
|
+
},
|
|
3214
|
+
"createPredefinedChoicesSet": {
|
|
3215
|
+
"operationId": "createPredefinedChoicesSet",
|
|
3216
|
+
"summary": "Create a predefined choice set",
|
|
3217
|
+
"description": "Creates a custom predefined choice set in the current account. It looks up by `label`: when the account already has a set with the same label, that set's `choices` are overwritten (in effect an update); otherwise a new set is created.\nThe request body must be wrapped under the `predefined_choices_set` key; returns 400 when the key is missing. Empty strings in `choices` are dropped; neither `label` nor the remaining `choices` may be empty, otherwise returns 400 with the body `{ errors, status: \"failed\" }`.\nReturns 200 on success (not 201).",
|
|
3218
|
+
"tag": "Predefined Choices Sets",
|
|
3219
|
+
"method": "post",
|
|
3220
|
+
"path": "/predefined_choices_sets",
|
|
3221
|
+
"params": [],
|
|
3222
|
+
"paramNames": [],
|
|
3223
|
+
"body": {
|
|
3224
|
+
"contentType": "application/json",
|
|
3225
|
+
"required": true,
|
|
3226
|
+
"flatten": true
|
|
3227
|
+
},
|
|
3228
|
+
"successStatus": 200,
|
|
3229
|
+
"scopes": [
|
|
3230
|
+
"form_setting"
|
|
3231
|
+
],
|
|
3232
|
+
"responseSchema": "PredefinedChoicesSet"
|
|
3233
|
+
},
|
|
3234
|
+
"updatePredefinedChoicesSet": {
|
|
3235
|
+
"operationId": "updatePredefinedChoicesSet",
|
|
3236
|
+
"summary": "Update a predefined choice set",
|
|
3237
|
+
"description": "Updates the `label` and / or `choices` of one of the current account's custom predefined choice sets. PUT is also accepted and behaves the same.\nOnly a set of type custom that belongs to the current account can be updated: a global set or another account's set returns 403 `{ errors: \"forbidden\", status: \"failed\" }`; an ID that does not exist returns 404 `{ errors: \"not found\", status: \"failed\" }`; a validation failure returns 400 `{ errors, status: \"failed\" }`.",
|
|
3238
|
+
"tag": "Predefined Choices Sets",
|
|
3239
|
+
"method": "patch",
|
|
3240
|
+
"path": "/predefined_choices_sets/{id}",
|
|
3241
|
+
"params": [
|
|
3242
|
+
{
|
|
3243
|
+
"name": "id",
|
|
3244
|
+
"in": "path",
|
|
3245
|
+
"required": true
|
|
3246
|
+
}
|
|
3247
|
+
],
|
|
3248
|
+
"paramNames": [
|
|
3249
|
+
"id"
|
|
3250
|
+
],
|
|
3251
|
+
"body": {
|
|
3252
|
+
"contentType": "application/json",
|
|
3253
|
+
"required": true,
|
|
3254
|
+
"flatten": true
|
|
3255
|
+
},
|
|
3256
|
+
"successStatus": 200,
|
|
3257
|
+
"scopes": [
|
|
3258
|
+
"form_setting"
|
|
3259
|
+
],
|
|
3260
|
+
"responseSchema": "PredefinedChoicesSet"
|
|
3261
|
+
},
|
|
3262
|
+
"deletePredefinedChoicesSet": {
|
|
3263
|
+
"operationId": "deletePredefinedChoicesSet",
|
|
3264
|
+
"summary": "Delete a predefined choice set",
|
|
3265
|
+
"description": "Deletes one of the current account's custom predefined choice sets; returns 200 with no response body on success.\nOnly a set of type custom that belongs to the current account can be deleted: a global set or another account's set returns 403 `{ errors: \"forbidden\", status: \"failed\" }`; an ID that does not exist returns 404 `{ errors: \"not found\", status: \"failed\" }`.",
|
|
3266
|
+
"tag": "Predefined Choices Sets",
|
|
3267
|
+
"method": "delete",
|
|
3268
|
+
"path": "/predefined_choices_sets/{id}",
|
|
3269
|
+
"params": [
|
|
3270
|
+
{
|
|
3271
|
+
"name": "id",
|
|
3272
|
+
"in": "path",
|
|
3273
|
+
"required": true
|
|
3274
|
+
}
|
|
3275
|
+
],
|
|
3276
|
+
"paramNames": [
|
|
3277
|
+
"id"
|
|
3278
|
+
],
|
|
3279
|
+
"successStatus": 200,
|
|
3280
|
+
"scopes": [
|
|
3281
|
+
"form_setting"
|
|
3282
|
+
]
|
|
3283
|
+
},
|
|
3284
|
+
"createTemplateUsage": {
|
|
3285
|
+
"operationId": "createTemplateUsage",
|
|
3286
|
+
"summary": "Create a form from a template",
|
|
3287
|
+
"description": "Uses a template from the template market as the current user, copies it into a new form, and returns the new form's token and edit page URL.\nThe template is given by `id` (or `template_id`), which takes a template token or a 24-character hexadecimal ID. Optional parameters: `tags` (tags, an array or a comma-separated string), `tag_id` / `folder_id` (the tag / folder the new form goes into), `scene` (target scene; falls back to form when the template has fields the scene does not allow), `frm` (source marker; affects the recorded created_from), `create_source`, `group_id`.\nPayment-related branches:\n- Paid template the current user has not bought: returns 200 with the body `{ template_url }` (the template purchase page URL), and no form is created.\n- Template uses paid features the current plan does not offer: returns 403 `{ error: \"CAN_FEATURE_TRIAL\", target_plan, target_trial_type, ... }` when the caller is an admin and a feature trial can be started; otherwise returns 403 `{ error: \"PAID_FEATURE_REQUIRED\", target_plan, template_url }`; an account from a channel partner gets 403 `{ error: \"UNAVAILABLE_TO_TRIAL_OR_UPGRADE\" }`.\n- With `form_app_trial_alert` passed and the template bound to form apps that must be bought / tried: returns 200 `{ error: \"CANNOT_FORM_APP_TRIAL\" | \"FORM_APP_TRIAL_REQUIRED\", ... }`; confirm with `confirm_unbind_form_app` / `confirm_form_app_trial` and retry.\nWhen form creation fails (failing the content risk check included), returns 400 `{ error }`. When the template does not exist, returns 404 with an HTML page, not JSON.\n`mobile_editor_forbidden` appears only on a mobile request when the new form has the card layout and the current plan cannot use the mobile editor.",
|
|
3288
|
+
"tag": "Templates",
|
|
3289
|
+
"method": "post",
|
|
3290
|
+
"path": "/template_usages",
|
|
3291
|
+
"params": [],
|
|
3292
|
+
"paramNames": [],
|
|
3293
|
+
"body": {
|
|
3294
|
+
"contentType": "application/json",
|
|
3295
|
+
"required": true,
|
|
3296
|
+
"flatten": true
|
|
3297
|
+
},
|
|
3298
|
+
"successStatus": 200,
|
|
3299
|
+
"scopes": [
|
|
3300
|
+
"forms"
|
|
3301
|
+
]
|
|
3302
|
+
},
|
|
3303
|
+
"listContacts": {
|
|
3304
|
+
"operationId": "listContacts",
|
|
3305
|
+
"summary": "List contacts",
|
|
3306
|
+
"description": "Lists the current user's contacts page by page, by ID descending, a fixed 50 per page. With an account-level credential, returns the account owner's contacts.\nCursor paging: `next` in the response is the ID of the first contact on the next page; pass it as the query parameter `next` to get that page. `next` is null when there is no more data.",
|
|
3307
|
+
"tag": "Contacts",
|
|
3308
|
+
"method": "get",
|
|
3309
|
+
"path": "/contacts",
|
|
3310
|
+
"params": [
|
|
3311
|
+
{
|
|
3312
|
+
"name": "next",
|
|
3313
|
+
"in": "query",
|
|
3314
|
+
"required": false
|
|
3315
|
+
}
|
|
3316
|
+
],
|
|
3317
|
+
"paramNames": [
|
|
3318
|
+
"next"
|
|
3319
|
+
],
|
|
3320
|
+
"successStatus": 200,
|
|
3321
|
+
"scopes": [
|
|
3322
|
+
"read_contacts"
|
|
3323
|
+
]
|
|
3324
|
+
},
|
|
3325
|
+
"getCurrentUser": {
|
|
3326
|
+
"operationId": "getCurrentUser",
|
|
3327
|
+
"summary": "Show the current user",
|
|
3328
|
+
"description": "Returns the user behind the current credential. With an account-level credential (no specific user), returns the account owner.",
|
|
3329
|
+
"tag": "Account",
|
|
3330
|
+
"method": "get",
|
|
3331
|
+
"path": "/me",
|
|
3332
|
+
"params": [],
|
|
3333
|
+
"paramNames": [],
|
|
3334
|
+
"successStatus": 200,
|
|
3335
|
+
"scopes": [
|
|
3336
|
+
"users"
|
|
3337
|
+
],
|
|
3338
|
+
"responseSchema": "CurrentUser"
|
|
3339
|
+
},
|
|
3340
|
+
"getBillingAccount": {
|
|
3341
|
+
"operationId": "getBillingAccount",
|
|
3342
|
+
"summary": "Show the current account",
|
|
3343
|
+
"description": "Returns the account the current credential belongs to: plan, this month's usage and quota, feature trial status, and the bound payment merchant / WeChat Pay / Alipay accounts.\n`usage` is null when the account has no usage record for this month yet; for an add-on service with unlimited quota, only `unit`, `unlimited: true` and `consumed_quota` are returned.",
|
|
3344
|
+
"tag": "Account",
|
|
3345
|
+
"method": "get",
|
|
3346
|
+
"path": "/billing_account",
|
|
3347
|
+
"params": [],
|
|
3348
|
+
"paramNames": [],
|
|
3349
|
+
"successStatus": 200,
|
|
3350
|
+
"scopes": [
|
|
3351
|
+
"users"
|
|
3352
|
+
],
|
|
3353
|
+
"responseSchema": "BillingAccount"
|
|
3354
|
+
},
|
|
3355
|
+
"listBillingAccountUsers": {
|
|
3356
|
+
"operationId": "listBillingAccountUsers",
|
|
3357
|
+
"summary": "List account members",
|
|
3358
|
+
"description": "Lists the members of the current account (deactivated members included), by status ascending (active first), then by creation time, newest first.\n`limit` defaults to 50 and is clamped to 1 to 100; there is no paging: `total` is the total number of members, `count` the number returned this time.",
|
|
3359
|
+
"tag": "Account",
|
|
3360
|
+
"method": "get",
|
|
3361
|
+
"path": "/billing_account/users",
|
|
3362
|
+
"params": [
|
|
3363
|
+
{
|
|
3364
|
+
"name": "limit",
|
|
3365
|
+
"in": "query",
|
|
3366
|
+
"required": false
|
|
3367
|
+
}
|
|
3368
|
+
],
|
|
3369
|
+
"paramNames": [
|
|
3370
|
+
"limit"
|
|
3371
|
+
],
|
|
3372
|
+
"successStatus": 200,
|
|
3373
|
+
"scopes": [
|
|
3374
|
+
"users"
|
|
3375
|
+
]
|
|
3376
|
+
},
|
|
3377
|
+
"listBillingAccountInvoices": {
|
|
3378
|
+
"operationId": "listBillingAccountInvoices",
|
|
3379
|
+
"summary": "List account e-invoices",
|
|
3380
|
+
"description": "Lists the e-invoices the current account has requested (newest request first, all at once, no paging), and the spending that can be invoiced but has not been yet.\nOnly an account admin can read it: a non-admin member gets 403 (`Only an account admin can read this.`); an account-level credential (no specific user) is treated as the account owner.",
|
|
3381
|
+
"tag": "Account",
|
|
3382
|
+
"method": "get",
|
|
3383
|
+
"path": "/billing_account/invoices",
|
|
3384
|
+
"params": [],
|
|
3385
|
+
"paramNames": [],
|
|
3386
|
+
"successStatus": 200,
|
|
3387
|
+
"scopes": [
|
|
3388
|
+
"users"
|
|
3389
|
+
],
|
|
3390
|
+
"responseSchema": "BillingAccountInvoicesResponse"
|
|
3391
|
+
},
|
|
3392
|
+
"listBillingAccountPaymentHistories": {
|
|
3393
|
+
"operationId": "listBillingAccountPaymentHistories",
|
|
3394
|
+
"summary": "List account payment history",
|
|
3395
|
+
"description": "Lists the current account's top-ups and spending on Jinshuju (account balance transactions such as buying plans, SMS, AI points and attachment storage), newest first.\nThis is what the account itself spent; money received through payment forms is not included.\nOnly an account admin can read it: a non-admin member gets 403 (`Only an account admin can read this.`); an account-level credential (no specific user) is treated as the account owner.\nThere is no paging: `limit` defaults to 50 and is clamped to 1 to 1000; `total_records` is the number of matching records, `returned_records` the number returned this time.\nWith `include_balance=true`, `current_balance` is included (account balance and the remaining quota of each item); when records are returned, `statistics` is included (counting only the returned records).",
|
|
3396
|
+
"tag": "Account",
|
|
3397
|
+
"method": "get",
|
|
3398
|
+
"path": "/billing_account/payment_histories",
|
|
3399
|
+
"params": [
|
|
3400
|
+
{
|
|
3401
|
+
"name": "start_date",
|
|
3402
|
+
"in": "query",
|
|
3403
|
+
"required": false
|
|
3404
|
+
},
|
|
3405
|
+
{
|
|
3406
|
+
"name": "end_date",
|
|
3407
|
+
"in": "query",
|
|
3408
|
+
"required": false
|
|
3409
|
+
},
|
|
3410
|
+
{
|
|
3411
|
+
"name": "verb",
|
|
3412
|
+
"in": "query",
|
|
3413
|
+
"required": false
|
|
3414
|
+
},
|
|
3415
|
+
{
|
|
3416
|
+
"name": "limit",
|
|
3417
|
+
"in": "query",
|
|
3418
|
+
"required": false
|
|
3419
|
+
},
|
|
3420
|
+
{
|
|
3421
|
+
"name": "include_balance",
|
|
3422
|
+
"in": "query",
|
|
3423
|
+
"required": false
|
|
3424
|
+
}
|
|
3425
|
+
],
|
|
3426
|
+
"paramNames": [
|
|
3427
|
+
"start_date",
|
|
3428
|
+
"end_date",
|
|
3429
|
+
"verb",
|
|
3430
|
+
"limit",
|
|
3431
|
+
"include_balance"
|
|
3432
|
+
],
|
|
3433
|
+
"successStatus": 200,
|
|
3434
|
+
"scopes": [
|
|
3435
|
+
"users"
|
|
3436
|
+
],
|
|
3437
|
+
"responseSchema": "BillingAccountPaymentHistoriesResponse"
|
|
3438
|
+
},
|
|
3439
|
+
"getTradeMerchant": {
|
|
3440
|
+
"operationId": "getTradeMerchant",
|
|
3441
|
+
"summary": "Show the 小金商户",
|
|
3442
|
+
"description": "Returns the current account's 小金商户 (the merchant Jinshuju collects payments for) and its onboarding progress: merchant profile, legal entity and contact details, balance, settlement details, payment channel authorization, freeze status, bound payment forms, and the URL for the next step.\n- When the account has no 小金商户 yet, it still returns 200: `merchant_stage` says how far the onboarding application has got, `merchant` / `subject` / `contact` / `balance` / `settlement` / `freeze` are null, and `channels` is an empty array.\n- An account that collects payments through its own WeChat Pay / Alipay merchant (direct connection) has no rate, settlement account, balance or onboarding status on Jinshuju, and none of these is given here.\n- Sensitive fields such as bank card numbers, mobile numbers, emails and ID numbers are masked by the rules of the product's \"Fund account information\" page: 4 characters are kept at each end (mobile numbers keep the first 3 and last 4), and the middle is replaced with `*`.\n- `payment_form_tokens` holds only the payment forms the current identity can access (quick payment forms included); with an account-level credential, it is computed for the account owner.\n- `balance` is null when the balance lookup fails; that does not mean the balance is 0.",
|
|
3443
|
+
"tag": "Trade",
|
|
3444
|
+
"method": "get",
|
|
3445
|
+
"path": "/trade/merchant",
|
|
3446
|
+
"params": [],
|
|
3447
|
+
"paramNames": [],
|
|
3448
|
+
"successStatus": 200,
|
|
3449
|
+
"scopes": [
|
|
3450
|
+
"users"
|
|
3451
|
+
],
|
|
3452
|
+
"responseSchema": "TradeMerchant"
|
|
3453
|
+
},
|
|
3454
|
+
"listTradeTransactions": {
|
|
3455
|
+
"operationId": "listTradeTransactions",
|
|
3456
|
+
"summary": "List payment orders",
|
|
3457
|
+
"description": "Lists the payment orders of the 小金商户 (orders customers place by paying on payment forms), newest order first. Only 小金商户 orders are included: orders collected through a direct connection, simulated-payment orders, and unpaid quick payment records are all left out.\n- The date range filters on order time, in Beijing time (UTC+8); `start_date` / `end_date` are both inclusive and must be passed together. Without them, it defaults to the last 90 days; with `order_no` and no dates, there is no time limit. `queried_range` in the response gives the range actually used (both ends null when there is no time limit).\n- Detail limits: the date range spans at most 90 days, and at most 200 orders match. Past either limit, no details are returned: `transactions` is null, `detail_limit` says why, and `stats` gives the transaction amount, paid count and order count for the range; narrow the range and query again.\n- Paging: `limit` is the page size (default and maximum 50), and `next` is a page number. When there is another page, the response carries `next` (the next page number); pass it back as is. `page_info.total` is the total number of matching orders.\n- Returns 404 when the account has no 小金商户.",
|
|
3458
|
+
"tag": "Trade",
|
|
3459
|
+
"method": "get",
|
|
3460
|
+
"path": "/trade/transactions",
|
|
3461
|
+
"params": [
|
|
3462
|
+
{
|
|
3463
|
+
"name": "start_date",
|
|
3464
|
+
"in": "query",
|
|
3465
|
+
"required": false
|
|
3466
|
+
},
|
|
3467
|
+
{
|
|
3468
|
+
"name": "end_date",
|
|
3469
|
+
"in": "query",
|
|
3470
|
+
"required": false
|
|
3471
|
+
},
|
|
3472
|
+
{
|
|
3473
|
+
"name": "paid_status",
|
|
3474
|
+
"in": "query",
|
|
3475
|
+
"required": false,
|
|
3476
|
+
"array": true
|
|
3477
|
+
},
|
|
3478
|
+
{
|
|
3479
|
+
"name": "payment_channel",
|
|
3480
|
+
"in": "query",
|
|
3481
|
+
"required": false
|
|
3482
|
+
},
|
|
3483
|
+
{
|
|
3484
|
+
"name": "form_token",
|
|
3485
|
+
"in": "query",
|
|
3486
|
+
"required": false
|
|
3487
|
+
},
|
|
3488
|
+
{
|
|
3489
|
+
"name": "order_no",
|
|
3490
|
+
"in": "query",
|
|
3491
|
+
"required": false
|
|
3492
|
+
},
|
|
3493
|
+
{
|
|
3494
|
+
"name": "limit",
|
|
3495
|
+
"in": "query",
|
|
3496
|
+
"required": false
|
|
3497
|
+
},
|
|
3498
|
+
{
|
|
3499
|
+
"name": "next",
|
|
3500
|
+
"in": "query",
|
|
3501
|
+
"required": false
|
|
3502
|
+
}
|
|
3503
|
+
],
|
|
3504
|
+
"paramNames": [
|
|
3505
|
+
"start_date",
|
|
3506
|
+
"end_date",
|
|
3507
|
+
"paid_status",
|
|
3508
|
+
"payment_channel",
|
|
3509
|
+
"form_token",
|
|
3510
|
+
"order_no",
|
|
3511
|
+
"limit",
|
|
3512
|
+
"next"
|
|
3513
|
+
],
|
|
3514
|
+
"successStatus": 200,
|
|
3515
|
+
"scopes": [
|
|
3516
|
+
"users"
|
|
3517
|
+
],
|
|
3518
|
+
"responseSchema": "TradeTransactionListResponse"
|
|
3519
|
+
},
|
|
3520
|
+
"aggregateTradeTransactions": {
|
|
3521
|
+
"operationId": "aggregateTradeTransactions",
|
|
3522
|
+
"summary": "Aggregate payment orders",
|
|
3523
|
+
"description": "Totals the transaction amount, paid count and order count of the 小金商户 payment orders over a date range, optionally grouped by one dimension. Orders are counted as in \"List payment orders\" (only 小金商户 orders; no simulated payments and no unpaid quick payment records); the totals cover the whole range and are not bound by the detail limits.\n- The date range filters on order time, in Beijing time (UTC+8); both ends are inclusive and must be passed together. Without them, it defaults to the last 30 days. The range spans at most 366 days; a longer one returns 400.\n- `transactions_amount` (transaction amount): the amount of paid-type orders minus each order's successful refunds, counted on the day the order was placed; refunded and unpaid orders contribute 0. `transactions_count` (paid count): the number of paid, partially refunded and refunding orders. `orders_count` (order count): the number of all matching orders, unpaid included.\n- `group_by=time` groups by time: by day for a range under 90 days, by week from 90 days, by month from 365 days; `granularity` gives the granularity, and periods without orders are filled with zero. `paid_status` / `payment_channel` make one group per value; the group whose `payment_channel` is null holds orders that have not started payment. Under the same filters, the groups add up to the total.\n- Returns 404 when the account has no 小金商户.",
|
|
3524
|
+
"tag": "Trade",
|
|
3525
|
+
"method": "get",
|
|
3526
|
+
"path": "/trade/transactions/aggregate",
|
|
3527
|
+
"params": [
|
|
3528
|
+
{
|
|
3529
|
+
"name": "start_date",
|
|
3530
|
+
"in": "query",
|
|
3531
|
+
"required": false
|
|
3532
|
+
},
|
|
3533
|
+
{
|
|
3534
|
+
"name": "end_date",
|
|
3535
|
+
"in": "query",
|
|
3536
|
+
"required": false
|
|
3537
|
+
},
|
|
3538
|
+
{
|
|
3539
|
+
"name": "group_by",
|
|
3540
|
+
"in": "query",
|
|
3541
|
+
"required": false
|
|
3542
|
+
},
|
|
3543
|
+
{
|
|
3544
|
+
"name": "paid_status",
|
|
3545
|
+
"in": "query",
|
|
3546
|
+
"required": false,
|
|
3547
|
+
"array": true
|
|
3548
|
+
},
|
|
3549
|
+
{
|
|
3550
|
+
"name": "payment_channel",
|
|
3551
|
+
"in": "query",
|
|
3552
|
+
"required": false
|
|
3553
|
+
},
|
|
3554
|
+
{
|
|
3555
|
+
"name": "form_token",
|
|
3556
|
+
"in": "query",
|
|
3557
|
+
"required": false
|
|
3558
|
+
}
|
|
3559
|
+
],
|
|
3560
|
+
"paramNames": [
|
|
3561
|
+
"start_date",
|
|
3562
|
+
"end_date",
|
|
3563
|
+
"group_by",
|
|
3564
|
+
"paid_status",
|
|
3565
|
+
"payment_channel",
|
|
3566
|
+
"form_token"
|
|
3567
|
+
],
|
|
3568
|
+
"successStatus": 200,
|
|
3569
|
+
"scopes": [
|
|
3570
|
+
"users"
|
|
3571
|
+
],
|
|
3572
|
+
"responseSchema": "TradeTransactionAggregateResponse"
|
|
3573
|
+
},
|
|
3574
|
+
"listTradeRefunds": {
|
|
3575
|
+
"operationId": "listTradeRefunds",
|
|
3576
|
+
"summary": "List refunds",
|
|
3577
|
+
"description": "Lists the refunds the 小金商户 issued to customers, with statistics. Refunds are filtered and sorted newest first by the time they were issued, not by the order time or the time the refund arrived. Only a 小金商户 has refund records; an account collecting payments through a direct connection has no data here.\n- The date range is in Beijing time (UTC+8); both ends are inclusive and must be passed together. Without them, it defaults to the last 90 days; with `refund_no` and no dates, there is no time limit. `queried_range` gives the range actually used.\n- `include` decides what is returned: `both` (default) returns `stats` and `refunds` together, `stats` returns the statistics alone, `records` returns the records alone.\n- The detail limits are those of \"List payment orders\" (at most 90 days, 200 records): past them, `refunds` is null, `detail_limit` says why, and `stats` is returned as usual.\n- `stats`: the count and amount of all matching refunds, the count and amount per status, the number of distinct orders with a successful refund, and the trend by refund issue date (only when there is a date range; by day under 90 days, by week from 90 days, by month from 365 days, periods without refunds filled with zero). In the trend, order counts are deduplicated within each period, so the sum over periods can exceed the total order count.\n- Paging works as in \"List payment orders\"; with `include=stats`, `next` is not returned.\n- Returns 404 when the account has no 小金商户.",
|
|
3578
|
+
"tag": "Trade",
|
|
3579
|
+
"method": "get",
|
|
3580
|
+
"path": "/trade/refunds",
|
|
3581
|
+
"params": [
|
|
3582
|
+
{
|
|
3583
|
+
"name": "start_date",
|
|
3584
|
+
"in": "query",
|
|
3585
|
+
"required": false
|
|
3586
|
+
},
|
|
3587
|
+
{
|
|
3588
|
+
"name": "end_date",
|
|
3589
|
+
"in": "query",
|
|
3590
|
+
"required": false
|
|
3591
|
+
},
|
|
3592
|
+
{
|
|
3593
|
+
"name": "status",
|
|
3594
|
+
"in": "query",
|
|
3595
|
+
"required": false
|
|
3596
|
+
},
|
|
3597
|
+
{
|
|
3598
|
+
"name": "refund_no",
|
|
3599
|
+
"in": "query",
|
|
3600
|
+
"required": false
|
|
3601
|
+
},
|
|
3602
|
+
{
|
|
3603
|
+
"name": "include",
|
|
3604
|
+
"in": "query",
|
|
3605
|
+
"required": false
|
|
3606
|
+
},
|
|
3607
|
+
{
|
|
3608
|
+
"name": "limit",
|
|
3609
|
+
"in": "query",
|
|
3610
|
+
"required": false
|
|
3611
|
+
},
|
|
3612
|
+
{
|
|
3613
|
+
"name": "next",
|
|
3614
|
+
"in": "query",
|
|
3615
|
+
"required": false
|
|
3616
|
+
}
|
|
3617
|
+
],
|
|
3618
|
+
"paramNames": [
|
|
3619
|
+
"start_date",
|
|
3620
|
+
"end_date",
|
|
3621
|
+
"status",
|
|
3622
|
+
"refund_no",
|
|
3623
|
+
"include",
|
|
3624
|
+
"limit",
|
|
3625
|
+
"next"
|
|
3626
|
+
],
|
|
3627
|
+
"successStatus": 200,
|
|
3628
|
+
"scopes": [
|
|
3629
|
+
"users"
|
|
3630
|
+
],
|
|
3631
|
+
"responseSchema": "TradeRefundListResponse"
|
|
3632
|
+
},
|
|
3633
|
+
"listTradePayouts": {
|
|
3634
|
+
"operationId": "listTradePayouts",
|
|
3635
|
+
"summary": "List payouts",
|
|
3636
|
+
"description": "Lists the payouts the 小金商户 made from its Jinshuju balance to its own bank account, with statistics. Payouts are filtered and sorted newest first by request time; each record carries the settlement date range the payout covers, but it cannot be filtered on. Only a 小金商户 has payout records; an account collecting payments through a direct connection has no data here.\n- The date range is in Beijing time (UTC+8); both ends are inclusive and must be passed together. Without them, it defaults to the last 90 days. `queried_range` gives the range actually used.\n- `include` decides what is returned: `both` (default) returns `stats` and `payouts` together, `stats` returns the statistics alone, `records` returns the records alone.\n- The detail limits are those of \"List payment orders\" (at most 90 days, 200 records): past them, `payouts` is null, `detail_limit` says why, and `stats` is returned as usual.\n- `stats`: the count and amount of all matching payouts, and the count and amount per status.\n- Paging works as in \"List payment orders\"; with `include=stats`, `next` is not returned.\n- For the balance awaiting payout and the settlement cycle, see \"Show the 小金商户\". Returns 404 when the account has no 小金商户.",
|
|
3637
|
+
"tag": "Trade",
|
|
3638
|
+
"method": "get",
|
|
3639
|
+
"path": "/trade/payouts",
|
|
3640
|
+
"params": [
|
|
3641
|
+
{
|
|
3642
|
+
"name": "start_date",
|
|
3643
|
+
"in": "query",
|
|
3644
|
+
"required": false
|
|
3645
|
+
},
|
|
3646
|
+
{
|
|
3647
|
+
"name": "end_date",
|
|
3648
|
+
"in": "query",
|
|
3649
|
+
"required": false
|
|
3650
|
+
},
|
|
3651
|
+
{
|
|
3652
|
+
"name": "status",
|
|
3653
|
+
"in": "query",
|
|
3654
|
+
"required": false
|
|
3655
|
+
},
|
|
3656
|
+
{
|
|
3657
|
+
"name": "include",
|
|
3658
|
+
"in": "query",
|
|
3659
|
+
"required": false
|
|
3660
|
+
},
|
|
3661
|
+
{
|
|
3662
|
+
"name": "limit",
|
|
3663
|
+
"in": "query",
|
|
3664
|
+
"required": false
|
|
3665
|
+
},
|
|
3666
|
+
{
|
|
3667
|
+
"name": "next",
|
|
3668
|
+
"in": "query",
|
|
3669
|
+
"required": false
|
|
3670
|
+
}
|
|
3671
|
+
],
|
|
3672
|
+
"paramNames": [
|
|
3673
|
+
"start_date",
|
|
3674
|
+
"end_date",
|
|
3675
|
+
"status",
|
|
3676
|
+
"include",
|
|
3677
|
+
"limit",
|
|
3678
|
+
"next"
|
|
3679
|
+
],
|
|
3680
|
+
"successStatus": 200,
|
|
3681
|
+
"scopes": [
|
|
3682
|
+
"users"
|
|
3683
|
+
],
|
|
3684
|
+
"responseSchema": "TradePayoutListResponse"
|
|
3685
|
+
},
|
|
3686
|
+
"listSmsAuditStatuses": {
|
|
3687
|
+
"operationId": "listSmsAuditStatuses",
|
|
3688
|
+
"summary": "Show SMS signature review status",
|
|
3689
|
+
"description": "Lists the SMS signatures the current user applied for and the SMS templates under each signature, with review status and the reason a review failed, newest signature first.\nReturns only the current user's own signatures, not those of other members of the account; with an account-level credential, returns the account owner's signatures. Any member can call it; admin is not required.",
|
|
3690
|
+
"tag": "Account",
|
|
3691
|
+
"method": "get",
|
|
3692
|
+
"path": "/sms/audit_statuses",
|
|
3693
|
+
"params": [],
|
|
3694
|
+
"paramNames": [],
|
|
3695
|
+
"successStatus": 200,
|
|
3696
|
+
"scopes": [
|
|
3697
|
+
"users"
|
|
3698
|
+
],
|
|
3699
|
+
"responseSchema": "SMSAuditStatusResponse"
|
|
3700
|
+
},
|
|
3701
|
+
"verifyRedirectParams": {
|
|
3702
|
+
"operationId": "verifyRedirectParams",
|
|
3703
|
+
"summary": "Verify redirect parameters",
|
|
3704
|
+
"description": "Lets the receiver of a \"redirect to an external URL after submission\" verify that the redirect parameters have not been tampered with. This endpoint needs no API credentials.\nWhen a form has redirect after submission turned on and \"Fields to carry on redirect\" configured, Jinshuju appends the values of the selected fields to the redirect URL, plus the signature parameter `jamr_h` (signed over the form token, the entry token and a 10-minute validity period). The receiver forwards the received `jamr_h` and all field parameters to this endpoint unchanged: the server verifies the signature, finds the form and entry, and compares the current value of each configured field with the passed parameter value (array values must be equal as a whole; other values are compared as strings).\nReturns 200 `{ status: \"SUCCESS\", message: \"验证成功\" }` when all match; 400 `{ status: \"FAIL\", message: \"无效Token或者过期\" }` when the `jamr_h` signature is invalid or expired; 400 `{ status: \"FAIL\", message: \"验证失败\" }` when the form / entry does not exist, a field value does not match, or a field parameter is missing. The message text follows the request language.",
|
|
3705
|
+
"tag": "Utilities",
|
|
3706
|
+
"method": "get",
|
|
3707
|
+
"path": "/jamr_v",
|
|
3708
|
+
"params": [
|
|
3709
|
+
{
|
|
3710
|
+
"name": "jamr_h",
|
|
3711
|
+
"in": "query",
|
|
3712
|
+
"required": true
|
|
3713
|
+
},
|
|
3714
|
+
{
|
|
3715
|
+
"name": "serial_number",
|
|
3716
|
+
"in": "query",
|
|
3717
|
+
"required": false
|
|
3718
|
+
}
|
|
3719
|
+
],
|
|
3720
|
+
"paramNames": [
|
|
3721
|
+
"jamr_h",
|
|
3722
|
+
"serial_number"
|
|
3723
|
+
],
|
|
3724
|
+
"successStatus": 200,
|
|
3725
|
+
"scopes": []
|
|
3726
|
+
},
|
|
3727
|
+
"listFieldTypes": {
|
|
3728
|
+
"operationId": "listFieldTypes",
|
|
3729
|
+
"summary": "List field types",
|
|
3730
|
+
"description": "Returns every field type available when creating / editing a form (or table), with the validation switches and type-specific settings each type accepts, for building `type` and the type-specific parameters in `fields`.\nKept in line with the types and parameters the create endpoints actually accept.",
|
|
3731
|
+
"tag": "Forms",
|
|
3732
|
+
"method": "get",
|
|
3733
|
+
"path": "/field_types",
|
|
3734
|
+
"params": [
|
|
3735
|
+
{
|
|
3736
|
+
"name": "kind",
|
|
3737
|
+
"in": "query",
|
|
3738
|
+
"required": false
|
|
3739
|
+
}
|
|
3740
|
+
],
|
|
3741
|
+
"paramNames": [
|
|
3742
|
+
"kind"
|
|
3743
|
+
],
|
|
3744
|
+
"successStatus": 200,
|
|
3745
|
+
"scopes": [
|
|
3746
|
+
"forms"
|
|
3747
|
+
],
|
|
3748
|
+
"responseSchema": "FieldTypeListResponse"
|
|
3749
|
+
},
|
|
3750
|
+
"getFieldType": {
|
|
3751
|
+
"operationId": "getFieldType",
|
|
3752
|
+
"summary": "Show a field type",
|
|
3753
|
+
"description": "Returns the validation switches and type-specific settings one field type accepts, shaped like one item of the `GET /field_types` list.\nReturns 404, listing the available types in `error_description`, when the type name does not exist or is not among the types available for `kind` (e.g. querying a type tables do not support with `kind=table`).",
|
|
3754
|
+
"tag": "Forms",
|
|
3755
|
+
"method": "get",
|
|
3756
|
+
"path": "/field_types/{type}",
|
|
3757
|
+
"params": [
|
|
3758
|
+
{
|
|
3759
|
+
"name": "type",
|
|
3760
|
+
"in": "path",
|
|
3761
|
+
"required": true
|
|
3762
|
+
},
|
|
3763
|
+
{
|
|
3764
|
+
"name": "kind",
|
|
3765
|
+
"in": "query",
|
|
3766
|
+
"required": false
|
|
3767
|
+
}
|
|
3768
|
+
],
|
|
3769
|
+
"paramNames": [
|
|
3770
|
+
"type",
|
|
3771
|
+
"kind"
|
|
3772
|
+
],
|
|
3773
|
+
"successStatus": 200,
|
|
3774
|
+
"scopes": [
|
|
3775
|
+
"forms"
|
|
3776
|
+
],
|
|
3777
|
+
"responseSchema": "FieldTypeDescription"
|
|
3778
|
+
},
|
|
3779
|
+
"countEntriesAcrossForms": {
|
|
3780
|
+
"operationId": "countEntriesAcrossForms",
|
|
3781
|
+
"summary": "Count entries across several forms",
|
|
3782
|
+
"description": "Counts, in one call, the entries matching the filters in each of up to 10 forms / tables, plus their total.\n- A token that cannot be accessed (does not exist, or does not belong to the caller) does not fail the whole request; its row returns `unavailable` with the reason instead. The total adds up only the rows that could be counted.\n- Field api_codes mean different things in each form, so `filters` can use only the three form-independent conditions `created_at` / `updated_at` / `creator_id`; any other field returns 400.\n- `keyword` is not supported (passing it returns 400); to search several forms by keyword, use `GET /entries/search`.",
|
|
3783
|
+
"tag": "Entries",
|
|
3784
|
+
"method": "get",
|
|
3785
|
+
"path": "/entries/count",
|
|
3786
|
+
"params": [
|
|
3787
|
+
{
|
|
3788
|
+
"name": "form_tokens",
|
|
3789
|
+
"in": "query",
|
|
3790
|
+
"required": false
|
|
3791
|
+
},
|
|
3792
|
+
{
|
|
3793
|
+
"name": "filters",
|
|
3794
|
+
"in": "query",
|
|
3795
|
+
"required": false,
|
|
3796
|
+
"json": true
|
|
3797
|
+
}
|
|
3798
|
+
],
|
|
3799
|
+
"paramNames": [
|
|
3800
|
+
"form_tokens",
|
|
3801
|
+
"filters"
|
|
3802
|
+
],
|
|
3803
|
+
"successStatus": 200,
|
|
3804
|
+
"scopes": [
|
|
3805
|
+
"read_entries"
|
|
3806
|
+
],
|
|
3807
|
+
"responseSchema": "EntryCountBatchResponse"
|
|
3808
|
+
},
|
|
3809
|
+
"searchEntriesAcrossForms": {
|
|
3810
|
+
"operationId": "searchEntriesAcrossForms",
|
|
3811
|
+
"summary": "Search entries across forms",
|
|
3812
|
+
"description": "Runs one keyword as a full-text search across several forms / tables and returns, per form, the match count and some of the matching serial numbers (at most 50 per form), without entry content.\n- Search scope: the forms in `form_tokens` when given; otherwise every form and table the caller can access (for an account access token, every form and table in the account).\n Either way, `filters` then narrows the scope; unless `filters` specifies `entries_count`, only forms with entries are searched by default (`entries_count > 0`).\n- The scope holds at most 10 forms; beyond that it returns 400: narrow it with `filters`, or pass `form_tokens` directly.\n- Forms with no match are left out of the result; forms that cannot be accessed, where the caller's role does not allow reading entries, whose search timed out or whose search service did not respond are listed with `unavailable` giving the reason (this does not mean there was no match).",
|
|
3813
|
+
"tag": "Entries",
|
|
3814
|
+
"method": "get",
|
|
3815
|
+
"path": "/entries/search",
|
|
3816
|
+
"params": [
|
|
3817
|
+
{
|
|
3818
|
+
"name": "keyword",
|
|
3819
|
+
"in": "query",
|
|
3820
|
+
"required": true
|
|
3821
|
+
},
|
|
3822
|
+
{
|
|
3823
|
+
"name": "form_tokens",
|
|
3824
|
+
"in": "query",
|
|
3825
|
+
"required": false
|
|
3826
|
+
},
|
|
3827
|
+
{
|
|
3828
|
+
"name": "filters",
|
|
3829
|
+
"in": "query",
|
|
3830
|
+
"required": false,
|
|
3831
|
+
"json": true
|
|
3832
|
+
}
|
|
3833
|
+
],
|
|
3834
|
+
"paramNames": [
|
|
3835
|
+
"keyword",
|
|
3836
|
+
"form_tokens",
|
|
3837
|
+
"filters"
|
|
3838
|
+
],
|
|
3839
|
+
"successStatus": 200,
|
|
3840
|
+
"scopes": [
|
|
3841
|
+
"read_entries"
|
|
3842
|
+
],
|
|
3843
|
+
"responseSchema": "EntrySearchResponse"
|
|
3844
|
+
},
|
|
3845
|
+
"getEntryStats": {
|
|
3846
|
+
"operationId": "getEntryStats",
|
|
3847
|
+
"summary": "Count submissions per form over a date range",
|
|
3848
|
+
"description": "Counts the submissions received within a date range by every form / table the caller can access (for an account access token, every form and table in the account): returns the total, and a list of the forms that received submissions, most submissions first.\n- Dates are in Beijing time (UTC+8); `from` / `to` are both inclusive.\n- It counts submissions as they happened: imported entries count on the day of the import, and deleted entries are not subtracted, so the result may differ from a count by entry `created_at`.\n- The list has at most `limit` rows; when there are more, `truncated` is true, and `total` and `forms_with_data` still cover every form.\n- With `by` (`day` / `week` / `month`), the response also carries `buckets`: one count of the same shape for each period in the range (periods with no submissions included); weeks start on Monday, and the first and last periods are clipped to the range. The range covers at most 92 days / 53 weeks / 24 months; beyond that it returns 400, suggesting a coarser granularity or dropping `by`.",
|
|
3849
|
+
"tag": "Entries",
|
|
3850
|
+
"method": "get",
|
|
3851
|
+
"path": "/entries/stats",
|
|
3852
|
+
"params": [
|
|
3853
|
+
{
|
|
3854
|
+
"name": "from",
|
|
3855
|
+
"in": "query",
|
|
3856
|
+
"required": true
|
|
3857
|
+
},
|
|
3858
|
+
{
|
|
3859
|
+
"name": "to",
|
|
3860
|
+
"in": "query",
|
|
3861
|
+
"required": false
|
|
3862
|
+
},
|
|
3863
|
+
{
|
|
3864
|
+
"name": "kind",
|
|
3865
|
+
"in": "query",
|
|
3866
|
+
"required": false
|
|
3867
|
+
},
|
|
3868
|
+
{
|
|
3869
|
+
"name": "by",
|
|
3870
|
+
"in": "query",
|
|
3871
|
+
"required": false
|
|
3872
|
+
},
|
|
3873
|
+
{
|
|
3874
|
+
"name": "limit",
|
|
3875
|
+
"in": "query",
|
|
3876
|
+
"required": false
|
|
3877
|
+
}
|
|
3878
|
+
],
|
|
3879
|
+
"paramNames": [
|
|
3880
|
+
"from",
|
|
3881
|
+
"to",
|
|
3882
|
+
"kind",
|
|
3883
|
+
"by",
|
|
3884
|
+
"limit"
|
|
3885
|
+
],
|
|
3886
|
+
"successStatus": 200,
|
|
3887
|
+
"scopes": [
|
|
3888
|
+
"read_entries"
|
|
3889
|
+
],
|
|
3890
|
+
"responseSchema": "EntryStatsResponse"
|
|
3891
|
+
},
|
|
3892
|
+
"listMyFilledForms": {
|
|
3893
|
+
"operationId": "listMyFilledForms",
|
|
3894
|
+
"summary": "List the forms I have submitted to",
|
|
3895
|
+
"description": "Returns the forms the current user has submitted entries to as a submitter (quick payment forms excluded), most recent submission first. These forms need not be created by or shared with the current user;\neach row gives the current user's own submission count and latest submission time, not the form's total entry count. Deleted forms do not appear in `data` (`total` still counts them).\n- Pagination: `next` is a row offset, passed back as is for the next page; `skip` and `next` cannot be combined. 50 rows per page by default, adjustable with `limit` (at most 1000).\n- An account access token has no \"current user\"; calling with one returns 400.",
|
|
3896
|
+
"tag": "Forms",
|
|
3897
|
+
"method": "get",
|
|
3898
|
+
"path": "/my/forms",
|
|
3899
|
+
"params": [
|
|
3900
|
+
{
|
|
3901
|
+
"name": "limit",
|
|
3902
|
+
"in": "query",
|
|
3903
|
+
"required": false
|
|
3904
|
+
},
|
|
3905
|
+
{
|
|
3906
|
+
"name": "next",
|
|
3907
|
+
"in": "query",
|
|
3908
|
+
"required": false
|
|
3909
|
+
},
|
|
3910
|
+
{
|
|
3911
|
+
"name": "skip",
|
|
3912
|
+
"in": "query",
|
|
3913
|
+
"required": false
|
|
3914
|
+
}
|
|
3915
|
+
],
|
|
3916
|
+
"paramNames": [
|
|
3917
|
+
"limit",
|
|
3918
|
+
"next",
|
|
3919
|
+
"skip"
|
|
3920
|
+
],
|
|
3921
|
+
"successStatus": 200,
|
|
3922
|
+
"scopes": [
|
|
3923
|
+
"forms"
|
|
3924
|
+
],
|
|
3925
|
+
"responseSchema": "MyFilledFormListResponse"
|
|
3926
|
+
},
|
|
3927
|
+
"listMySubmittedEntries": {
|
|
3928
|
+
"operationId": "listMySubmittedEntries",
|
|
3929
|
+
"summary": "List my entries in a form",
|
|
3930
|
+
"description": "Returns the entries the current user submitted to the given form, newest first. The form need not be created by or shared with the current user: only the user's own entries are returned,\nwith only the fields the form makes public to submitters (hidden fields are neither returned nor usable for filtering or searching). Returns an empty list when the user has not submitted.\n- `fields` keeps only the given public fields; unknown or non-public api_codes are skipped (no error).\n- `filters` works as in the entry list, but cannot filter by `creator_id` (results are already limited to the user's own) or on non-public fields; doing so returns 400.\n- `keyword` searches only the user's own entries and is not subject to the form's entry-count limit.\n- Pagination: `next` is a row offset; `skip` and `next` cannot be combined. 50 rows per page by default, adjustable with `limit` (at most 1000).\n- An account access token has no \"current user\"; calling with one returns 400. Returns 404 when the form does not exist.",
|
|
3931
|
+
"tag": "Entries",
|
|
3932
|
+
"method": "get",
|
|
3933
|
+
"path": "/my/forms/{form_token}/entries",
|
|
3934
|
+
"params": [
|
|
3935
|
+
{
|
|
3936
|
+
"name": "form_token",
|
|
3937
|
+
"in": "path",
|
|
3938
|
+
"required": true
|
|
3939
|
+
},
|
|
3940
|
+
{
|
|
3941
|
+
"name": "fields",
|
|
3942
|
+
"in": "query",
|
|
3943
|
+
"required": false
|
|
3944
|
+
},
|
|
3945
|
+
{
|
|
3946
|
+
"name": "filters",
|
|
3947
|
+
"in": "query",
|
|
3948
|
+
"required": false,
|
|
3949
|
+
"json": true
|
|
3950
|
+
},
|
|
3951
|
+
{
|
|
3952
|
+
"name": "keyword",
|
|
3953
|
+
"in": "query",
|
|
3954
|
+
"required": false
|
|
3955
|
+
},
|
|
3956
|
+
{
|
|
3957
|
+
"name": "include_labels",
|
|
3958
|
+
"in": "query",
|
|
3959
|
+
"required": false
|
|
3960
|
+
},
|
|
3961
|
+
{
|
|
3962
|
+
"name": "limit",
|
|
3963
|
+
"in": "query",
|
|
3964
|
+
"required": false
|
|
3965
|
+
},
|
|
3966
|
+
{
|
|
3967
|
+
"name": "next",
|
|
3968
|
+
"in": "query",
|
|
3969
|
+
"required": false
|
|
3970
|
+
},
|
|
3971
|
+
{
|
|
3972
|
+
"name": "skip",
|
|
3973
|
+
"in": "query",
|
|
3974
|
+
"required": false
|
|
3975
|
+
}
|
|
3976
|
+
],
|
|
3977
|
+
"paramNames": [
|
|
3978
|
+
"form_token",
|
|
3979
|
+
"fields",
|
|
3980
|
+
"filters",
|
|
3981
|
+
"keyword",
|
|
3982
|
+
"include_labels",
|
|
3983
|
+
"limit",
|
|
3984
|
+
"next",
|
|
3985
|
+
"skip"
|
|
3986
|
+
],
|
|
3987
|
+
"successStatus": 200,
|
|
3988
|
+
"scopes": [
|
|
3989
|
+
"read_entries"
|
|
3990
|
+
],
|
|
3991
|
+
"responseSchema": "MySubmittedEntryListResponse"
|
|
3992
|
+
},
|
|
3993
|
+
"searchMySubmittedEntries": {
|
|
3994
|
+
"operationId": "searchMySubmittedEntries",
|
|
3995
|
+
"summary": "Search my entries",
|
|
3996
|
+
"description": "Searches the current user's own entries across forms with one keyword (only fields the form makes public to submitters are searched), and returns the match count and serial numbers for each matching form.\n- `keyword` is required; returns 400 when empty.\n- By default, searches every form the current user has submitted to (quick payment forms excluded); `form_tokens` limits it to some of them, and tokens not in the user's submission history are ignored.\n Returns 400 when more than 20 forms are in the search; narrow them with `form_tokens`.\n- Forms with no match are left out of the result; when a form cannot be searched (e.g. the keyword is too long), that form returns `unavailable` with an explanation and the other forms return as usual.\n- At most 50 serial numbers are returned per form; `matched` is the form's actual total match count.\n- An account access token has no \"current user\"; calling with one returns 400.",
|
|
3997
|
+
"tag": "Entries",
|
|
3998
|
+
"method": "get",
|
|
3999
|
+
"path": "/my/search",
|
|
4000
|
+
"params": [
|
|
4001
|
+
{
|
|
4002
|
+
"name": "keyword",
|
|
4003
|
+
"in": "query",
|
|
4004
|
+
"required": true
|
|
4005
|
+
},
|
|
4006
|
+
{
|
|
4007
|
+
"name": "form_tokens",
|
|
4008
|
+
"in": "query",
|
|
4009
|
+
"required": false
|
|
4010
|
+
}
|
|
4011
|
+
],
|
|
4012
|
+
"paramNames": [
|
|
4013
|
+
"keyword",
|
|
4014
|
+
"form_tokens"
|
|
4015
|
+
],
|
|
4016
|
+
"successStatus": 200,
|
|
4017
|
+
"scopes": [
|
|
4018
|
+
"read_entries"
|
|
4019
|
+
],
|
|
4020
|
+
"responseSchema": "MySearchResponse"
|
|
4021
|
+
},
|
|
4022
|
+
"getFillFormPage": {
|
|
4023
|
+
"operationId": "getFillFormPage",
|
|
4024
|
+
"summary": "Show a form's fill page",
|
|
4025
|
+
"description": "Reads the fill page behind a fill link (`/f/<token>`): its title, description, the fields to fill in, and whether the current user can submit right now.\nThe caller reads it as a submitter holding the link and needs no permission on the form or table; only what the fill page shows is returned.\n- `fields` lists the public fields in fill-page order, shaped like `fields` when reading a form; for a form view, column names, descriptions and required flags already follow the view's settings.\n- Submission is possible only when `status.key` is `open`; other values (such as `not_opened`, `closed`, `password_required`, `unauthorized`, `submission_prevented`,\n `fill_frequency_limited`: the current user has used up the submissions the fill page allows) are explained in `status.message`; when the page is not yet open or has closed on schedule, `status.open_info` gives the open period.\n- `blockers` lists requirements only the submitter can complete on the page (captcha, SMS verification, WeChat identity, payment, etc.); when it is not empty, submission is refused and the form must be filled in a browser.\n- `manageable` is returned only when the current user can already read the underlying form or table, and gives its token and name.\n- An account access token has no \"current user\"; calling with one returns 400.",
|
|
4026
|
+
"tag": "Fill",
|
|
4027
|
+
"method": "get",
|
|
4028
|
+
"path": "/fill/f/{form_token}",
|
|
4029
|
+
"params": [
|
|
4030
|
+
{
|
|
4031
|
+
"name": "form_token",
|
|
4032
|
+
"in": "path",
|
|
4033
|
+
"required": true
|
|
4034
|
+
}
|
|
4035
|
+
],
|
|
4036
|
+
"paramNames": [
|
|
4037
|
+
"form_token"
|
|
4038
|
+
],
|
|
4039
|
+
"successStatus": 200,
|
|
4040
|
+
"scopes": [
|
|
4041
|
+
"submit_entries"
|
|
4042
|
+
],
|
|
4043
|
+
"responseSchema": "FillPage"
|
|
4044
|
+
},
|
|
4045
|
+
"createFillFormEntry": {
|
|
4046
|
+
"operationId": "createFillFormEntry",
|
|
4047
|
+
"summary": "Submit an entry through a form's fill page",
|
|
4048
|
+
"description": "Submits one entry through the fill page as the current user, the same as clicking \"Submit\" on the page: only fields visible on the fill page are accepted, required fields are checked as the fill page sets them,\nthe submitter is recorded as the current user (the entry shows up in \"My submissions\"), and an entry submitted through a form view records which view it came from.\n- Returns 403 when the fill page is not open, with the reason in `status`; returns 422 listing the reasons when `blockers` is not empty.\n- Returns 422 when a field value is invalid, with `errors` explaining each by field api_code.\n- Each user can submit at most 30 times per hour; beyond that returns 429.\n- An account access token has no \"current user\"; calling with one returns 400.",
|
|
4049
|
+
"tag": "Fill",
|
|
4050
|
+
"method": "post",
|
|
4051
|
+
"path": "/fill/f/{form_token}/entries",
|
|
4052
|
+
"params": [
|
|
4053
|
+
{
|
|
4054
|
+
"name": "form_token",
|
|
4055
|
+
"in": "path",
|
|
4056
|
+
"required": true
|
|
4057
|
+
}
|
|
4058
|
+
],
|
|
4059
|
+
"paramNames": [
|
|
4060
|
+
"form_token"
|
|
4061
|
+
],
|
|
4062
|
+
"body": {
|
|
4063
|
+
"contentType": "application/json",
|
|
4064
|
+
"required": true,
|
|
4065
|
+
"flatten": true
|
|
4066
|
+
},
|
|
4067
|
+
"successStatus": 201,
|
|
4068
|
+
"scopes": [
|
|
4069
|
+
"submit_entries"
|
|
4070
|
+
],
|
|
4071
|
+
"responseSchema": "FillEntryCreated"
|
|
4072
|
+
},
|
|
4073
|
+
"getFillViewPage": {
|
|
4074
|
+
"operationId": "getFillViewPage",
|
|
4075
|
+
"summary": "Show a form view's fill page",
|
|
4076
|
+
"description": "Reads the fill page behind a fill link (`/v/<token>`): its title, description, the fields to fill in, and whether the current user can submit right now.\nThe caller reads it as a submitter holding the link and needs no permission on the form or table; only what the fill page shows is returned.\n- `fields` lists the public fields in fill-page order, shaped like `fields` when reading a form; for a form view, column names, descriptions and required flags already follow the view's settings.\n- Submission is possible only when `status.key` is `open`; other values (such as `not_opened`, `closed`, `password_required`, `unauthorized`, `submission_prevented`,\n `fill_frequency_limited`: the current user has used up the submissions the fill page allows) are explained in `status.message`; when the page is not yet open or has closed on schedule, `status.open_info` gives the open period.\n- `blockers` lists requirements only the submitter can complete on the page (captcha, SMS verification, WeChat identity, payment, etc.); when it is not empty, submission is refused and the form must be filled in a browser.\n- `manageable` is returned only when the current user can already read the underlying form or table, and gives its token and name.\n- An account access token has no \"current user\"; calling with one returns 400.",
|
|
4077
|
+
"tag": "Fill",
|
|
4078
|
+
"method": "get",
|
|
4079
|
+
"path": "/fill/v/{view_token}",
|
|
4080
|
+
"params": [
|
|
4081
|
+
{
|
|
4082
|
+
"name": "view_token",
|
|
4083
|
+
"in": "path",
|
|
4084
|
+
"required": true
|
|
4085
|
+
}
|
|
4086
|
+
],
|
|
4087
|
+
"paramNames": [
|
|
4088
|
+
"view_token"
|
|
4089
|
+
],
|
|
4090
|
+
"successStatus": 200,
|
|
4091
|
+
"scopes": [
|
|
4092
|
+
"submit_entries"
|
|
4093
|
+
],
|
|
4094
|
+
"responseSchema": "FillPage"
|
|
4095
|
+
},
|
|
4096
|
+
"createFillViewEntry": {
|
|
4097
|
+
"operationId": "createFillViewEntry",
|
|
4098
|
+
"summary": "Submit an entry through a form view's fill page",
|
|
4099
|
+
"description": "Submits one entry through the fill page as the current user, the same as clicking \"Submit\" on the page: only fields visible on the fill page are accepted, required fields are checked as the fill page sets them,\nthe submitter is recorded as the current user (the entry shows up in \"My submissions\"), and an entry submitted through a form view records which view it came from.\n- Returns 403 when the fill page is not open, with the reason in `status`; returns 422 listing the reasons when `blockers` is not empty.\n- Returns 422 when a field value is invalid, with `errors` explaining each by field api_code.\n- Each user can submit at most 30 times per hour; beyond that returns 429.\n- An account access token has no \"current user\"; calling with one returns 400.",
|
|
4100
|
+
"tag": "Fill",
|
|
4101
|
+
"method": "post",
|
|
4102
|
+
"path": "/fill/v/{view_token}/entries",
|
|
4103
|
+
"params": [
|
|
4104
|
+
{
|
|
4105
|
+
"name": "view_token",
|
|
4106
|
+
"in": "path",
|
|
4107
|
+
"required": true
|
|
4108
|
+
}
|
|
4109
|
+
],
|
|
4110
|
+
"paramNames": [
|
|
4111
|
+
"view_token"
|
|
4112
|
+
],
|
|
4113
|
+
"body": {
|
|
4114
|
+
"contentType": "application/json",
|
|
4115
|
+
"required": true,
|
|
4116
|
+
"flatten": true
|
|
4117
|
+
},
|
|
4118
|
+
"successStatus": 201,
|
|
4119
|
+
"scopes": [
|
|
4120
|
+
"submit_entries"
|
|
4121
|
+
],
|
|
4122
|
+
"responseSchema": "FillEntryCreated"
|
|
4123
|
+
},
|
|
4124
|
+
"moveTableToFolder": {
|
|
4125
|
+
"operationId": "moveTableToFolder",
|
|
4126
|
+
"summary": "Move a table into a folder",
|
|
4127
|
+
"description": "Moves a table into a folder, or out of its folder (`folder_token` set to null); PUT is also accepted. The move affects only the calling user's folder placement.\n- The request body must include the `folder_token` key (its value may be null); otherwise 400.\n- `folder_token` accepts only a folder token (not an id); returns 404 when the folder does not exist or the current user lacks manage permission on it.\n- The target folder's kind must be table; otherwise 400.\n- Returns 404 `table cannot be found` when the token is not a table's.",
|
|
4128
|
+
"tag": "Tables",
|
|
4129
|
+
"method": "patch",
|
|
4130
|
+
"path": "/tables/{table_token}/folder",
|
|
4131
|
+
"params": [
|
|
4132
|
+
{
|
|
4133
|
+
"name": "table_token",
|
|
4134
|
+
"in": "path",
|
|
4135
|
+
"required": true
|
|
4136
|
+
}
|
|
4137
|
+
],
|
|
4138
|
+
"paramNames": [
|
|
4139
|
+
"table_token"
|
|
4140
|
+
],
|
|
4141
|
+
"body": {
|
|
4142
|
+
"contentType": "application/json",
|
|
4143
|
+
"required": true,
|
|
4144
|
+
"flatten": true
|
|
4145
|
+
},
|
|
4146
|
+
"successStatus": 200,
|
|
4147
|
+
"scopes": [
|
|
4148
|
+
"forms"
|
|
4149
|
+
],
|
|
4150
|
+
"responseSchema": "TableFolderMoveResult"
|
|
4151
|
+
}
|
|
4152
|
+
}
|