Index (List records)

Used to get a filtered list of a data model

URL : /api/v1/global

URL Parameters :

  • name=[string] : a valid form name
  • 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

Code : 200 OK

Content example

{
  "items": [
    {
      "id": 34,
      "parent_combined_id": null,
      "type": "BA",
      "mime_type": "image/jpeg",
      "filename": "I34.BW_5063_1_A_3_BW_1.jpg",
      "original_filename": "BW_5063_1_A_3_BW_1.jpg",
      "filesize": 26574,
      "checksum": "7f2977066aec5193811e585c47e579eb",
      "upload_date": "2017-11-28 02:56:40",
      "number": null,
      "expedition_id": 1,
      "site_id": 41,
      "hole_id": 205,
      "core_id": 38,
      "section_id": null,
      "remarks": null,
      "metadata": null
    },
    {
      "id": 36,
      "parent_combined_id": null,
      "type": "UN",
      "mime_type": "text/plain",
      "filename": "UN_5063_1_A_1_internalmetadata.F36.csv",
      "original_filename": "internalmetadata.csv",
      "filesize": 149,
      "checksum": "391cccd22287080cdd8b4eee85e0fe65",
      "upload_date": "2019-03-25 11:11:48",
      "number": null,
      "expedition_id": 1,
      "site_id": 41,
      "hole_id": 205,
      "core_id": 38,
      "section_id": null,
      "remarks": null,
      "metadata": null
    },
    {
      "id": 38,
      "parent_combined_id": null,
      "type": "TS",
      "mime_type": "image/tiff",
      "filename": "TS_5063_1_A_1_2.F38.tif",
      "original_filename": "5054-1-A-121Z-3WR.tif",
      "filesize": 53692312,
      "checksum": "9422346f864e5acbf7c0ad4de63248fa",
      "upload_date": "2019-04-04 02:22:44",
      "number": 2,
      "expedition_id": 1,
      "site_id": 41,
      "hole_id": 205,
      "core_id": 38,
      "section_id": null,
      "remarks": null,
      "metadata": null
    }
  ],
  "_links": {
    "self": {
      "href": "http://dis-app-2018/api/v1/global?name=ArchiveFile&per-page=5&page=1&sort=id&filter%5Bexpedition_id%5D=1&filter%5Bsite_id%5D=41&filter%5Bhole_id%5D=205&filter%5Bcore_id%5D=38"
    }
  },
  "_meta": {
    "totalCount": 3,
    "pageCount": 1,
    "currentPage": 1,
    "perPage": 5
  }
}
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