FileMaker Data API を実行 のリクエストのメモ
FileMaker Data API を実行 のリクエストのメモ。
リクエスト
1Let ( [
2
3~query0 =
4JSONSetElement ( "" ;
5 [ GetFieldName ( テーブル::Region ) ; "Europe" ; JSONString ] ;
6 [ GetFieldName ( テーブル::Sales Channel ) ; "Online" ; JSONString ]
7) ;
8
9~sort0 =
10JSONSetElement ( "" ;
11 [ "fieldName" ; GetFieldName ( テーブル::Region ) ; JSONString ] ;
12 [ "sortOrder" ; "ascend" ; JSONString ]
13) ;
14
15~request =
16JSONSetElement ( "" ;
17 [ "action" ; "read" ; JSONString ] ;
18 [ "version" ; "v2" ; JSONString ] ;
19 [ "layouts" ; "レイアウト 1" ; JSONString ] ;
20 [ "query.[0]" ; ~query0 ; JSONObject ] ;
21 [ "sort.[0]" ; ~sort0 ; JSONObject ] ;
22 [ "offset" ; 1 ; JSONNumber ] ;
23 [ "limit" ; 3 ; JSONNumber ]
24)
25
26] ;
27
28~request
29
30) /*let*/
レスポンス
1{
2 "response": {
3 "dataInfo": {
4 "database": "5m Sales Records",
5 "layout": "レイアウト 1",
6 "table": "テーブル",
7 "totalRecordCount": 5000000,
8 "foundCount": 648225,
9 "returnedCount": 3
10 },
11 "data": [
12 {
13 "fieldData": {
14 "Region": "Europe",
15 "Country": "Poland",
16 "Item Type": "Beverages",
17 "Sales Channel": "Online",
18 "Order Priority": "L",
19 "Order Date": "4/18/2010",
20 "Order ID": "380507028",
21 "Ship Date": "5/26/2010",
22 "Units Sold": "9340",
23 "Unit Price": "47.45",
24 "Unit Cost": "31.79",
25 "Total Revenue": "443183.00",
26 "Total Cost": "296918.60",
27 "Total Profit": "146264.40"
28 },
29 "portalData": {},
30 "recordId": "2",
31 "modId": "0"
32 },
33 {
34 "fieldData": {
35 "Region": "Europe",
36 "Country": "Belarus",
37 "Item Type": "Snacks",
38 "Sales Channel": "Online",
39 "Order Priority": "C",
40 "Order Date": "1/19/2014",
41 "Order ID": "954955518",
42 "Ship Date": "2/27/2014",
43 "Units Sold": "1414",
44 "Unit Price": "152.58",
45 "Unit Cost": "97.44",
46 "Total Revenue": "215748.12",
47 "Total Cost": "137780.16",
48 "Total Profit": "77967.96"
49 },
50 "portalData": {},
51 "recordId": "4",
52 "modId": "0"
53 },
54 {
55 "fieldData": {
56 "Region": "Europe",
57 "Country": "Montenegro",
58 "Item Type": "Personal Care",
59 "Sales Channel": "Online",
60 "Order Priority": "H",
61 "Order Date": "11/24/2012",
62 "Order ID": "598814380",
63 "Ship Date": "12/25/2012",
64 "Units Sold": "1337",
65 "Unit Price": "81.73",
66 "Unit Cost": "56.67",
67 "Total Revenue": "109273.01",
68 "Total Cost": "75767.79",
69 "Total Profit": "33505.22"
70 },
71 "portalData": {},
72 "recordId": "7",
73 "modId": "0"
74 }
75 ]
76 },
77 "messages": [
78 {
79 "code": "0",
80 "message": "OK"
81 }
82 ]
83}
Tags: