Skip to main content
Skip table of contents

List of reports

List of reports

After generating the report, it will be displayed in this list.

GET /api/admin/v1/reports

Method parameters

int per_page, number of items per pagination page. Default is 25


int page, pagination page number


string type, filtering reports by type

200 OK

Paginated list

JSON
{
    "data": [
        {
            "type": "cameras",
            "attributes": [],
            "url": "http://127.0.0.1:8080/storage/reports/2023/2/13/report_cameras(2023-2-13)_1A2UIKM0WjSsdhIJ.xlsx",
            "created_at": "2023-02-13T09:10:28.000000Z"
        }
    ],
    "links": {
        "first": "http://127.0.0.1:8080/api/admin/v1/reports?type=cameras&page=1",
        "last": "http://127.0.0.1:8080/api/admin/v1/reports?type=cameras&page=1",
        "prev": null,
        "next": null
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 1,
        "links": [
            {
                "url": null,
                "label": "pagination.previous",
                "active": false
            },
            {
                "url": "http://127.0.0.1:8080/api/admin/v1/reports?type=cameras&page=1",
                "label": "1",
                "active": true
            },
            {
                "url": null,
                "label": "pagination.next",
                "active": false
            }
        ],
        "path": "http://127.0.0.1:8080/api/admin/v1/reports",
        "per_page": 25,
        "to": 1,
        "total": 1
    }
}

401 Unauthorized

Authorization token is not provided or is invalid. Obtaining a token

422 Unprocessable Entity

Returns a JSON object with an error. Validation

JSON
{
    "message": "There will be no informative message here",
    "errors": {
        "any_key": [
            "The reason for the error will be described here"
        ]
    }
}
cURL
BASH
curl -k --request POST \
	--url 'https://your-domain/api/admin/v1/reports' \
	--header 'Content-Type: application/json' \
	--header 'Accept: application/json' \
	--data '{
    "per_page": 0,
    "page": 0,
    "type": "string"
}'
PHP
PHP
$data = array (
  'per_page' => 0,
  'page' => 0,
  'type' => 'string',
);
$context = stream_context_create([
	'ssl'=>['verify_peer' => false],
	'http' => [
		'method' => 'GET',
		'header' => "Content-Type: application/json\r
Accept: application/json",
		'content'=>json_encode($data)
	]
]);
$result = file_get_contents('https://your-domain/api/admin/v1/reports', false, $context);
JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.