@jinshuju/mcp 0.3.0 → 0.5.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/README.md +9 -4
- package/dist/analytics.d.ts +2 -1
- package/dist/app.js +6 -1
- package/dist/auth.d.ts +14 -1
- package/dist/auth.js +32 -2
- package/dist/generated/meta.json +26 -19
- package/dist/generated/operations.json +1700 -66
- package/dist/generated/schemas.json +28877 -15045
- package/dist/generated/tools.json +491 -120
- package/dist/server.js +1 -1
- package/dist/tools.js +40 -15
- package/dist/version.d.ts +1 -1
- package/dist/version.js +2 -2
- package/package.json +2 -2
|
@@ -77,13 +77,22 @@
|
|
|
77
77
|
"type": "object",
|
|
78
78
|
"description": "One filter condition. A `filters` parameter is the JSON text of an array of these, combined with AND; each endpoint says which fields and operators it takes.",
|
|
79
79
|
"required": [
|
|
80
|
-
"field",
|
|
81
80
|
"operator"
|
|
82
81
|
],
|
|
83
82
|
"properties": {
|
|
84
83
|
"field": {
|
|
85
84
|
"type": "string",
|
|
86
|
-
"description": "What to filter on; a field api_code for entries, or a form attribute such as `created_at` for form lists"
|
|
85
|
+
"description": "What to filter on; a field api_code for entries, where `creator_id` (`eq` with a user id, at most once) and `serial_number` (`eq` / `any_in` / `none_in`, several intersected) also work, or a form attribute such as `created_at` for form lists. Required unless the deprecated `api_code` or `trigger` is given instead."
|
|
86
|
+
},
|
|
87
|
+
"api_code": {
|
|
88
|
+
"type": "string",
|
|
89
|
+
"deprecated": true,
|
|
90
|
+
"description": "Deprecated alias of `field`; use `field`."
|
|
91
|
+
},
|
|
92
|
+
"trigger": {
|
|
93
|
+
"type": "string",
|
|
94
|
+
"deprecated": true,
|
|
95
|
+
"description": "Deprecated alias of `field`; use `field`."
|
|
87
96
|
},
|
|
88
97
|
"operator": {
|
|
89
98
|
"type": "string",
|
|
@@ -111,7 +120,7 @@
|
|
|
111
120
|
"description": "Comparison; `equal` / `not_equal` / `start` / `end` are aliases of `eq` / `ne` / `gte` / `lte`. Each field type accepts only some operators, and an unsupported one returns 400 listing the available ones."
|
|
112
121
|
},
|
|
113
122
|
"value": {
|
|
114
|
-
"description": "Condition value; its type depends on the field and the operator: a two-element array `[min, max]` for `between` / `not_between
|
|
123
|
+
"description": "Condition value; its type depends on the field and the operator: a two-element array `[min, max]` for `between` / `not_between` (`{\"<column api_code>\": [min, max]}` on a matrix or table field), `{\"unit\": \"day\", \"n\": 30}` for `within_last` (unit minute / day / week / month), no value for `null` / `not_null`, a choice api_code or label on a choice field (a cascading drop-down also takes a `level1-level2` path), and serial numbers of the related table for `any_in` / `none_in` on a relation field."
|
|
115
124
|
}
|
|
116
125
|
}
|
|
117
126
|
},
|
|
@@ -200,7 +209,7 @@
|
|
|
200
209
|
{
|
|
201
210
|
"operationId": "getForm",
|
|
202
211
|
"summary": "Show a form's structure",
|
|
203
|
-
"description": "Show a form's structure\nReturns 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.\
|
|
212
|
+
"description": "Show a form's structure\nReturns 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.\nReturns schema \"FormDetail\" (see get_schema).\nThe api_code of each field in the returned fields is its key when reading and writing entries.",
|
|
204
213
|
"tag": "Forms",
|
|
205
214
|
"method": "get",
|
|
206
215
|
"path": "/forms/{form_token}",
|
|
@@ -299,7 +308,7 @@
|
|
|
299
308
|
{
|
|
300
309
|
"operationId": "createForm",
|
|
301
310
|
"summary": "Create a form",
|
|
302
|
-
"description": "Create a form\nCreates a form from a list of field definitions and returns the full form structure
|
|
311
|
+
"description": "Create a form\nCreates a form from a list of field definitions and returns the full form structure.\nReturns schema \"Form\" (see get_schema).\nEach item of fields branches on type: get_schema(\"FieldInput\") maps each type to its schema in x-variants (TextField → \"TextFieldInput\", RadioButton → \"RadioButtonInput\"), and get_schema on that name shows the properties that type accepts; do not guess field properties or schema names. For an exam or evaluation form use create_exam_form / create_evaluation_form.",
|
|
303
312
|
"tag": "Forms",
|
|
304
313
|
"method": "post",
|
|
305
314
|
"path": "/forms",
|
|
@@ -351,10 +360,8 @@
|
|
|
351
360
|
"survey",
|
|
352
361
|
"registry",
|
|
353
362
|
"vote",
|
|
354
|
-
"exam",
|
|
355
363
|
"reservation",
|
|
356
364
|
"customer_acquisition",
|
|
357
|
-
"evaluation",
|
|
358
365
|
"online_payment",
|
|
359
366
|
"quickpay"
|
|
360
367
|
],
|
|
@@ -366,7 +373,7 @@
|
|
|
366
373
|
"classic",
|
|
367
374
|
"card"
|
|
368
375
|
],
|
|
369
|
-
"description": "Layout; applies only when scene is survey / form / exam / evaluation; card is the paged layout"
|
|
376
|
+
"description": "Layout; applies only when scene is survey / form / exam / evaluation; card is the paged layout and cannot hold PageBreak / MultipleBlanksField / WidgetContact / WidgetVideo / WidgetButton"
|
|
370
377
|
}
|
|
371
378
|
},
|
|
372
379
|
"additionalProperties": false,
|
|
@@ -446,7 +453,7 @@
|
|
|
446
453
|
},
|
|
447
454
|
{
|
|
448
455
|
"type": "object",
|
|
449
|
-
"description": "A table column definition; type is limited to the column types a table supports\nBranches on type; get_schema shows each branch's own properties: TextAreaInput, RadioButtonInput, CheckBoxInput, BooleanFieldInput, MobileFieldInput, NumberFieldInput, DateTimeFieldInput, EmailFieldInput,
|
|
456
|
+
"description": "A table column definition; type is limited to the column types a table supports\nBranches on type; get_schema shows each branch's own properties: TextAreaInput, RadioButtonInput, CheckBoxInput, BooleanFieldInput, MobileFieldInput, NumberFieldInput, DateTimeFieldInput, EmailFieldInput, 13 in all.",
|
|
450
457
|
"required": [
|
|
451
458
|
"type",
|
|
452
459
|
"label"
|
|
@@ -466,7 +473,8 @@
|
|
|
466
473
|
"LinkField",
|
|
467
474
|
"AttachmentField",
|
|
468
475
|
"FormulaField",
|
|
469
|
-
"RelationField"
|
|
476
|
+
"RelationField",
|
|
477
|
+
"SequenceField"
|
|
470
478
|
]
|
|
471
479
|
},
|
|
472
480
|
"label": {
|
|
@@ -795,6 +803,11 @@
|
|
|
795
803
|
"folder_token": {
|
|
796
804
|
"type": "string",
|
|
797
805
|
"description": "Target folder token or id; when omitted, the copy is not put in a folder"
|
|
806
|
+
},
|
|
807
|
+
"with_notification_rules": {
|
|
808
|
+
"type": "boolean",
|
|
809
|
+
"default": false,
|
|
810
|
+
"description": "Copy the notification rules too; takes manage permission on the source form, and copies none when the caller is outside the source form creator's account"
|
|
798
811
|
}
|
|
799
812
|
},
|
|
800
813
|
"additionalProperties": false,
|
|
@@ -809,6 +822,60 @@
|
|
|
809
822
|
"openWorldHint": false
|
|
810
823
|
}
|
|
811
824
|
},
|
|
825
|
+
{
|
|
826
|
+
"operationId": "deleteForm",
|
|
827
|
+
"summary": "Delete a form",
|
|
828
|
+
"description": "Delete a form\nMoves the form and its entries to the trash, from which the product can restore it; on success, returns the form token.",
|
|
829
|
+
"tag": "Forms",
|
|
830
|
+
"method": "delete",
|
|
831
|
+
"path": "/forms/{form_token}",
|
|
832
|
+
"params": [
|
|
833
|
+
{
|
|
834
|
+
"name": "form_token",
|
|
835
|
+
"in": "path",
|
|
836
|
+
"required": true
|
|
837
|
+
}
|
|
838
|
+
],
|
|
839
|
+
"paramNames": [
|
|
840
|
+
"form_token"
|
|
841
|
+
],
|
|
842
|
+
"successStatus": 200,
|
|
843
|
+
"scopes": [
|
|
844
|
+
"forms"
|
|
845
|
+
],
|
|
846
|
+
"name": "delete_form",
|
|
847
|
+
"title": "Delete a form",
|
|
848
|
+
"inputSchema": {
|
|
849
|
+
"type": "object",
|
|
850
|
+
"properties": {
|
|
851
|
+
"form_token": {
|
|
852
|
+
"type": "string",
|
|
853
|
+
"description": "Form token (`token` from `GET /forms`); a 24-character hexadecimal form id is also accepted."
|
|
854
|
+
}
|
|
855
|
+
},
|
|
856
|
+
"additionalProperties": false,
|
|
857
|
+
"required": [
|
|
858
|
+
"form_token"
|
|
859
|
+
]
|
|
860
|
+
},
|
|
861
|
+
"outputSchema": {
|
|
862
|
+
"type": "object",
|
|
863
|
+
"required": [
|
|
864
|
+
"token"
|
|
865
|
+
],
|
|
866
|
+
"properties": {
|
|
867
|
+
"token": {
|
|
868
|
+
"type": "string"
|
|
869
|
+
}
|
|
870
|
+
}
|
|
871
|
+
},
|
|
872
|
+
"annotations": {
|
|
873
|
+
"readOnlyHint": false,
|
|
874
|
+
"destructiveHint": true,
|
|
875
|
+
"idempotentHint": true,
|
|
876
|
+
"openWorldHint": false
|
|
877
|
+
}
|
|
878
|
+
},
|
|
812
879
|
{
|
|
813
880
|
"operationId": "moveFormToFolder",
|
|
814
881
|
"summary": "Move a form into a folder",
|
|
@@ -1014,7 +1081,7 @@
|
|
|
1014
1081
|
{
|
|
1015
1082
|
"operationId": "checkFormFieldData",
|
|
1016
1083
|
"summary": "Check whether fields already hold data",
|
|
1017
|
-
"description": "Check whether fields already hold data\nUse 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 (
|
|
1084
|
+
"description": "Check whether fields already hold data\nUse 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 (the field or the `parent_field` column does not exist, or `choice_value` matches nothing of the kind `choice_type` names, or names more than one), 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.\nReturns schema \"FieldDataCheckResponse\" (see get_schema).",
|
|
1018
1085
|
"tag": "Forms",
|
|
1019
1086
|
"method": "get",
|
|
1020
1087
|
"path": "/forms/{form_token}/fields/check",
|
|
@@ -1062,14 +1129,15 @@
|
|
|
1062
1129
|
"properties": {
|
|
1063
1130
|
"field_api_code": {
|
|
1064
1131
|
"type": "string",
|
|
1065
|
-
"description": "api_code of the field to check;
|
|
1132
|
+
"description": "api_code of the field to check; for a column of a table / matrix field, the table / matrix field's api_code"
|
|
1066
1133
|
},
|
|
1067
1134
|
"choice_value": {
|
|
1068
1135
|
"type": "string",
|
|
1069
|
-
"description": "
|
|
1136
|
+
"description": "The choice to check, by its value or its name as GET /forms/{form_token} shows them; omitted, checks whether the whole field has any data"
|
|
1070
1137
|
},
|
|
1071
1138
|
"choice_type": {
|
|
1072
1139
|
"type": "string",
|
|
1140
|
+
"default": "choice",
|
|
1073
1141
|
"enum": [
|
|
1074
1142
|
"choice",
|
|
1075
1143
|
"statement",
|
|
@@ -1079,11 +1147,11 @@
|
|
|
1079
1147
|
"level_3",
|
|
1080
1148
|
"level_4"
|
|
1081
1149
|
],
|
|
1082
|
-
"description": "What `choice_value` names
|
|
1150
|
+
"description": "What `choice_value` names; `statement` for a matrix row, `dimension` for a matrix, table or multiple-blank column, `level_1` to `level_4` for a cascading drop-down level"
|
|
1083
1151
|
},
|
|
1084
1152
|
"parent_field": {
|
|
1085
1153
|
"type": "string",
|
|
1086
|
-
"description": "api_code of the
|
|
1154
|
+
"description": "api_code of the column, when checking a choice inside one column of a table / matrix field"
|
|
1087
1155
|
},
|
|
1088
1156
|
"check_extended_text": {
|
|
1089
1157
|
"type": "boolean",
|
|
@@ -1125,7 +1193,7 @@
|
|
|
1125
1193
|
{
|
|
1126
1194
|
"operationId": "previewFormFieldTypeChange",
|
|
1127
1195
|
"summary": "Preview a field type change",
|
|
1128
|
-
"description": "Preview a field type change\nUse 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
|
|
1196
|
+
"description": "Preview a field type change\nUse 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; matches the preview the web editor shows before converting.\n- Put every conversion of one edit in the `checks` of a single call.\n- `supported: false`, or `choice_limit_exceeded: true` when multi-line text becomes a choice field, means the edit itself would be refused.\nReturns schema \"FieldTypeChangePreviewResponse\" (see get_schema).",
|
|
1129
1197
|
"tag": "Forms",
|
|
1130
1198
|
"method": "get",
|
|
1131
1199
|
"path": "/forms/{form_token}/fields/preview_convert",
|
|
@@ -1219,7 +1287,7 @@
|
|
|
1219
1287
|
{
|
|
1220
1288
|
"operationId": "updateFormTheme",
|
|
1221
1289
|
"summary": "Update a form's theme",
|
|
1222
|
-
"description": "Update a form's theme\nPartially updates the form's theme
|
|
1290
|
+
"description": "Update a form's theme\nPartially updates the form's theme: colors, background, header image, typography, form container and submit button.",
|
|
1223
1291
|
"tag": "Form Settings",
|
|
1224
1292
|
"method": "patch",
|
|
1225
1293
|
"path": "/forms/{form_token}/theme",
|
|
@@ -1291,7 +1359,8 @@
|
|
|
1291
1359
|
{
|
|
1292
1360
|
"name": "fields",
|
|
1293
1361
|
"in": "query",
|
|
1294
|
-
"required": false
|
|
1362
|
+
"required": false,
|
|
1363
|
+
"array": true
|
|
1295
1364
|
},
|
|
1296
1365
|
{
|
|
1297
1366
|
"name": "filters",
|
|
@@ -1363,7 +1432,13 @@
|
|
|
1363
1432
|
"description": "Form token (`token` from `GET /forms`); a 24-character hexadecimal form id is also accepted."
|
|
1364
1433
|
},
|
|
1365
1434
|
"fields": {
|
|
1366
|
-
"type":
|
|
1435
|
+
"type": [
|
|
1436
|
+
"array",
|
|
1437
|
+
"string"
|
|
1438
|
+
],
|
|
1439
|
+
"items": {
|
|
1440
|
+
"type": "string"
|
|
1441
|
+
},
|
|
1367
1442
|
"description": "Return only these fields. A JSON array, a comma-separated string or a repeated parameter, of field api_codes; the serial number is always returned. Returns 400 listing the available fields when an api_code is unknown."
|
|
1368
1443
|
},
|
|
1369
1444
|
"filters": {
|
|
@@ -1375,13 +1450,22 @@
|
|
|
1375
1450
|
"type": "object",
|
|
1376
1451
|
"description": "One filter condition. A `filters` parameter is the JSON text of an array of these, combined with AND; each endpoint says which fields and operators it takes.",
|
|
1377
1452
|
"required": [
|
|
1378
|
-
"field",
|
|
1379
1453
|
"operator"
|
|
1380
1454
|
],
|
|
1381
1455
|
"properties": {
|
|
1382
1456
|
"field": {
|
|
1383
1457
|
"type": "string",
|
|
1384
|
-
"description": "What to filter on; a field api_code for entries, or a form attribute such as `created_at` for form lists"
|
|
1458
|
+
"description": "What to filter on; a field api_code for entries, where `creator_id` (`eq` with a user id, at most once) and `serial_number` (`eq` / `any_in` / `none_in`, several intersected) also work, or a form attribute such as `created_at` for form lists. Required unless the deprecated `api_code` or `trigger` is given instead."
|
|
1459
|
+
},
|
|
1460
|
+
"api_code": {
|
|
1461
|
+
"type": "string",
|
|
1462
|
+
"deprecated": true,
|
|
1463
|
+
"description": "Deprecated alias of `field`; use `field`."
|
|
1464
|
+
},
|
|
1465
|
+
"trigger": {
|
|
1466
|
+
"type": "string",
|
|
1467
|
+
"deprecated": true,
|
|
1468
|
+
"description": "Deprecated alias of `field`; use `field`."
|
|
1385
1469
|
},
|
|
1386
1470
|
"operator": {
|
|
1387
1471
|
"type": "string",
|
|
@@ -1409,7 +1493,7 @@
|
|
|
1409
1493
|
"description": "Comparison; `equal` / `not_equal` / `start` / `end` are aliases of `eq` / `ne` / `gte` / `lte`. Each field type accepts only some operators, and an unsupported one returns 400 listing the available ones."
|
|
1410
1494
|
},
|
|
1411
1495
|
"value": {
|
|
1412
|
-
"description": "Condition value; its type depends on the field and the operator: a two-element array `[min, max]` for `between` / `not_between
|
|
1496
|
+
"description": "Condition value; its type depends on the field and the operator: a two-element array `[min, max]` for `between` / `not_between` (`{\"<column api_code>\": [min, max]}` on a matrix or table field), `{\"unit\": \"day\", \"n\": 30}` for `within_last` (unit minute / day / week / month), no value for `null` / `not_null`, a choice api_code or label on a choice field (a cascading drop-down also takes a `level1-level2` path), and serial numbers of the related table for `any_in` / `none_in` on a relation field."
|
|
1413
1497
|
}
|
|
1414
1498
|
}
|
|
1415
1499
|
},
|
|
@@ -1425,7 +1509,7 @@
|
|
|
1425
1509
|
}
|
|
1426
1510
|
]
|
|
1427
1511
|
],
|
|
1428
|
-
"description": "Filters, an array of ScopeCondition objects; conditions are combined with AND
|
|
1512
|
+
"description": "Filters, an array of ScopeCondition objects; conditions are combined with AND. Besides field api_codes, `creator_id` and `serial_number` can be filtered on.\n- To find entries whose multiple-choice field contains a choice, use `any_in` (`none_in` to exclude); `eq` is not \"contains\": it matches only entries with exactly the same set of choices."
|
|
1429
1513
|
},
|
|
1430
1514
|
"keyword": {
|
|
1431
1515
|
"type": "string",
|
|
@@ -1466,7 +1550,7 @@
|
|
|
1466
1550
|
}
|
|
1467
1551
|
]
|
|
1468
1552
|
],
|
|
1469
|
-
"description": "Sort rules, an array of SortRule objects, applied in order, with ascending serial number appended automatically at the end.\nOnly sortable fields are allowed; otherwise returns 400 listing the sortable fields. With `sort`, `next` becomes a row offset.\n"
|
|
1553
|
+
"description": "Sort rules, an array of SortRule objects, applied in order, with ascending serial number appended automatically at the end.\nOnly sortable fields are allowed; otherwise returns 400 listing the sortable fields. With `sort`, `next` becomes a row offset. Without it, entries come by serial number, or by creation time when `filters` has a `created_at` condition.\n"
|
|
1470
1554
|
},
|
|
1471
1555
|
"created_at": {
|
|
1472
1556
|
"type": "string",
|
|
@@ -1562,7 +1646,8 @@
|
|
|
1562
1646
|
{
|
|
1563
1647
|
"name": "fields",
|
|
1564
1648
|
"in": "query",
|
|
1565
|
-
"required": false
|
|
1649
|
+
"required": false,
|
|
1650
|
+
"array": true
|
|
1566
1651
|
},
|
|
1567
1652
|
{
|
|
1568
1653
|
"name": "include_labels",
|
|
@@ -1595,7 +1680,13 @@
|
|
|
1595
1680
|
"description": "Entry serial number"
|
|
1596
1681
|
},
|
|
1597
1682
|
"fields": {
|
|
1598
|
-
"type":
|
|
1683
|
+
"type": [
|
|
1684
|
+
"array",
|
|
1685
|
+
"string"
|
|
1686
|
+
],
|
|
1687
|
+
"items": {
|
|
1688
|
+
"type": "string"
|
|
1689
|
+
},
|
|
1599
1690
|
"description": "Return only these fields. A JSON array, a comma-separated string or a repeated parameter, of field api_codes; the serial number is always returned. Returns 400 listing the available fields when an api_code is unknown."
|
|
1600
1691
|
},
|
|
1601
1692
|
"include_labels": {
|
|
@@ -1656,7 +1747,7 @@
|
|
|
1656
1747
|
},
|
|
1657
1748
|
"entry": {
|
|
1658
1749
|
"type": "object",
|
|
1659
|
-
"description": "Field values for writing an entry, keyed by field api_code or api_code_alias. Unknown keys and non-writable fields (signature, formula) are ignored.\nChoice fields take the choice api_code or the choice label; see the table below for cascading drop-downs and choice extra text. Number fields accept a number or a numeric string.\n\n| Field | How to write |\n|---|---|\n| Single-line / multi-line text, name, mobile, email, phone, website, ID card | String |\n| Single choice, drop-down | `\"choice api_code\"` or `\"choice label\"`; extra text via `\"<api_code>_extended_text\": {\"<choice>\": \"extra text\"}`, \"Other\" text via `\"<api_code>_other\": \"...\"` |\n| Multiple choice | Array, items as above |\n| Image single choice / image multiple choice | Choice api_code (string / array) |\n| Cascading drop-down | `{\"level_1\": \"...\", \"level_2\": \"...\"}` (api_code or label) |\n| Number, rating, NPS | Number |\n| Yes/No | Boolean |\n| Date | `\"2012-12-25\"` or `\"2012-12-25 12:13:15\"` (Beijing time, UTC+8) |\n| Time | `{\"hour\": \"12\", \"minute\": \"15\"}` |\n| Address | `{\"province\",\"city\",\"district\",\"street\"}` |\n| Geolocation | `{\"longitude\",\"latitude\",\"address\"}` |\n| File upload (multiple allowed) | Array; each item is one of: the id of an uploaded attachment; the download URL of an attachment already on this form (to keep it); `{\"base64\": \"...\", \"file_name\": \"a.png\", \"content_type\": \"image/png\"}` (≤ 5MB; `base64` may also be a data URI)
|
|
1750
|
+
"description": "Field values for writing an entry, keyed by field api_code or api_code_alias. Unknown keys and non-writable fields (signature, formula) are ignored.\nChoice fields take the choice api_code or the choice label; see the table below for cascading drop-downs and choice extra text. Number fields accept a number or a numeric string.\n\n| Field | How to write |\n|---|---|\n| Single-line / multi-line text, name, mobile, email, phone, website, ID card | String |\n| Single choice, drop-down | `\"choice api_code\"` or `\"choice label\"`; extra text via `\"<api_code>_extended_text\": {\"<choice>\": \"extra text\"}`, \"Other\" text via `\"<api_code>_other\": \"...\"` |\n| Multiple choice | Array, items as above |\n| Image single choice / image multiple choice | Choice api_code (string / array) |\n| Cascading drop-down | `{\"level_1\": \"...\", \"level_2\": \"...\"}` (api_code or label) |\n| Number, rating, NPS | Number |\n| Yes/No | Boolean |\n| Date | `\"2012-12-25\"` or `\"2012-12-25 12:13:15\"` (Beijing time, UTC+8) |\n| Time | `{\"hour\": \"12\", \"minute\": \"15\"}` |\n| Address | `{\"province\",\"city\",\"district\",\"street\"}` |\n| Geolocation | `{\"longitude\",\"latitude\",\"address\"}` |\n| File upload (multiple allowed) | Array; each item is one of: the id of an uploaded attachment; the download URL of an attachment already on this form (to keep it); `{\"base64\": \"...\", \"file_name\": \"a.png\", \"content_type\": \"image/png\"}` (≤ 5MB; `base64` may also be a data URI) |\n| Goods | `[{\"value\": \"goods item api_code\", \"number\": 2, \"specification\": {\"spec dimension\": \"option\"}?}]` |\n| Matrix fill-in / matrix scale | `{\"<statement api_code>\": {\"<column api_code>\": value}}` |\n| Matrix single choice | `{\"<statement api_code>\": \"choice api_code\"}` |\n| Table | `[{\"<column api_code>\": value}, ...]`; attachment columns are written like file upload |\n| Inline blanks | `{\"<sub-field api_code>\": \"...\"}` |\n| Ranking | Ordered array `[\"choice api_code\", ...]` |\n| Form association | token / id of the associated entry, or a display value matched by the association key (an array for multiple association keys) |\n| Reservation | `[{\"api_code\": \"item\", \"scheduled_at\": \"2021-04-26\", \"end_at\"?: \"...\", \"number\": 1}]` |\n| Color mark | `\"color_mark\": \"<color api_code or name>\"` |\n| International mobile number | Also pass `\"<api_code>_country_id\"` / `\"<api_code>_country_code\"` |\n",
|
|
1660
1751
|
"additionalProperties": true,
|
|
1661
1752
|
"examples": [
|
|
1662
1753
|
{
|
|
@@ -1741,7 +1832,7 @@
|
|
|
1741
1832
|
},
|
|
1742
1833
|
"entry": {
|
|
1743
1834
|
"type": "object",
|
|
1744
|
-
"description": "Field values for writing an entry, keyed by field api_code or api_code_alias. Unknown keys and non-writable fields (signature, formula) are ignored.\nChoice fields take the choice api_code or the choice label; see the table below for cascading drop-downs and choice extra text. Number fields accept a number or a numeric string.\n\n| Field | How to write |\n|---|---|\n| Single-line / multi-line text, name, mobile, email, phone, website, ID card | String |\n| Single choice, drop-down | `\"choice api_code\"` or `\"choice label\"`; extra text via `\"<api_code>_extended_text\": {\"<choice>\": \"extra text\"}`, \"Other\" text via `\"<api_code>_other\": \"...\"` |\n| Multiple choice | Array, items as above |\n| Image single choice / image multiple choice | Choice api_code (string / array) |\n| Cascading drop-down | `{\"level_1\": \"...\", \"level_2\": \"...\"}` (api_code or label) |\n| Number, rating, NPS | Number |\n| Yes/No | Boolean |\n| Date | `\"2012-12-25\"` or `\"2012-12-25 12:13:15\"` (Beijing time, UTC+8) |\n| Time | `{\"hour\": \"12\", \"minute\": \"15\"}` |\n| Address | `{\"province\",\"city\",\"district\",\"street\"}` |\n| Geolocation | `{\"longitude\",\"latitude\",\"address\"}` |\n| File upload (multiple allowed) | Array; each item is one of: the id of an uploaded attachment; the download URL of an attachment already on this form (to keep it); `{\"base64\": \"...\", \"file_name\": \"a.png\", \"content_type\": \"image/png\"}` (≤ 5MB; `base64` may also be a data URI)
|
|
1835
|
+
"description": "Field values for writing an entry, keyed by field api_code or api_code_alias. Unknown keys and non-writable fields (signature, formula) are ignored.\nChoice fields take the choice api_code or the choice label; see the table below for cascading drop-downs and choice extra text. Number fields accept a number or a numeric string.\n\n| Field | How to write |\n|---|---|\n| Single-line / multi-line text, name, mobile, email, phone, website, ID card | String |\n| Single choice, drop-down | `\"choice api_code\"` or `\"choice label\"`; extra text via `\"<api_code>_extended_text\": {\"<choice>\": \"extra text\"}`, \"Other\" text via `\"<api_code>_other\": \"...\"` |\n| Multiple choice | Array, items as above |\n| Image single choice / image multiple choice | Choice api_code (string / array) |\n| Cascading drop-down | `{\"level_1\": \"...\", \"level_2\": \"...\"}` (api_code or label) |\n| Number, rating, NPS | Number |\n| Yes/No | Boolean |\n| Date | `\"2012-12-25\"` or `\"2012-12-25 12:13:15\"` (Beijing time, UTC+8) |\n| Time | `{\"hour\": \"12\", \"minute\": \"15\"}` |\n| Address | `{\"province\",\"city\",\"district\",\"street\"}` |\n| Geolocation | `{\"longitude\",\"latitude\",\"address\"}` |\n| File upload (multiple allowed) | Array; each item is one of: the id of an uploaded attachment; the download URL of an attachment already on this form (to keep it); `{\"base64\": \"...\", \"file_name\": \"a.png\", \"content_type\": \"image/png\"}` (≤ 5MB; `base64` may also be a data URI) |\n| Goods | `[{\"value\": \"goods item api_code\", \"number\": 2, \"specification\": {\"spec dimension\": \"option\"}?}]` |\n| Matrix fill-in / matrix scale | `{\"<statement api_code>\": {\"<column api_code>\": value}}` |\n| Matrix single choice | `{\"<statement api_code>\": \"choice api_code\"}` |\n| Table | `[{\"<column api_code>\": value}, ...]`; attachment columns are written like file upload |\n| Inline blanks | `{\"<sub-field api_code>\": \"...\"}` |\n| Ranking | Ordered array `[\"choice api_code\", ...]` |\n| Form association | token / id of the associated entry, or a display value matched by the association key (an array for multiple association keys) |\n| Reservation | `[{\"api_code\": \"item\", \"scheduled_at\": \"2021-04-26\", \"end_at\"?: \"...\", \"number\": 1}]` |\n| Color mark | `\"color_mark\": \"<color api_code or name>\"` |\n| International mobile number | Also pass `\"<api_code>_country_id\"` / `\"<api_code>_country_code\"` |\n",
|
|
1745
1836
|
"additionalProperties": true,
|
|
1746
1837
|
"examples": [
|
|
1747
1838
|
{
|
|
@@ -1885,7 +1976,7 @@
|
|
|
1885
1976
|
"maxItems": 200,
|
|
1886
1977
|
"items": {
|
|
1887
1978
|
"type": "object",
|
|
1888
|
-
"description": "Field values for writing an entry, keyed by field api_code or api_code_alias. Unknown keys and non-writable fields (signature, formula) are ignored.\nChoice fields take the choice api_code or the choice label; see the table below for cascading drop-downs and choice extra text. Number fields accept a number or a numeric string.\n\n| Field | How to write |\n|---|---|\n| Single-line / multi-line text, name, mobile, email, phone, website, ID card | String |\n| Single choice, drop-down | `\"choice api_code\"` or `\"choice label\"`; extra text via `\"<api_code>_extended_text\": {\"<choice>\": \"extra text\"}`, \"Other\" text via `\"<api_code>_other\": \"...\"` |\n| Multiple choice | Array, items as above |\n| Image single choice / image multiple choice | Choice api_code (string / array) |\n| Cascading drop-down | `{\"level_1\": \"...\", \"level_2\": \"...\"}` (api_code or label) |\n| Number, rating, NPS | Number |\n| Yes/No | Boolean |\n| Date | `\"2012-12-25\"` or `\"2012-12-25 12:13:15\"` (Beijing time, UTC+8) |\n| Time | `{\"hour\": \"12\", \"minute\": \"15\"}` |\n| Address | `{\"province\",\"city\",\"district\",\"street\"}` |\n| Geolocation | `{\"longitude\",\"latitude\",\"address\"}` |\n| File upload (multiple allowed) | Array; each item is one of: the id of an uploaded attachment; the download URL of an attachment already on this form (to keep it); `{\"base64\": \"...\", \"file_name\": \"a.png\", \"content_type\": \"image/png\"}` (≤ 5MB; `base64` may also be a data URI)
|
|
1979
|
+
"description": "Field values for writing an entry, keyed by field api_code or api_code_alias. Unknown keys and non-writable fields (signature, formula) are ignored.\nChoice fields take the choice api_code or the choice label; see the table below for cascading drop-downs and choice extra text. Number fields accept a number or a numeric string.\n\n| Field | How to write |\n|---|---|\n| Single-line / multi-line text, name, mobile, email, phone, website, ID card | String |\n| Single choice, drop-down | `\"choice api_code\"` or `\"choice label\"`; extra text via `\"<api_code>_extended_text\": {\"<choice>\": \"extra text\"}`, \"Other\" text via `\"<api_code>_other\": \"...\"` |\n| Multiple choice | Array, items as above |\n| Image single choice / image multiple choice | Choice api_code (string / array) |\n| Cascading drop-down | `{\"level_1\": \"...\", \"level_2\": \"...\"}` (api_code or label) |\n| Number, rating, NPS | Number |\n| Yes/No | Boolean |\n| Date | `\"2012-12-25\"` or `\"2012-12-25 12:13:15\"` (Beijing time, UTC+8) |\n| Time | `{\"hour\": \"12\", \"minute\": \"15\"}` |\n| Address | `{\"province\",\"city\",\"district\",\"street\"}` |\n| Geolocation | `{\"longitude\",\"latitude\",\"address\"}` |\n| File upload (multiple allowed) | Array; each item is one of: the id of an uploaded attachment; the download URL of an attachment already on this form (to keep it); `{\"base64\": \"...\", \"file_name\": \"a.png\", \"content_type\": \"image/png\"}` (≤ 5MB; `base64` may also be a data URI) |\n| Goods | `[{\"value\": \"goods item api_code\", \"number\": 2, \"specification\": {\"spec dimension\": \"option\"}?}]` |\n| Matrix fill-in / matrix scale | `{\"<statement api_code>\": {\"<column api_code>\": value}}` |\n| Matrix single choice | `{\"<statement api_code>\": \"choice api_code\"}` |\n| Table | `[{\"<column api_code>\": value}, ...]`; attachment columns are written like file upload |\n| Inline blanks | `{\"<sub-field api_code>\": \"...\"}` |\n| Ranking | Ordered array `[\"choice api_code\", ...]` |\n| Form association | token / id of the associated entry, or a display value matched by the association key (an array for multiple association keys) |\n| Reservation | `[{\"api_code\": \"item\", \"scheduled_at\": \"2021-04-26\", \"end_at\"?: \"...\", \"number\": 1}]` |\n| Color mark | `\"color_mark\": \"<color api_code or name>\"` |\n| International mobile number | Also pass `\"<api_code>_country_id\"` / `\"<api_code>_country_code\"` |\n",
|
|
1889
1980
|
"additionalProperties": true,
|
|
1890
1981
|
"examples": [
|
|
1891
1982
|
{
|
|
@@ -2006,7 +2097,7 @@
|
|
|
2006
2097
|
},
|
|
2007
2098
|
"entry": {
|
|
2008
2099
|
"type": "object",
|
|
2009
|
-
"description": "Field values for writing an entry, keyed by field api_code or api_code_alias. Unknown keys and non-writable fields (signature, formula) are ignored.\nChoice fields take the choice api_code or the choice label; see the table below for cascading drop-downs and choice extra text. Number fields accept a number or a numeric string.\n\n| Field | How to write |\n|---|---|\n| Single-line / multi-line text, name, mobile, email, phone, website, ID card | String |\n| Single choice, drop-down | `\"choice api_code\"` or `\"choice label\"`; extra text via `\"<api_code>_extended_text\": {\"<choice>\": \"extra text\"}`, \"Other\" text via `\"<api_code>_other\": \"...\"` |\n| Multiple choice | Array, items as above |\n| Image single choice / image multiple choice | Choice api_code (string / array) |\n| Cascading drop-down | `{\"level_1\": \"...\", \"level_2\": \"...\"}` (api_code or label) |\n| Number, rating, NPS | Number |\n| Yes/No | Boolean |\n| Date | `\"2012-12-25\"` or `\"2012-12-25 12:13:15\"` (Beijing time, UTC+8) |\n| Time | `{\"hour\": \"12\", \"minute\": \"15\"}` |\n| Address | `{\"province\",\"city\",\"district\",\"street\"}` |\n| Geolocation | `{\"longitude\",\"latitude\",\"address\"}` |\n| File upload (multiple allowed) | Array; each item is one of: the id of an uploaded attachment; the download URL of an attachment already on this form (to keep it); `{\"base64\": \"...\", \"file_name\": \"a.png\", \"content_type\": \"image/png\"}` (≤ 5MB; `base64` may also be a data URI)
|
|
2100
|
+
"description": "Field values for writing an entry, keyed by field api_code or api_code_alias. Unknown keys and non-writable fields (signature, formula) are ignored.\nChoice fields take the choice api_code or the choice label; see the table below for cascading drop-downs and choice extra text. Number fields accept a number or a numeric string.\n\n| Field | How to write |\n|---|---|\n| Single-line / multi-line text, name, mobile, email, phone, website, ID card | String |\n| Single choice, drop-down | `\"choice api_code\"` or `\"choice label\"`; extra text via `\"<api_code>_extended_text\": {\"<choice>\": \"extra text\"}`, \"Other\" text via `\"<api_code>_other\": \"...\"` |\n| Multiple choice | Array, items as above |\n| Image single choice / image multiple choice | Choice api_code (string / array) |\n| Cascading drop-down | `{\"level_1\": \"...\", \"level_2\": \"...\"}` (api_code or label) |\n| Number, rating, NPS | Number |\n| Yes/No | Boolean |\n| Date | `\"2012-12-25\"` or `\"2012-12-25 12:13:15\"` (Beijing time, UTC+8) |\n| Time | `{\"hour\": \"12\", \"minute\": \"15\"}` |\n| Address | `{\"province\",\"city\",\"district\",\"street\"}` |\n| Geolocation | `{\"longitude\",\"latitude\",\"address\"}` |\n| File upload (multiple allowed) | Array; each item is one of: the id of an uploaded attachment; the download URL of an attachment already on this form (to keep it); `{\"base64\": \"...\", \"file_name\": \"a.png\", \"content_type\": \"image/png\"}` (≤ 5MB; `base64` may also be a data URI) |\n| Goods | `[{\"value\": \"goods item api_code\", \"number\": 2, \"specification\": {\"spec dimension\": \"option\"}?}]` |\n| Matrix fill-in / matrix scale | `{\"<statement api_code>\": {\"<column api_code>\": value}}` |\n| Matrix single choice | `{\"<statement api_code>\": \"choice api_code\"}` |\n| Table | `[{\"<column api_code>\": value}, ...]`; attachment columns are written like file upload |\n| Inline blanks | `{\"<sub-field api_code>\": \"...\"}` |\n| Ranking | Ordered array `[\"choice api_code\", ...]` |\n| Form association | token / id of the associated entry, or a display value matched by the association key (an array for multiple association keys) |\n| Reservation | `[{\"api_code\": \"item\", \"scheduled_at\": \"2021-04-26\", \"end_at\"?: \"...\", \"number\": 1}]` |\n| Color mark | `\"color_mark\": \"<color api_code or name>\"` |\n| International mobile number | Also pass `\"<api_code>_country_id\"` / `\"<api_code>_country_code\"` |\n",
|
|
2010
2101
|
"additionalProperties": true,
|
|
2011
2102
|
"examples": [
|
|
2012
2103
|
{
|
|
@@ -2085,7 +2176,7 @@
|
|
|
2085
2176
|
{
|
|
2086
2177
|
"operationId": "aggregateEntries",
|
|
2087
2178
|
"summary": "Aggregate entries",
|
|
2088
|
-
"description": "Aggregate entries\nAggregates 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- `
|
|
2179
|
+
"description": "Aggregate entries\nAggregates 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- `filters` / `keyword` work as in the entry list, except that `creator_id`, `serial_number` and association field conditions are not supported.\nReturns schema \"EntryAggregateResponse\" (see get_schema).",
|
|
2089
2180
|
"tag": "Entries",
|
|
2090
2181
|
"method": "get",
|
|
2091
2182
|
"path": "/forms/{form_token}/entries/aggregate",
|
|
@@ -2195,7 +2286,7 @@
|
|
|
2195
2286
|
}
|
|
2196
2287
|
]
|
|
2197
2288
|
],
|
|
2198
|
-
"description": "Required. Metrics to compute, an array of 1 to 20 AggregateMetric objects; returns 400 when missing or empty.\
|
|
2289
|
+
"description": "Required. Metrics to compute, an array of 1 to 20 AggregateMetric objects; returns 400 when missing or empty.\n`count` / `count_non_empty` / `count_empty` work on every field; the rest depend on its type (`sum`, `avg` and the percentiles on numbers), and a field's `analytics.agg_funcs` from `GET /forms/{form_token}?include_analytics=true` lists exactly what it takes.\n"
|
|
2199
2290
|
},
|
|
2200
2291
|
"dimensions": {
|
|
2201
2292
|
"type": [
|
|
@@ -2234,7 +2325,7 @@
|
|
|
2234
2325
|
}
|
|
2235
2326
|
]
|
|
2236
2327
|
],
|
|
2237
|
-
"description": "Fields to group by, an array of at most 2 AggregateDimension objects.\nOnly fields whose `analytics.groupable` is true can be grouped by; a date field
|
|
2328
|
+
"description": "Fields to group by, an array of at most 2 AggregateDimension objects.\nOnly fields whose `analytics.groupable` is true can be grouped by, such as single choice, multiple choice and date fields; a date field needs a `bucket`, in Beijing time (UTC+8).\n"
|
|
2238
2329
|
},
|
|
2239
2330
|
"limit": {
|
|
2240
2331
|
"type": "integer",
|
|
@@ -2250,13 +2341,22 @@
|
|
|
2250
2341
|
"type": "object",
|
|
2251
2342
|
"description": "One filter condition. A `filters` parameter is the JSON text of an array of these, combined with AND; each endpoint says which fields and operators it takes.",
|
|
2252
2343
|
"required": [
|
|
2253
|
-
"field",
|
|
2254
2344
|
"operator"
|
|
2255
2345
|
],
|
|
2256
2346
|
"properties": {
|
|
2257
2347
|
"field": {
|
|
2258
2348
|
"type": "string",
|
|
2259
|
-
"description": "What to filter on; a field api_code for entries, or a form attribute such as `created_at` for form lists"
|
|
2349
|
+
"description": "What to filter on; a field api_code for entries, where `creator_id` (`eq` with a user id, at most once) and `serial_number` (`eq` / `any_in` / `none_in`, several intersected) also work, or a form attribute such as `created_at` for form lists. Required unless the deprecated `api_code` or `trigger` is given instead."
|
|
2350
|
+
},
|
|
2351
|
+
"api_code": {
|
|
2352
|
+
"type": "string",
|
|
2353
|
+
"deprecated": true,
|
|
2354
|
+
"description": "Deprecated alias of `field`; use `field`."
|
|
2355
|
+
},
|
|
2356
|
+
"trigger": {
|
|
2357
|
+
"type": "string",
|
|
2358
|
+
"deprecated": true,
|
|
2359
|
+
"description": "Deprecated alias of `field`; use `field`."
|
|
2260
2360
|
},
|
|
2261
2361
|
"operator": {
|
|
2262
2362
|
"type": "string",
|
|
@@ -2284,7 +2384,7 @@
|
|
|
2284
2384
|
"description": "Comparison; `equal` / `not_equal` / `start` / `end` are aliases of `eq` / `ne` / `gte` / `lte`. Each field type accepts only some operators, and an unsupported one returns 400 listing the available ones."
|
|
2285
2385
|
},
|
|
2286
2386
|
"value": {
|
|
2287
|
-
"description": "Condition value; its type depends on the field and the operator: a two-element array `[min, max]` for `between` / `not_between
|
|
2387
|
+
"description": "Condition value; its type depends on the field and the operator: a two-element array `[min, max]` for `between` / `not_between` (`{\"<column api_code>\": [min, max]}` on a matrix or table field), `{\"unit\": \"day\", \"n\": 30}` for `within_last` (unit minute / day / week / month), no value for `null` / `not_null`, a choice api_code or label on a choice field (a cascading drop-down also takes a `level1-level2` path), and serial numbers of the related table for `any_in` / `none_in` on a relation field."
|
|
2288
2388
|
}
|
|
2289
2389
|
}
|
|
2290
2390
|
},
|
|
@@ -2300,7 +2400,7 @@
|
|
|
2300
2400
|
}
|
|
2301
2401
|
]
|
|
2302
2402
|
],
|
|
2303
|
-
"description": "Filters, an array of ScopeCondition objects; conditions are combined with AND
|
|
2403
|
+
"description": "Filters, an array of ScopeCondition objects; conditions are combined with AND. Besides field api_codes, `creator_id` and `serial_number` can be filtered on.\n- To find entries whose multiple-choice field contains a choice, use `any_in` (`none_in` to exclude); `eq` is not \"contains\": it matches only entries with exactly the same set of choices."
|
|
2304
2404
|
},
|
|
2305
2405
|
"keyword": {
|
|
2306
2406
|
"type": "string",
|
|
@@ -2336,7 +2436,8 @@
|
|
|
2336
2436
|
{
|
|
2337
2437
|
"name": "fields",
|
|
2338
2438
|
"in": "query",
|
|
2339
|
-
"required": false
|
|
2439
|
+
"required": false,
|
|
2440
|
+
"array": true
|
|
2340
2441
|
},
|
|
2341
2442
|
{
|
|
2342
2443
|
"name": "include_overview",
|
|
@@ -2377,7 +2478,13 @@
|
|
|
2377
2478
|
"description": "Form token (`token` from `GET /forms`); a 24-character hexadecimal form id is also accepted."
|
|
2378
2479
|
},
|
|
2379
2480
|
"fields": {
|
|
2380
|
-
"type":
|
|
2481
|
+
"type": [
|
|
2482
|
+
"array",
|
|
2483
|
+
"string"
|
|
2484
|
+
],
|
|
2485
|
+
"items": {
|
|
2486
|
+
"type": "string"
|
|
2487
|
+
},
|
|
2381
2488
|
"description": "Summarize only these fields: field api_codes, comma-separated (or repeat `fields[]=`), returned in the order given. Defaults to every analyzable field. Returns 400, listing the analyzable fields, when a field is not analyzable or the caller has no permission to read it."
|
|
2382
2489
|
},
|
|
2383
2490
|
"include_overview": {
|
|
@@ -2394,13 +2501,22 @@
|
|
|
2394
2501
|
"type": "object",
|
|
2395
2502
|
"description": "One filter condition. A `filters` parameter is the JSON text of an array of these, combined with AND; each endpoint says which fields and operators it takes.",
|
|
2396
2503
|
"required": [
|
|
2397
|
-
"field",
|
|
2398
2504
|
"operator"
|
|
2399
2505
|
],
|
|
2400
2506
|
"properties": {
|
|
2401
2507
|
"field": {
|
|
2402
2508
|
"type": "string",
|
|
2403
|
-
"description": "What to filter on; a field api_code for entries, or a form attribute such as `created_at` for form lists"
|
|
2509
|
+
"description": "What to filter on; a field api_code for entries, where `creator_id` (`eq` with a user id, at most once) and `serial_number` (`eq` / `any_in` / `none_in`, several intersected) also work, or a form attribute such as `created_at` for form lists. Required unless the deprecated `api_code` or `trigger` is given instead."
|
|
2510
|
+
},
|
|
2511
|
+
"api_code": {
|
|
2512
|
+
"type": "string",
|
|
2513
|
+
"deprecated": true,
|
|
2514
|
+
"description": "Deprecated alias of `field`; use `field`."
|
|
2515
|
+
},
|
|
2516
|
+
"trigger": {
|
|
2517
|
+
"type": "string",
|
|
2518
|
+
"deprecated": true,
|
|
2519
|
+
"description": "Deprecated alias of `field`; use `field`."
|
|
2404
2520
|
},
|
|
2405
2521
|
"operator": {
|
|
2406
2522
|
"type": "string",
|
|
@@ -2428,7 +2544,7 @@
|
|
|
2428
2544
|
"description": "Comparison; `equal` / `not_equal` / `start` / `end` are aliases of `eq` / `ne` / `gte` / `lte`. Each field type accepts only some operators, and an unsupported one returns 400 listing the available ones."
|
|
2429
2545
|
},
|
|
2430
2546
|
"value": {
|
|
2431
|
-
"description": "Condition value; its type depends on the field and the operator: a two-element array `[min, max]` for `between` / `not_between
|
|
2547
|
+
"description": "Condition value; its type depends on the field and the operator: a two-element array `[min, max]` for `between` / `not_between` (`{\"<column api_code>\": [min, max]}` on a matrix or table field), `{\"unit\": \"day\", \"n\": 30}` for `within_last` (unit minute / day / week / month), no value for `null` / `not_null`, a choice api_code or label on a choice field (a cascading drop-down also takes a `level1-level2` path), and serial numbers of the related table for `any_in` / `none_in` on a relation field."
|
|
2432
2548
|
}
|
|
2433
2549
|
}
|
|
2434
2550
|
},
|
|
@@ -2444,7 +2560,7 @@
|
|
|
2444
2560
|
}
|
|
2445
2561
|
]
|
|
2446
2562
|
],
|
|
2447
|
-
"description": "Filters, an array of ScopeCondition objects; conditions are combined with AND
|
|
2563
|
+
"description": "Filters, an array of ScopeCondition objects; conditions are combined with AND. Besides field api_codes, `creator_id` and `serial_number` can be filtered on.\n- To find entries whose multiple-choice field contains a choice, use `any_in` (`none_in` to exclude); `eq` is not \"contains\": it matches only entries with exactly the same set of choices."
|
|
2448
2564
|
},
|
|
2449
2565
|
"keyword": {
|
|
2450
2566
|
"type": "string",
|
|
@@ -2480,7 +2596,8 @@
|
|
|
2480
2596
|
{
|
|
2481
2597
|
"name": "form_tokens",
|
|
2482
2598
|
"in": "query",
|
|
2483
|
-
"required": false
|
|
2599
|
+
"required": false,
|
|
2600
|
+
"array": true
|
|
2484
2601
|
},
|
|
2485
2602
|
{
|
|
2486
2603
|
"name": "filters",
|
|
@@ -2510,7 +2627,13 @@
|
|
|
2510
2627
|
"description": "Search keyword (at most 200 characters); returns 400 when empty."
|
|
2511
2628
|
},
|
|
2512
2629
|
"form_tokens": {
|
|
2513
|
-
"type":
|
|
2630
|
+
"type": [
|
|
2631
|
+
"array",
|
|
2632
|
+
"string"
|
|
2633
|
+
],
|
|
2634
|
+
"items": {
|
|
2635
|
+
"type": "string"
|
|
2636
|
+
},
|
|
2514
2637
|
"description": "Tokens (ids also accepted) of the forms or tables to search, comma-separated (or repeat `form_tokens[]=`), at most 10 after deduplication. When omitted, every accessible form is searched."
|
|
2515
2638
|
},
|
|
2516
2639
|
"filters": {
|
|
@@ -2522,13 +2645,22 @@
|
|
|
2522
2645
|
"type": "object",
|
|
2523
2646
|
"description": "One filter condition. A `filters` parameter is the JSON text of an array of these, combined with AND; each endpoint says which fields and operators it takes.",
|
|
2524
2647
|
"required": [
|
|
2525
|
-
"field",
|
|
2526
2648
|
"operator"
|
|
2527
2649
|
],
|
|
2528
2650
|
"properties": {
|
|
2529
2651
|
"field": {
|
|
2530
2652
|
"type": "string",
|
|
2531
|
-
"description": "What to filter on; a field api_code for entries, or a form attribute such as `created_at` for form lists"
|
|
2653
|
+
"description": "What to filter on; a field api_code for entries, where `creator_id` (`eq` with a user id, at most once) and `serial_number` (`eq` / `any_in` / `none_in`, several intersected) also work, or a form attribute such as `created_at` for form lists. Required unless the deprecated `api_code` or `trigger` is given instead."
|
|
2654
|
+
},
|
|
2655
|
+
"api_code": {
|
|
2656
|
+
"type": "string",
|
|
2657
|
+
"deprecated": true,
|
|
2658
|
+
"description": "Deprecated alias of `field`; use `field`."
|
|
2659
|
+
},
|
|
2660
|
+
"trigger": {
|
|
2661
|
+
"type": "string",
|
|
2662
|
+
"deprecated": true,
|
|
2663
|
+
"description": "Deprecated alias of `field`; use `field`."
|
|
2532
2664
|
},
|
|
2533
2665
|
"operator": {
|
|
2534
2666
|
"type": "string",
|
|
@@ -2556,7 +2688,7 @@
|
|
|
2556
2688
|
"description": "Comparison; `equal` / `not_equal` / `start` / `end` are aliases of `eq` / `ne` / `gte` / `lte`. Each field type accepts only some operators, and an unsupported one returns 400 listing the available ones."
|
|
2557
2689
|
},
|
|
2558
2690
|
"value": {
|
|
2559
|
-
"description": "Condition value; its type depends on the field and the operator: a two-element array `[min, max]` for `between` / `not_between
|
|
2691
|
+
"description": "Condition value; its type depends on the field and the operator: a two-element array `[min, max]` for `between` / `not_between` (`{\"<column api_code>\": [min, max]}` on a matrix or table field), `{\"unit\": \"day\", \"n\": 30}` for `within_last` (unit minute / day / week / month), no value for `null` / `not_null`, a choice api_code or label on a choice field (a cascading drop-down also takes a `level1-level2` path), and serial numbers of the related table for `any_in` / `none_in` on a relation field."
|
|
2560
2692
|
}
|
|
2561
2693
|
}
|
|
2562
2694
|
},
|
|
@@ -2748,7 +2880,7 @@
|
|
|
2748
2880
|
{
|
|
2749
2881
|
"operationId": "listMySubmittedEntries",
|
|
2750
2882
|
"summary": "List my entries in a form",
|
|
2751
|
-
"description": "List my entries in a form\nReturns 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)
|
|
2883
|
+
"description": "List my entries in a form\nReturns 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).\n- `filters` works as in the entry list, but cannot use `creator_id`, since results are already the user's own.\n- `keyword` is not subject to the form's entry-count limit.\n- An account access token has no \"current user\"; calling with one returns 400.",
|
|
2752
2884
|
"tag": "Entries",
|
|
2753
2885
|
"method": "get",
|
|
2754
2886
|
"path": "/my/forms/{form_token}/entries",
|
|
@@ -2761,7 +2893,8 @@
|
|
|
2761
2893
|
{
|
|
2762
2894
|
"name": "fields",
|
|
2763
2895
|
"in": "query",
|
|
2764
|
-
"required": false
|
|
2896
|
+
"required": false,
|
|
2897
|
+
"array": true
|
|
2765
2898
|
},
|
|
2766
2899
|
{
|
|
2767
2900
|
"name": "filters",
|
|
@@ -2820,7 +2953,13 @@
|
|
|
2820
2953
|
"description": "Form token (`token` from `GET /my/forms`); a 24-character hexadecimal form id is also accepted."
|
|
2821
2954
|
},
|
|
2822
2955
|
"fields": {
|
|
2823
|
-
"type":
|
|
2956
|
+
"type": [
|
|
2957
|
+
"array",
|
|
2958
|
+
"string"
|
|
2959
|
+
],
|
|
2960
|
+
"items": {
|
|
2961
|
+
"type": "string"
|
|
2962
|
+
},
|
|
2824
2963
|
"description": "Return only these fields. A comma-separated string or an array parameter (`fields[]=`) of field api_codes; unknown or non-public fields are skipped. The serial number is always returned."
|
|
2825
2964
|
},
|
|
2826
2965
|
"filters": {
|
|
@@ -2832,13 +2971,22 @@
|
|
|
2832
2971
|
"type": "object",
|
|
2833
2972
|
"description": "One filter condition. A `filters` parameter is the JSON text of an array of these, combined with AND; each endpoint says which fields and operators it takes.",
|
|
2834
2973
|
"required": [
|
|
2835
|
-
"field",
|
|
2836
2974
|
"operator"
|
|
2837
2975
|
],
|
|
2838
2976
|
"properties": {
|
|
2839
2977
|
"field": {
|
|
2840
2978
|
"type": "string",
|
|
2841
|
-
"description": "What to filter on; a field api_code for entries, or a form attribute such as `created_at` for form lists"
|
|
2979
|
+
"description": "What to filter on; a field api_code for entries, where `creator_id` (`eq` with a user id, at most once) and `serial_number` (`eq` / `any_in` / `none_in`, several intersected) also work, or a form attribute such as `created_at` for form lists. Required unless the deprecated `api_code` or `trigger` is given instead."
|
|
2980
|
+
},
|
|
2981
|
+
"api_code": {
|
|
2982
|
+
"type": "string",
|
|
2983
|
+
"deprecated": true,
|
|
2984
|
+
"description": "Deprecated alias of `field`; use `field`."
|
|
2985
|
+
},
|
|
2986
|
+
"trigger": {
|
|
2987
|
+
"type": "string",
|
|
2988
|
+
"deprecated": true,
|
|
2989
|
+
"description": "Deprecated alias of `field`; use `field`."
|
|
2842
2990
|
},
|
|
2843
2991
|
"operator": {
|
|
2844
2992
|
"type": "string",
|
|
@@ -2866,7 +3014,7 @@
|
|
|
2866
3014
|
"description": "Comparison; `equal` / `not_equal` / `start` / `end` are aliases of `eq` / `ne` / `gte` / `lte`. Each field type accepts only some operators, and an unsupported one returns 400 listing the available ones."
|
|
2867
3015
|
},
|
|
2868
3016
|
"value": {
|
|
2869
|
-
"description": "Condition value; its type depends on the field and the operator: a two-element array `[min, max]` for `between` / `not_between
|
|
3017
|
+
"description": "Condition value; its type depends on the field and the operator: a two-element array `[min, max]` for `between` / `not_between` (`{\"<column api_code>\": [min, max]}` on a matrix or table field), `{\"unit\": \"day\", \"n\": 30}` for `within_last` (unit minute / day / week / month), no value for `null` / `not_null`, a choice api_code or label on a choice field (a cascading drop-down also takes a `level1-level2` path), and serial numbers of the related table for `any_in` / `none_in` on a relation field."
|
|
2870
3018
|
}
|
|
2871
3019
|
}
|
|
2872
3020
|
},
|
|
@@ -2882,7 +3030,7 @@
|
|
|
2882
3030
|
}
|
|
2883
3031
|
]
|
|
2884
3032
|
],
|
|
2885
|
-
"description": "Filters, an array of ScopeCondition objects; conditions are combined with AND
|
|
3033
|
+
"description": "Filters, an array of ScopeCondition objects; conditions are combined with AND. Besides field api_codes, `creator_id` and `serial_number` can be filtered on.\n- To find entries whose multiple-choice field contains a choice, use `any_in` (`none_in` to exclude); `eq` is not \"contains\": it matches only entries with exactly the same set of choices."
|
|
2886
3034
|
},
|
|
2887
3035
|
"keyword": {
|
|
2888
3036
|
"type": "string",
|
|
@@ -2960,7 +3108,7 @@
|
|
|
2960
3108
|
{
|
|
2961
3109
|
"operationId": "searchMySubmittedEntries",
|
|
2962
3110
|
"summary": "Search my entries",
|
|
2963
|
-
"description": "Search my entries\nSearches the current user's own entries
|
|
3111
|
+
"description": "Search my entries\nSearches the current user's own entries in every form they submitted to (quick payment forms excluded) with one keyword, over the fields each form makes public to submitters, and returns the match count and serial numbers for each matching form.\n- One call searches at most 20 forms; past that, name the ones to search in `form_tokens`.\n- An account access token has no \"current user\"; calling with one returns 400.\nReturns schema \"MySearchResponse\" (see get_schema).",
|
|
2964
3112
|
"tag": "Entries",
|
|
2965
3113
|
"method": "get",
|
|
2966
3114
|
"path": "/my/search",
|
|
@@ -2973,7 +3121,8 @@
|
|
|
2973
3121
|
{
|
|
2974
3122
|
"name": "form_tokens",
|
|
2975
3123
|
"in": "query",
|
|
2976
|
-
"required": false
|
|
3124
|
+
"required": false,
|
|
3125
|
+
"array": true
|
|
2977
3126
|
}
|
|
2978
3127
|
],
|
|
2979
3128
|
"paramNames": [
|
|
@@ -2996,8 +3145,14 @@
|
|
|
2996
3145
|
"description": "Search keyword (at most 200 characters), fuzzy-matched in the form's public searchable fields."
|
|
2997
3146
|
},
|
|
2998
3147
|
"form_tokens": {
|
|
2999
|
-
"type":
|
|
3000
|
-
|
|
3148
|
+
"type": [
|
|
3149
|
+
"array",
|
|
3150
|
+
"string"
|
|
3151
|
+
],
|
|
3152
|
+
"items": {
|
|
3153
|
+
"type": "string"
|
|
3154
|
+
},
|
|
3155
|
+
"description": "Search only these of the forms the user submitted to; other tokens are not searched. Comma-separated form tokens, or an array parameter (`form_tokens[]=`)."
|
|
3001
3156
|
}
|
|
3002
3157
|
},
|
|
3003
3158
|
"additionalProperties": false,
|
|
@@ -3015,7 +3170,7 @@
|
|
|
3015
3170
|
{
|
|
3016
3171
|
"operationId": "createEntryImport",
|
|
3017
3172
|
"summary": "Import entries from an uploaded spreadsheet",
|
|
3018
|
-
"description": "Import entries from an uploaded spreadsheet\nAppends 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.\
|
|
3173
|
+
"description": "Import entries from an uploaded spreadsheet\nAppends 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.\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- Every required field of the form needs a column, and a field takes at most one column.\n- A refused import writes no entries, and its error shows the row and column range and the header of the spreadsheet, so fix the mapping from it and retry.\nOnly for a file the client actually holds and has uploaded with prepare_import_file_upload (or upload_import_file). Table / CSV text pasted into the conversation goes straight to create_entries (at most 200 per batch); do not turn it into a file to import.",
|
|
3019
3174
|
"tag": "Entries",
|
|
3020
3175
|
"method": "post",
|
|
3021
3176
|
"path": "/forms/{form_token}/entry_imports",
|
|
@@ -3050,7 +3205,7 @@
|
|
|
3050
3205
|
},
|
|
3051
3206
|
"attachment_id": {
|
|
3052
3207
|
"type": "string",
|
|
3053
|
-
"description": "The import attachment `id` returned by \"Upload an import file\""
|
|
3208
|
+
"description": "The import attachment `id` returned by \"Upload an import file\" for this form"
|
|
3054
3209
|
},
|
|
3055
3210
|
"columns": {
|
|
3056
3211
|
"type": "array",
|
|
@@ -3937,13 +4092,22 @@
|
|
|
3937
4092
|
"type": "object",
|
|
3938
4093
|
"description": "One filter condition. A `filters` parameter is the JSON text of an array of these, combined with AND; each endpoint says which fields and operators it takes.",
|
|
3939
4094
|
"required": [
|
|
3940
|
-
"field",
|
|
3941
4095
|
"operator"
|
|
3942
4096
|
],
|
|
3943
4097
|
"properties": {
|
|
3944
4098
|
"field": {
|
|
3945
4099
|
"type": "string",
|
|
3946
|
-
"description": "What to filter on; a field api_code for entries, or a form attribute such as `created_at` for form lists"
|
|
4100
|
+
"description": "What to filter on; a field api_code for entries, where `creator_id` (`eq` with a user id, at most once) and `serial_number` (`eq` / `any_in` / `none_in`, several intersected) also work, or a form attribute such as `created_at` for form lists. Required unless the deprecated `api_code` or `trigger` is given instead."
|
|
4101
|
+
},
|
|
4102
|
+
"api_code": {
|
|
4103
|
+
"type": "string",
|
|
4104
|
+
"deprecated": true,
|
|
4105
|
+
"description": "Deprecated alias of `field`; use `field`."
|
|
4106
|
+
},
|
|
4107
|
+
"trigger": {
|
|
4108
|
+
"type": "string",
|
|
4109
|
+
"deprecated": true,
|
|
4110
|
+
"description": "Deprecated alias of `field`; use `field`."
|
|
3947
4111
|
},
|
|
3948
4112
|
"operator": {
|
|
3949
4113
|
"type": "string",
|
|
@@ -3971,7 +4135,7 @@
|
|
|
3971
4135
|
"description": "Comparison; `equal` / `not_equal` / `start` / `end` are aliases of `eq` / `ne` / `gte` / `lte`. Each field type accepts only some operators, and an unsupported one returns 400 listing the available ones."
|
|
3972
4136
|
},
|
|
3973
4137
|
"value": {
|
|
3974
|
-
"description": "Condition value; its type depends on the field and the operator: a two-element array `[min, max]` for `between` / `not_between
|
|
4138
|
+
"description": "Condition value; its type depends on the field and the operator: a two-element array `[min, max]` for `between` / `not_between` (`{\"<column api_code>\": [min, max]}` on a matrix or table field), `{\"unit\": \"day\", \"n\": 30}` for `within_last` (unit minute / day / week / month), no value for `null` / `not_null`, a choice api_code or label on a choice field (a cascading drop-down also takes a `level1-level2` path), and serial numbers of the related table for `any_in` / `none_in` on a relation field."
|
|
3975
4139
|
}
|
|
3976
4140
|
}
|
|
3977
4141
|
},
|
|
@@ -4110,7 +4274,7 @@
|
|
|
4110
4274
|
{
|
|
4111
4275
|
"operationId": "createTable",
|
|
4112
4276
|
"summary": "Create a table",
|
|
4113
|
-
"description": "Create a table\nCreates 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.\nReturns schema \"Table\" (see get_schema).",
|
|
4277
|
+
"description": "Create a table\nCreates 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`, `SequenceField`;\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.\nReturns schema \"Table\" (see get_schema).",
|
|
4114
4278
|
"tag": "Tables",
|
|
4115
4279
|
"method": "post",
|
|
4116
4280
|
"path": "/tables",
|
|
@@ -4144,7 +4308,7 @@
|
|
|
4144
4308
|
"minItems": 1,
|
|
4145
4309
|
"items": {
|
|
4146
4310
|
"type": "object",
|
|
4147
|
-
"description": "A table column definition; type is limited to the column types a table supports\nBranches on type; get_schema shows each branch's own properties: TextAreaInput, RadioButtonInput, CheckBoxInput, BooleanFieldInput, MobileFieldInput, NumberFieldInput, DateTimeFieldInput, EmailFieldInput,
|
|
4311
|
+
"description": "A table column definition; type is limited to the column types a table supports\nBranches on type; get_schema shows each branch's own properties: TextAreaInput, RadioButtonInput, CheckBoxInput, BooleanFieldInput, MobileFieldInput, NumberFieldInput, DateTimeFieldInput, EmailFieldInput, 13 in all.",
|
|
4148
4312
|
"required": [
|
|
4149
4313
|
"type",
|
|
4150
4314
|
"label"
|
|
@@ -4164,7 +4328,8 @@
|
|
|
4164
4328
|
"LinkField",
|
|
4165
4329
|
"AttachmentField",
|
|
4166
4330
|
"FormulaField",
|
|
4167
|
-
"RelationField"
|
|
4331
|
+
"RelationField",
|
|
4332
|
+
"SequenceField"
|
|
4168
4333
|
]
|
|
4169
4334
|
},
|
|
4170
4335
|
"label": {
|
|
@@ -4282,7 +4447,7 @@
|
|
|
4282
4447
|
},
|
|
4283
4448
|
{
|
|
4284
4449
|
"type": "object",
|
|
4285
|
-
"description": "A table column definition; type is limited to the column types a table supports\nBranches on type; get_schema shows each branch's own properties: TextAreaInput, RadioButtonInput, CheckBoxInput, BooleanFieldInput, MobileFieldInput, NumberFieldInput, DateTimeFieldInput, EmailFieldInput,
|
|
4450
|
+
"description": "A table column definition; type is limited to the column types a table supports\nBranches on type; get_schema shows each branch's own properties: TextAreaInput, RadioButtonInput, CheckBoxInput, BooleanFieldInput, MobileFieldInput, NumberFieldInput, DateTimeFieldInput, EmailFieldInput, 13 in all.",
|
|
4286
4451
|
"required": [
|
|
4287
4452
|
"type",
|
|
4288
4453
|
"label"
|
|
@@ -4302,7 +4467,8 @@
|
|
|
4302
4467
|
"LinkField",
|
|
4303
4468
|
"AttachmentField",
|
|
4304
4469
|
"FormulaField",
|
|
4305
|
-
"RelationField"
|
|
4470
|
+
"RelationField",
|
|
4471
|
+
"SequenceField"
|
|
4306
4472
|
]
|
|
4307
4473
|
},
|
|
4308
4474
|
"label": {
|
|
@@ -5084,7 +5250,7 @@
|
|
|
5084
5250
|
{
|
|
5085
5251
|
"operationId": "getBillingAccount",
|
|
5086
5252
|
"summary": "Show the current account",
|
|
5087
|
-
"description": "Show the current account\nReturns 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
|
|
5253
|
+
"description": "Show the current account\nReturns 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.",
|
|
5088
5254
|
"tag": "Account",
|
|
5089
5255
|
"method": "get",
|
|
5090
5256
|
"path": "/billing_account",
|
|
@@ -5156,10 +5322,221 @@
|
|
|
5156
5322
|
"openWorldHint": false
|
|
5157
5323
|
}
|
|
5158
5324
|
},
|
|
5325
|
+
{
|
|
5326
|
+
"operationId": "prepareEntryAttachmentUpload",
|
|
5327
|
+
"summary": "Prepare an entry attachment upload",
|
|
5328
|
+
"description": "Prepare an entry attachment upload\nIssues a one-time link for uploading a local file to an attachment field, or to an attachment column of a table field, without sending its bytes in a request body.\n- With a shell that can read the file and reach the network, run `curl -F file=@<path> <upload_url>`, then put the returned `attachment_id` in the field when creating or updating an entry.\n- Without one, or when curl fails (for example under a sandbox's network limits), send small content as Base64 to \"Upload an entry attachment\".",
|
|
5329
|
+
"tag": "Uploads",
|
|
5330
|
+
"method": "post",
|
|
5331
|
+
"path": "/forms/{form_token}/entry_attachment_upload_urls",
|
|
5332
|
+
"params": [
|
|
5333
|
+
{
|
|
5334
|
+
"name": "form_token",
|
|
5335
|
+
"in": "path",
|
|
5336
|
+
"required": true
|
|
5337
|
+
}
|
|
5338
|
+
],
|
|
5339
|
+
"paramNames": [
|
|
5340
|
+
"form_token"
|
|
5341
|
+
],
|
|
5342
|
+
"body": {
|
|
5343
|
+
"contentType": "application/json",
|
|
5344
|
+
"required": true,
|
|
5345
|
+
"flatten": true
|
|
5346
|
+
},
|
|
5347
|
+
"successStatus": 201,
|
|
5348
|
+
"scopes": [
|
|
5349
|
+
"write_entries"
|
|
5350
|
+
],
|
|
5351
|
+
"responseSchema": "PreparedUpload",
|
|
5352
|
+
"name": "prepare_entry_attachment_upload",
|
|
5353
|
+
"title": "Prepare an entry attachment upload",
|
|
5354
|
+
"inputSchema": {
|
|
5355
|
+
"type": "object",
|
|
5356
|
+
"properties": {
|
|
5357
|
+
"form_token": {
|
|
5358
|
+
"type": "string",
|
|
5359
|
+
"description": "Form token (`token` from `GET /forms`); a 24-character hexadecimal form id is also accepted."
|
|
5360
|
+
},
|
|
5361
|
+
"field_api_code": {
|
|
5362
|
+
"type": "string",
|
|
5363
|
+
"description": "api_code of the attachment field; for an attachment column in a table field, pass the table field's api_code"
|
|
5364
|
+
},
|
|
5365
|
+
"dimension_api_code": {
|
|
5366
|
+
"type": "string",
|
|
5367
|
+
"description": "api_code of the attachment column in a table field; required when `field_api_code` is a table field"
|
|
5368
|
+
}
|
|
5369
|
+
},
|
|
5370
|
+
"additionalProperties": false,
|
|
5371
|
+
"required": [
|
|
5372
|
+
"form_token",
|
|
5373
|
+
"field_api_code"
|
|
5374
|
+
]
|
|
5375
|
+
},
|
|
5376
|
+
"outputSchema": {
|
|
5377
|
+
"type": "object",
|
|
5378
|
+
"required": [
|
|
5379
|
+
"upload_url",
|
|
5380
|
+
"expires_at"
|
|
5381
|
+
],
|
|
5382
|
+
"properties": {
|
|
5383
|
+
"upload_url": {
|
|
5384
|
+
"type": "string",
|
|
5385
|
+
"format": "uri",
|
|
5386
|
+
"description": "One-time upload link: POST the file to it as the `file` part of `multipart/form-data`, without credentials; it answers `{ \"attachment_id\" }` (plus `url` for a `description` image), or 400 once used or expired or when the file breaks the size or type limits"
|
|
5387
|
+
},
|
|
5388
|
+
"expires_at": {
|
|
5389
|
+
"type": "string",
|
|
5390
|
+
"format": "date-time",
|
|
5391
|
+
"description": "When the link expires (UTC)"
|
|
5392
|
+
}
|
|
5393
|
+
}
|
|
5394
|
+
},
|
|
5395
|
+
"annotations": {
|
|
5396
|
+
"readOnlyHint": false,
|
|
5397
|
+
"destructiveHint": false,
|
|
5398
|
+
"idempotentHint": false,
|
|
5399
|
+
"openWorldHint": false
|
|
5400
|
+
}
|
|
5401
|
+
},
|
|
5402
|
+
{
|
|
5403
|
+
"operationId": "prepareFormImageUpload",
|
|
5404
|
+
"summary": "Prepare a form image upload",
|
|
5405
|
+
"description": "Prepare a form image upload\nIssues a one-time link for uploading a local image for a form, without sending its bytes in a request body.\n- With a shell that can read the file and reach the network, run `curl -F file=@<path> <upload_url>`, then use the returned `attachment_id` (or `url`) where its `image_type` goes.\n- Without one, or when curl fails (for example under a sandbox's network limits), give a public image URL or a small Base64 image where the image goes.",
|
|
5406
|
+
"tag": "Uploads",
|
|
5407
|
+
"method": "post",
|
|
5408
|
+
"path": "/form_image_upload_urls",
|
|
5409
|
+
"params": [],
|
|
5410
|
+
"paramNames": [],
|
|
5411
|
+
"body": {
|
|
5412
|
+
"contentType": "application/json",
|
|
5413
|
+
"required": true,
|
|
5414
|
+
"flatten": true
|
|
5415
|
+
},
|
|
5416
|
+
"successStatus": 201,
|
|
5417
|
+
"scopes": [
|
|
5418
|
+
"forms",
|
|
5419
|
+
"form_setting"
|
|
5420
|
+
],
|
|
5421
|
+
"responseSchema": "PreparedUpload",
|
|
5422
|
+
"name": "prepare_form_image_upload",
|
|
5423
|
+
"title": "Prepare a form image upload",
|
|
5424
|
+
"inputSchema": {
|
|
5425
|
+
"type": "object",
|
|
5426
|
+
"properties": {
|
|
5427
|
+
"image_type": {
|
|
5428
|
+
"type": "string",
|
|
5429
|
+
"enum": [
|
|
5430
|
+
"field_choice",
|
|
5431
|
+
"header",
|
|
5432
|
+
"wallpaper",
|
|
5433
|
+
"carousel",
|
|
5434
|
+
"opensearch_header",
|
|
5435
|
+
"description",
|
|
5436
|
+
"goods_item",
|
|
5437
|
+
"contact_widget"
|
|
5438
|
+
],
|
|
5439
|
+
"description": "What the image is for"
|
|
5440
|
+
}
|
|
5441
|
+
},
|
|
5442
|
+
"additionalProperties": false,
|
|
5443
|
+
"required": [
|
|
5444
|
+
"image_type"
|
|
5445
|
+
]
|
|
5446
|
+
},
|
|
5447
|
+
"outputSchema": {
|
|
5448
|
+
"type": "object",
|
|
5449
|
+
"required": [
|
|
5450
|
+
"upload_url",
|
|
5451
|
+
"expires_at"
|
|
5452
|
+
],
|
|
5453
|
+
"properties": {
|
|
5454
|
+
"upload_url": {
|
|
5455
|
+
"type": "string",
|
|
5456
|
+
"format": "uri",
|
|
5457
|
+
"description": "One-time upload link: POST the file to it as the `file` part of `multipart/form-data`, without credentials; it answers `{ \"attachment_id\" }` (plus `url` for a `description` image), or 400 once used or expired or when the file breaks the size or type limits"
|
|
5458
|
+
},
|
|
5459
|
+
"expires_at": {
|
|
5460
|
+
"type": "string",
|
|
5461
|
+
"format": "date-time",
|
|
5462
|
+
"description": "When the link expires (UTC)"
|
|
5463
|
+
}
|
|
5464
|
+
}
|
|
5465
|
+
},
|
|
5466
|
+
"annotations": {
|
|
5467
|
+
"readOnlyHint": false,
|
|
5468
|
+
"destructiveHint": false,
|
|
5469
|
+
"idempotentHint": false,
|
|
5470
|
+
"openWorldHint": false
|
|
5471
|
+
}
|
|
5472
|
+
},
|
|
5473
|
+
{
|
|
5474
|
+
"operationId": "prepareImportFileUpload",
|
|
5475
|
+
"summary": "Prepare an import file upload",
|
|
5476
|
+
"description": "Prepare an import file upload\nIssues a one-time link for uploading a local spreadsheet (`.xlsx` / `.xls` / `.csv`) to import into the form, without sending its bytes in a request body.\n- With a shell that can read the file and reach the network, run `curl -F file=@<path> <upload_url>`, then pass the returned `attachment_id` to \"Import entries from an uploaded spreadsheet\"; read the header row from your local copy.\n- Without one, or when curl fails, the file cannot be uploaded: spreadsheets have no Base64 route.",
|
|
5477
|
+
"tag": "Uploads",
|
|
5478
|
+
"method": "post",
|
|
5479
|
+
"path": "/forms/{form_token}/import_file_upload_urls",
|
|
5480
|
+
"params": [
|
|
5481
|
+
{
|
|
5482
|
+
"name": "form_token",
|
|
5483
|
+
"in": "path",
|
|
5484
|
+
"required": true
|
|
5485
|
+
}
|
|
5486
|
+
],
|
|
5487
|
+
"paramNames": [
|
|
5488
|
+
"form_token"
|
|
5489
|
+
],
|
|
5490
|
+
"successStatus": 201,
|
|
5491
|
+
"scopes": [
|
|
5492
|
+
"write_entries"
|
|
5493
|
+
],
|
|
5494
|
+
"responseSchema": "PreparedUpload",
|
|
5495
|
+
"name": "prepare_import_file_upload",
|
|
5496
|
+
"title": "Prepare an import file upload",
|
|
5497
|
+
"inputSchema": {
|
|
5498
|
+
"type": "object",
|
|
5499
|
+
"properties": {
|
|
5500
|
+
"form_token": {
|
|
5501
|
+
"type": "string",
|
|
5502
|
+
"description": "Form token (`token` from `GET /forms`); a 24-character hexadecimal form id is also accepted."
|
|
5503
|
+
}
|
|
5504
|
+
},
|
|
5505
|
+
"additionalProperties": false,
|
|
5506
|
+
"required": [
|
|
5507
|
+
"form_token"
|
|
5508
|
+
]
|
|
5509
|
+
},
|
|
5510
|
+
"outputSchema": {
|
|
5511
|
+
"type": "object",
|
|
5512
|
+
"required": [
|
|
5513
|
+
"upload_url",
|
|
5514
|
+
"expires_at"
|
|
5515
|
+
],
|
|
5516
|
+
"properties": {
|
|
5517
|
+
"upload_url": {
|
|
5518
|
+
"type": "string",
|
|
5519
|
+
"format": "uri",
|
|
5520
|
+
"description": "One-time upload link: POST the file to it as the `file` part of `multipart/form-data`, without credentials; it answers `{ \"attachment_id\" }` (plus `url` for a `description` image), or 400 once used or expired or when the file breaks the size or type limits"
|
|
5521
|
+
},
|
|
5522
|
+
"expires_at": {
|
|
5523
|
+
"type": "string",
|
|
5524
|
+
"format": "date-time",
|
|
5525
|
+
"description": "When the link expires (UTC)"
|
|
5526
|
+
}
|
|
5527
|
+
}
|
|
5528
|
+
},
|
|
5529
|
+
"annotations": {
|
|
5530
|
+
"readOnlyHint": false,
|
|
5531
|
+
"destructiveHint": false,
|
|
5532
|
+
"idempotentHint": false,
|
|
5533
|
+
"openWorldHint": false
|
|
5534
|
+
}
|
|
5535
|
+
},
|
|
5159
5536
|
{
|
|
5160
5537
|
"operationId": "uploadEntryAttachment",
|
|
5161
5538
|
"summary": "Upload an entry attachment",
|
|
5162
|
-
"description": "Upload an entry attachment\nUploads a file
|
|
5539
|
+
"description": "Upload an entry attachment\nUploads a file for an attachment field of the form, or for an attachment column of a table field.",
|
|
5163
5540
|
"tag": "Uploads",
|
|
5164
5541
|
"method": "post",
|
|
5165
5542
|
"path": "/forms/{form_token}/entry_attachments",
|
|
@@ -5200,25 +5577,13 @@
|
|
|
5200
5577
|
"type": "string",
|
|
5201
5578
|
"description": "api_code of the attachment column in a table field; required when `field_api_code` is a table field"
|
|
5202
5579
|
},
|
|
5203
|
-
"attachment_token": {
|
|
5204
|
-
"type": "string",
|
|
5205
|
-
"description": "One-time upload token, starting with `entry_att_tok_`; when passed, it replaces the regular credentials"
|
|
5206
|
-
},
|
|
5207
5580
|
"base64": {
|
|
5208
5581
|
"type": "string",
|
|
5209
|
-
"description": "File content as a Base64 string, optionally with a `data:<mime>;base64,` prefix, at most 5 MB once decoded
|
|
5210
|
-
},
|
|
5211
|
-
"data": {
|
|
5212
|
-
"type": "string",
|
|
5213
|
-
"description": "Alias of `base64`"
|
|
5582
|
+
"description": "File content as a Base64 string, optionally with a `data:<mime>;base64,` prefix, at most 5 MB once decoded"
|
|
5214
5583
|
},
|
|
5215
5584
|
"file_name": {
|
|
5216
5585
|
"type": "string",
|
|
5217
|
-
"description": "File name, defaults to `attachment
|
|
5218
|
-
},
|
|
5219
|
-
"filename": {
|
|
5220
|
-
"type": "string",
|
|
5221
|
-
"description": "Alias of `file_name`"
|
|
5586
|
+
"description": "File name, defaults to `attachment`"
|
|
5222
5587
|
},
|
|
5223
5588
|
"content_type": {
|
|
5224
5589
|
"type": "string",
|
|
@@ -5278,7 +5643,7 @@
|
|
|
5278
5643
|
{
|
|
5279
5644
|
"operationId": "uploadFormImage",
|
|
5280
5645
|
"summary": "Upload a form image",
|
|
5281
|
-
"description": "Upload a form image\nUploads an image
|
|
5646
|
+
"description": "Upload a form image\nUploads an image for a form; it takes effect once a form, theme or public query references it.\n- `description` returns a `url` for an `<img src>` in the form `description` or a field's `notes`, at most 30 per form; every other type returns an `attachment_id` for the property that names that `image_type`.\n- An `attachment_id` is taken only where its `image_type` goes, and only while the image is unused or already that form's; an image nothing uses within 7 days is deleted.",
|
|
5282
5647
|
"tag": "Uploads",
|
|
5283
5648
|
"method": "post",
|
|
5284
5649
|
"path": "/form_image_attachments",
|
|
@@ -5308,17 +5673,15 @@
|
|
|
5308
5673
|
"wallpaper",
|
|
5309
5674
|
"carousel",
|
|
5310
5675
|
"opensearch_header",
|
|
5311
|
-
"description"
|
|
5676
|
+
"description",
|
|
5677
|
+
"goods_item",
|
|
5678
|
+
"contact_widget"
|
|
5312
5679
|
],
|
|
5313
|
-
"description": "What the image is for
|
|
5314
|
-
},
|
|
5315
|
-
"form_image_token": {
|
|
5316
|
-
"type": "string",
|
|
5317
|
-
"description": "One-time upload token, starting with `form_img_tok_`; when passed, it replaces the regular credentials"
|
|
5680
|
+
"description": "What the image is for"
|
|
5318
5681
|
},
|
|
5319
5682
|
"file_base64": {
|
|
5320
5683
|
"type": "string",
|
|
5321
|
-
"description": "The image file
|
|
5684
|
+
"description": "The image file. The file content as Base64 (a data URI prefix is fine)."
|
|
5322
5685
|
},
|
|
5323
5686
|
"file_name": {
|
|
5324
5687
|
"type": "string",
|
|
@@ -5331,6 +5694,7 @@
|
|
|
5331
5694
|
},
|
|
5332
5695
|
"additionalProperties": false,
|
|
5333
5696
|
"required": [
|
|
5697
|
+
"image_type",
|
|
5334
5698
|
"file_base64",
|
|
5335
5699
|
"file_name",
|
|
5336
5700
|
"content_type"
|
|
@@ -5344,7 +5708,7 @@
|
|
|
5344
5708
|
"properties": {
|
|
5345
5709
|
"attachment_id": {
|
|
5346
5710
|
"type": "string",
|
|
5347
|
-
"description": "Image attachment ID
|
|
5711
|
+
"description": "Image attachment ID; pass it where its `image_type` goes"
|
|
5348
5712
|
},
|
|
5349
5713
|
"url": {
|
|
5350
5714
|
"type": "string",
|
|
@@ -5362,7 +5726,7 @@
|
|
|
5362
5726
|
{
|
|
5363
5727
|
"operationId": "uploadImportFile",
|
|
5364
5728
|
"summary": "Upload an import file",
|
|
5365
|
-
"description": "Upload an import file\nUploads a spreadsheet
|
|
5729
|
+
"description": "Upload an import file\nUploads a spreadsheet (`.xlsx` / `.xls` / `.csv`) for importing entries into the form.\nThe file goes through the tool call as Base64; a file on disk goes through prepare_import_file_upload instead. Table / CSV text pasted into the conversation does not go through here (do not encode it as base64 and upload it as a file); write it with create_entries (at most 200 per batch).",
|
|
5366
5730
|
"tag": "Uploads",
|
|
5367
5731
|
"method": "post",
|
|
5368
5732
|
"path": "/forms/{form_token}/import_files",
|
|
@@ -5395,13 +5759,9 @@
|
|
|
5395
5759
|
"type": "string",
|
|
5396
5760
|
"description": "Form token (`token` from `GET /forms`); a 24-character hexadecimal form id is also accepted."
|
|
5397
5761
|
},
|
|
5398
|
-
"import_file_token": {
|
|
5399
|
-
"type": "string",
|
|
5400
|
-
"description": "One-time upload token, starting with `import_file_tok_`; when passed, it replaces the regular credentials"
|
|
5401
|
-
},
|
|
5402
5762
|
"file_base64": {
|
|
5403
5763
|
"type": "string",
|
|
5404
|
-
"description": "The xlsx / xls / csv file to import
|
|
5764
|
+
"description": "The xlsx / xls / csv file to import. The file content as Base64 (a data URI prefix is fine)."
|
|
5405
5765
|
},
|
|
5406
5766
|
"file_name": {
|
|
5407
5767
|
"type": "string",
|
|
@@ -5634,7 +5994,7 @@
|
|
|
5634
5994
|
{
|
|
5635
5995
|
"operationId": "createForm",
|
|
5636
5996
|
"summary": "Create a form",
|
|
5637
|
-
"description": "Creates an online exam form (scene=exam, scored automatically). Use it, not create_form, when the user wants an exam, test or quiz; an evaluation such as a psychological test, ability assessment, self-assessment questionnaire or training feedback uses create_evaluation_form. Questions must use exam question types (SingleSelect / MultiSelect / TrueOrFalse / DropDownSelect / FillInBlank / ShortAnswer / FillInNumber), each with answers (the correct answer and its score; the default absolute mode has one correct answer and scores only a fully correct response). Creates the form first, then applies exam_setting; if the settings are rejected, the form already exists and the result says so.\nCreates a form from a list of field definitions and returns the full form structure.
|
|
5997
|
+
"description": "Creates an online exam form (scene=exam, scored automatically). Use it, not create_form, when the user wants an exam, test or quiz; an evaluation such as a psychological test, ability assessment, self-assessment questionnaire or training feedback uses create_evaluation_form. Questions must use exam question types (SingleSelect / MultiSelect / TrueOrFalse / DropDownSelect / FillInBlank / ShortAnswer / FillInNumber), each with answers (the correct answer and its score; the default absolute mode has one correct answer and scores only a fully correct response). A question type's schema is the one ExamFieldInput's x-variants names (SingleSelect → \"SingleSelectInput\"; see get_schema). Creates the form first, then applies exam_setting; if the settings are rejected, the form already exists and the result says so.\nCreates a form from a list of field definitions and returns the full form structure.",
|
|
5638
5998
|
"tag": "Forms",
|
|
5639
5999
|
"method": "post",
|
|
5640
6000
|
"path": "/forms",
|
|
@@ -5668,7 +6028,7 @@
|
|
|
5668
6028
|
"minItems": 1,
|
|
5669
6029
|
"items": {
|
|
5670
6030
|
"type": "object",
|
|
5671
|
-
"description": "Shape: schema \"
|
|
6031
|
+
"description": "Shape: schema \"ExamFieldInput\"; call get_schema (name=\"ExamFieldInput\") or read the resource jinshuju://schemas/ExamFieldInput."
|
|
5672
6032
|
}
|
|
5673
6033
|
},
|
|
5674
6034
|
"setting": {
|
|
@@ -5685,7 +6045,7 @@
|
|
|
5685
6045
|
"classic",
|
|
5686
6046
|
"card"
|
|
5687
6047
|
],
|
|
5688
|
-
"description": "Layout; applies only when scene is survey / form / exam / evaluation; card is the paged layout"
|
|
6048
|
+
"description": "Layout; applies only when scene is survey / form / exam / evaluation; card is the paged layout and cannot hold PageBreak / MultipleBlanksField / WidgetContact / WidgetVideo / WidgetButton"
|
|
5689
6049
|
},
|
|
5690
6050
|
"scene": {
|
|
5691
6051
|
"type": "string",
|
|
@@ -5746,7 +6106,7 @@
|
|
|
5746
6106
|
}
|
|
5747
6107
|
}
|
|
5748
6108
|
},
|
|
5749
|
-
"description": "Exam settings (updateExamSetting): Partially updates an exam form's settings
|
|
6109
|
+
"description": "Exam settings (updateExamSetting): Partially updates an exam form's settings."
|
|
5750
6110
|
}
|
|
5751
6111
|
},
|
|
5752
6112
|
"additionalProperties": false,
|
|
@@ -5828,11 +6188,11 @@
|
|
|
5828
6188
|
"anyOf": [
|
|
5829
6189
|
{
|
|
5830
6190
|
"type": "object",
|
|
5831
|
-
"description": "Shape: schema \"
|
|
6191
|
+
"description": "Shape: schema \"ExamFieldInput\"; call get_schema (name=\"ExamFieldInput\") or read the resource jinshuju://schemas/ExamFieldInput."
|
|
5832
6192
|
},
|
|
5833
6193
|
{
|
|
5834
6194
|
"type": "object",
|
|
5835
|
-
"description": "A table column definition; type is limited to the column types a table supports\nBranches on type; get_schema shows each branch's own properties: TextAreaInput, RadioButtonInput, CheckBoxInput, BooleanFieldInput, MobileFieldInput, NumberFieldInput, DateTimeFieldInput, EmailFieldInput,
|
|
6195
|
+
"description": "A table column definition; type is limited to the column types a table supports\nBranches on type; get_schema shows each branch's own properties: TextAreaInput, RadioButtonInput, CheckBoxInput, BooleanFieldInput, MobileFieldInput, NumberFieldInput, DateTimeFieldInput, EmailFieldInput, 13 in all.",
|
|
5836
6196
|
"required": [
|
|
5837
6197
|
"type",
|
|
5838
6198
|
"label"
|
|
@@ -5852,7 +6212,8 @@
|
|
|
5852
6212
|
"LinkField",
|
|
5853
6213
|
"AttachmentField",
|
|
5854
6214
|
"FormulaField",
|
|
5855
|
-
"RelationField"
|
|
6215
|
+
"RelationField",
|
|
6216
|
+
"SequenceField"
|
|
5856
6217
|
]
|
|
5857
6218
|
},
|
|
5858
6219
|
"label": {
|
|
@@ -6179,7 +6540,7 @@
|
|
|
6179
6540
|
}
|
|
6180
6541
|
}
|
|
6181
6542
|
},
|
|
6182
|
-
"description": "Exam settings (updateExamSetting): Partially updates an exam form's settings
|
|
6543
|
+
"description": "Exam settings (updateExamSetting): Partially updates an exam form's settings."
|
|
6183
6544
|
}
|
|
6184
6545
|
},
|
|
6185
6546
|
"additionalProperties": false,
|
|
@@ -6203,7 +6564,7 @@
|
|
|
6203
6564
|
{
|
|
6204
6565
|
"operationId": "createForm",
|
|
6205
6566
|
"summary": "Create a form",
|
|
6206
|
-
"description": "Creates an evaluation form (scene=evaluation). Use it when the user wants an evaluation, psychological test, ability assessment, self-assessment questionnaire or training feedback; not create_form, and not create_exam_form (an exam with correct answers). A scored evaluation uses SingleSelect / MultiSelect / DropDownSelect / Rating / Nps: each question lists every choice with its score in answers and sets answer_setting_mode=relative (every choice scores, none is right or wrong; the default absolute accepts one correct answer and scores any other choice 0). Do not score with a regular choice field's calculable / operand_value. A feedback questionnaire uses regular fields (RatingField / MatrixScaleField / TextArea, etc.) without scores. Creates the form first, then applies evaluation_setting (the report after submission, comments by total score range, dimensions).\nCreates a form from a list of field definitions and returns the full form structure.
|
|
6567
|
+
"description": "Creates an evaluation form (scene=evaluation). Use it when the user wants an evaluation, psychological test, ability assessment, self-assessment questionnaire or training feedback; not create_form, and not create_exam_form (an exam with correct answers). A scored evaluation uses SingleSelect / MultiSelect / DropDownSelect / Rating / Nps: each question lists every choice with its score in answers and sets answer_setting_mode=relative (every choice scores, none is right or wrong; the default absolute accepts one correct answer and scores any other choice 0). A question type's schema is the one EvaluationFieldInput's x-variants names (SingleSelect → \"SingleSelectInput\"; see get_schema). Do not score with a regular choice field's calculable / operand_value. A feedback questionnaire uses regular fields (RatingField / MatrixScaleField / TextArea, etc.) without scores. Creates the form first, then applies evaluation_setting (the report after submission, comments by total score range, dimensions).\nCreates a form from a list of field definitions and returns the full form structure.",
|
|
6207
6568
|
"tag": "Forms",
|
|
6208
6569
|
"method": "post",
|
|
6209
6570
|
"path": "/forms",
|
|
@@ -6237,7 +6598,7 @@
|
|
|
6237
6598
|
"minItems": 1,
|
|
6238
6599
|
"items": {
|
|
6239
6600
|
"type": "object",
|
|
6240
|
-
"description": "Shape: schema \"
|
|
6601
|
+
"description": "Shape: schema \"EvaluationFieldInput\"; call get_schema (name=\"EvaluationFieldInput\") or read the resource jinshuju://schemas/EvaluationFieldInput."
|
|
6241
6602
|
}
|
|
6242
6603
|
},
|
|
6243
6604
|
"setting": {
|
|
@@ -6254,7 +6615,7 @@
|
|
|
6254
6615
|
"classic",
|
|
6255
6616
|
"card"
|
|
6256
6617
|
],
|
|
6257
|
-
"description": "Layout; applies only when scene is survey / form / exam / evaluation; card is the paged layout"
|
|
6618
|
+
"description": "Layout; applies only when scene is survey / form / exam / evaluation; card is the paged layout and cannot hold PageBreak / MultipleBlanksField / WidgetContact / WidgetVideo / WidgetButton"
|
|
6258
6619
|
},
|
|
6259
6620
|
"scene": {
|
|
6260
6621
|
"type": "string",
|
|
@@ -6263,7 +6624,7 @@
|
|
|
6263
6624
|
},
|
|
6264
6625
|
"evaluation_setting": {
|
|
6265
6626
|
"type": "object",
|
|
6266
|
-
"description": "Evaluation settings (updateEvaluationSetting): Partially updates an evaluation form's settings
|
|
6627
|
+
"description": "Evaluation settings (updateEvaluationSetting): Partially updates an evaluation form's settings (schema `EvaluationSettingInput`).\n- `evaluation_comments` replaces the total score range comments as a whole (an empty array turns them off) and takes effect only when `notice_after_filling_mode`, passed or already saved, is reports / customize. A comment written with conditions in the form editor reads back as `id` + `conditions`; pass it back under that id, where only `comment` / `retry` can change.\n- `indicator_setting.indicators` replaces the dimensions as a whole; pass `api_code` back to keep a dimension. A dimension binds visible scorable questions by `field_api_codes` or `field_cids`."
|
|
6267
6628
|
}
|
|
6268
6629
|
},
|
|
6269
6630
|
"additionalProperties": false,
|
|
@@ -6345,11 +6706,11 @@
|
|
|
6345
6706
|
"anyOf": [
|
|
6346
6707
|
{
|
|
6347
6708
|
"type": "object",
|
|
6348
|
-
"description": "Shape: schema \"
|
|
6709
|
+
"description": "Shape: schema \"EvaluationFieldInput\"; call get_schema (name=\"EvaluationFieldInput\") or read the resource jinshuju://schemas/EvaluationFieldInput."
|
|
6349
6710
|
},
|
|
6350
6711
|
{
|
|
6351
6712
|
"type": "object",
|
|
6352
|
-
"description": "A table column definition; type is limited to the column types a table supports\nBranches on type; get_schema shows each branch's own properties: TextAreaInput, RadioButtonInput, CheckBoxInput, BooleanFieldInput, MobileFieldInput, NumberFieldInput, DateTimeFieldInput, EmailFieldInput,
|
|
6713
|
+
"description": "A table column definition; type is limited to the column types a table supports\nBranches on type; get_schema shows each branch's own properties: TextAreaInput, RadioButtonInput, CheckBoxInput, BooleanFieldInput, MobileFieldInput, NumberFieldInput, DateTimeFieldInput, EmailFieldInput, 13 in all.",
|
|
6353
6714
|
"required": [
|
|
6354
6715
|
"type",
|
|
6355
6716
|
"label"
|
|
@@ -6369,7 +6730,8 @@
|
|
|
6369
6730
|
"LinkField",
|
|
6370
6731
|
"AttachmentField",
|
|
6371
6732
|
"FormulaField",
|
|
6372
|
-
"RelationField"
|
|
6733
|
+
"RelationField",
|
|
6734
|
+
"SequenceField"
|
|
6373
6735
|
]
|
|
6374
6736
|
},
|
|
6375
6737
|
"label": {
|
|
@@ -6644,7 +7006,7 @@
|
|
|
6644
7006
|
},
|
|
6645
7007
|
"evaluation_setting": {
|
|
6646
7008
|
"type": "object",
|
|
6647
|
-
"description": "Evaluation settings (updateEvaluationSetting): Partially updates an evaluation form's settings
|
|
7009
|
+
"description": "Evaluation settings (updateEvaluationSetting): Partially updates an evaluation form's settings (schema `EvaluationSettingInput`).\n- `evaluation_comments` replaces the total score range comments as a whole (an empty array turns them off) and takes effect only when `notice_after_filling_mode`, passed or already saved, is reports / customize. A comment written with conditions in the form editor reads back as `id` + `conditions`; pass it back under that id, where only `comment` / `retry` can change.\n- `indicator_setting.indicators` replaces the dimensions as a whole; pass `api_code` back to keep a dimension. A dimension binds visible scorable questions by `field_api_codes` or `field_cids`."
|
|
6648
7010
|
}
|
|
6649
7011
|
},
|
|
6650
7012
|
"additionalProperties": false,
|
|
@@ -6725,13 +7087,22 @@
|
|
|
6725
7087
|
"type": "object",
|
|
6726
7088
|
"description": "One filter condition. A `filters` parameter is the JSON text of an array of these, combined with AND; each endpoint says which fields and operators it takes.",
|
|
6727
7089
|
"required": [
|
|
6728
|
-
"field",
|
|
6729
7090
|
"operator"
|
|
6730
7091
|
],
|
|
6731
7092
|
"properties": {
|
|
6732
7093
|
"field": {
|
|
6733
7094
|
"type": "string",
|
|
6734
|
-
"description": "What to filter on; a field api_code for entries, or a form attribute such as `created_at` for form lists"
|
|
7095
|
+
"description": "What to filter on; a field api_code for entries, where `creator_id` (`eq` with a user id, at most once) and `serial_number` (`eq` / `any_in` / `none_in`, several intersected) also work, or a form attribute such as `created_at` for form lists. Required unless the deprecated `api_code` or `trigger` is given instead."
|
|
7096
|
+
},
|
|
7097
|
+
"api_code": {
|
|
7098
|
+
"type": "string",
|
|
7099
|
+
"deprecated": true,
|
|
7100
|
+
"description": "Deprecated alias of `field`; use `field`."
|
|
7101
|
+
},
|
|
7102
|
+
"trigger": {
|
|
7103
|
+
"type": "string",
|
|
7104
|
+
"deprecated": true,
|
|
7105
|
+
"description": "Deprecated alias of `field`; use `field`."
|
|
6735
7106
|
},
|
|
6736
7107
|
"operator": {
|
|
6737
7108
|
"type": "string",
|
|
@@ -6759,7 +7130,7 @@
|
|
|
6759
7130
|
"description": "Comparison; `equal` / `not_equal` / `start` / `end` are aliases of `eq` / `ne` / `gte` / `lte`. Each field type accepts only some operators, and an unsupported one returns 400 listing the available ones."
|
|
6760
7131
|
},
|
|
6761
7132
|
"value": {
|
|
6762
|
-
"description": "Condition value; its type depends on the field and the operator: a two-element array `[min, max]` for `between` / `not_between
|
|
7133
|
+
"description": "Condition value; its type depends on the field and the operator: a two-element array `[min, max]` for `between` / `not_between` (`{\"<column api_code>\": [min, max]}` on a matrix or table field), `{\"unit\": \"day\", \"n\": 30}` for `within_last` (unit minute / day / week / month), no value for `null` / `not_null`, a choice api_code or label on a choice field (a cascading drop-down also takes a `level1-level2` path), and serial numbers of the related table for `any_in` / `none_in` on a relation field."
|
|
6763
7134
|
}
|
|
6764
7135
|
}
|
|
6765
7136
|
},
|
|
@@ -6775,7 +7146,7 @@
|
|
|
6775
7146
|
}
|
|
6776
7147
|
]
|
|
6777
7148
|
],
|
|
6778
|
-
"description": "Filters, an array of ScopeCondition objects; conditions are combined with AND
|
|
7149
|
+
"description": "Filters, an array of ScopeCondition objects; conditions are combined with AND. Besides field api_codes, `creator_id` and `serial_number` can be filtered on.\n- To find entries whose multiple-choice field contains a choice, use `any_in` (`none_in` to exclude); `eq` is not \"contains\": it matches only entries with exactly the same set of choices."
|
|
6779
7150
|
},
|
|
6780
7151
|
"keyword": {
|
|
6781
7152
|
"type": "string",
|