Index

Used to get the list of the files in the upload directory.

URL : /api/v1/file

URL Parameters :

  • 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)

Method : GET

Auth required : YES

Permissions required

  • Roles: _administrator_, developer, operator, viewer

Data constraints : None

Data example : None

Success Response

Code : 200 OK

Content example

GET /api/v1/file?per-page=5&page=1&sort=id

{
    "items": [
        {
            "name": "I29.BW_5063_1_A_1.jpg",
            "size": 25331,
            "modified": "2017-09-18 15:55:10",
            "mime": "image/jpeg"
        },
        {
            "name": "I30.BW_5063_1_A_1.txt",
            "size": 597,
            "modified": "2017-11-01 09:41:58",
            "mime": "text/plain"
        },
        {
            "name": "I31.BW_5063_1_A_1.sql",
            "size": 200825,
            "modified": "2018-09-19 13:11:23",
            "mime": "text/plain"
        },
        {
            "name": "ImportCores.csv",
            "size": 36217,
            "modified": "2019-04-17 14:42:54",
            "mime": "text/plain"
        },
        {
            "name": "UN_5063_1_A_2017-03-23_1.jpg",
            "size": 83853,
            "modified": "2019-03-21 14:27:44",
            "mime": "image/jpeg"
        }
    ],
    "_links": {
        "self": {
            "href": "http://localhost:8000/api/v1/file?page=1"
        },
        "next": {
            "href": "http://localhost:8000/api/v1/file?page=2"
        },
        "last": {
            "href": "http://localhost:8000/api/v1/file?page=3"
        }
    },
    "_meta": {
        "totalCount": 11,
        "pageCount": 3,
        "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