Index (List records)
Used to get a filtered list of a form data model
URL : /api/v1/form
URL Parameters :
- name=[string] : a valid form data model name (the same name which was defined in the template)
- per-page=[integer] : number of records in page
- page=[integer] : page number
- sort=[string] : the name of the field used to sort result (prefix with
-
for desc sort) - filter=[array] : fields values to used for filter e.g.
filter[expedition_id]=1&filter[site_id]=4
Method : GET
Auth required : YES
Permissions required
- Roles:
_administrator_
,developer
,operator
,viewer
- Permissions:
form-<data model name>:edit
,form-<data model name>:view
Data constraints : None
Data example : None
Success Response
GET http://localhost:8080/api/v1/form?name=cores&per-page=3
Code : 200 OK
Content example
{
"items": [
{
"rqd_abundance": 32,
"rqd_intensity": 1,
"id": 38,
"hole_id": 205,
"core": 1,
"combined_id": "5063_1_A_1",
"analyst": "NB",
"bottom_depth": 3.1,
"continuity": null,
"core_catcher": 1,
"core_diameter": 67,
"core_loss_reason": "DRILL",
"core_ondeck": "2017-06-14 09:00:00",
"core_recovery": 2.9,
"core_recovery_pc": 93.548387096774,
"core_type": "R",
"drilled_length": 3.1,
"igsn": "ICDP5063EC81001",
"last_section": 2,
"mcd_offset": 0,
"oriented": 0,
"remarks": "Simple tube barrel used to drill the casing. Fractures of excavation damage zone (blasting fractures) also reduce the RQD.",
"temperature": null,
"top_depth": 0,
"site_id": 41,
"expedition_id": 1,
"program_id": 1,
"archive_files": {
"filter": {
"expedition": 1,
"site": 41,
"hole": 205,
"core": 38
},
"files": [
{
"id": 1,
"parent_combined_id": "5063_1_A_1",
"type": "BA",
"number": null,
"filename": "BA_5063_1_A_1.F1.jpg",
"original_filename": "BW_5063_1_A_2_BW_2.jpg",
"filesize": 25386,
"mime_type": "image/jpeg",
"checksum": "0e0599831ef80b92a88d25a179c220ba",
"upload_date": "2017-09-18 03:55:12",
"expedition_id": 1,
"site_id": 41,
"hole_id": 205,
"core_id": 38,
"section_id": null,
"remarks": null,
"metadata": "FILE:\n- FileName. BW_5063_1_A_2_BW_2.jpg\n- FileSize. 25386\n- FileDateTime. 2017-09-18 03:55:12\n- MimeType. image/jpeg\n\n"
}
]
}
},
{
"rqd_abundance": 25,
"rqd_intensity": 1,
"id": 39,
"hole_id": 205,
"core": 2,
"combined_id": "5063_1_A_2",
"analyst": "NB",
"bottom_depth": 6,
"continuity": null,
"core_catcher": 1,
"core_diameter": 67,
"core_loss_reason": "BROKEN",
"core_ondeck": "2019-03-31 22:00:00",
"core_recovery": 2.7,
"core_recovery_pc": 90,
"core_type": "R",
"drilled_length": 3,
"igsn": "ICDP5063EC91001",
"last_section": 2,
"mcd_offset": 0,
"oriented": 0,
"remarks": "Simple tube barrel used to drill the casing. Fractures of excavation damage zone (blasting fractures) also reduce the RQD.",
"temperature": null,
"top_depth": 3,
"site_id": 41,
"expedition_id": 1,
"program_id": 1,
"archive_files": {
"filter": {
"expedition": 1,
"site": 41,
"hole": 205,
"core": 39
},
"files": []
}
},
{
"rqd_abundance": 95,
"rqd_intensity": 4,
"id": 40,
"hole_id": 205,
"core": 3,
"combined_id": "5063_1_A_3",
"analyst": "NB",
"bottom_depth": 9,
"continuity": null,
"core_catcher": 1,
"core_diameter": 49,
"core_loss_reason": null,
"core_ondeck": "2017-06-15 08:00:00",
"core_recovery": 3,
"core_recovery_pc": 100,
"core_type": "R",
"drilled_length": 3,
"igsn": "ICDP5063ECC1001",
"last_section": 1,
"mcd_offset": 0,
"oriented": 1,
"remarks": "Core drilled with double core barrel",
"temperature": null,
"top_depth": 6,
"site_id": 41,
"expedition_id": 1,
"program_id": 1,
"archive_files": {
"filter": {
"expedition": 1,
"site": 41,
"hole": 205,
"core": 40
},
"files": []
}
}
],
"_links": {
"self": {
"href": "http://localhost:8000/api/v1/form?name=cores&per-page=3&page=1"
},
"next": {
"href": "http://localhost:8000/api/v1/form?name=cores&per-page=3&page=2"
},
"last": {
"href": "http://localhost:8000/api/v1/form?name=cores&per-page=3&page=98"
}
},
"_meta": {
"totalCount": 292,
"pageCount": 98,
"currentPage": 1,
"perPage": 3
}
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155