Skip to main content
Skip table of contents

Get the list of resource groups

Get the list of resource groups

Paginated list of resource groups

GET /api/admin/v1/analytics/groups

Parameters

int page, Pagination page number


int per_page, Number of elements in one pagination page.


string search, Search by title


string sort, The field to sort by.


string dir, In which direction to sort.


int intercom_id, The field for filtering groups by belonging to the intercom, the intercom ID is setting.

200 OK

Returns a list of resource groups on the i pagination page

JSON
{
    "data": [
        {
            "id": 1,
            "name": "test group",
            "type": "plate_resource",
            "type_pretty": "Car license plates",
            "uuid": "c9b81883-c86d-47f2-9117-1c11786bed98",
            "created_at": null,
            "updated_at": null,
            "files_count": 2,
            "analytic_cases_count": 1
        }
    ],
    "links": {
        "first": "https://vms.local:8000/api/admin/v1/analytics/groups?page=1",
        "last": "https://vms.local:8000/api/admin/v1/analytics/groups?page=1",
        "prev": null,
        "next": null
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 1,
        "links": [
            {
                "url": null,
                "label": "pagination.previous",
                "active": false
            },
            {
                "url": "https://vms.local:8000/api/v1/admin/analytics/groups?page=1",
                "label": "1",
                "active": true
            },
            {
                "url": null,
                "label": "pagination.next",
                "active": false
            }
        ],
        "path": "https://vms.local:8000/api/admin/v1/analytics/groups",
        "per_page": 25,
        "to": 1,
        "total": 1
    }
}

401 Unauthorized

Authorization token not sent or not valid

422 Unprocessable Entity

Returns a JSON object with an error.

JSON
{
    "message": "There will be no informative message here",
    "errors": {
        "any_key": [
            "The cause of the error will be described here"
        ]
    }
}
cURL
BASH
curl -k --request POST \
	--url 'https://your-domain/api/admin/v1/analytics/groups' \
	--header 'Content-Type: application/json' \
	--header 'Accept: application/json' \
	--data '{
    "page": 0,
    "per_page": 0,
    "search": "string",
    "sort": "string",
    "dir": "string",
    "intercom_id": 0
}'
PHP
PHP
$data = array (
  'page' => 0,
  'per_page' => 0,
  'search' => 'string',
  'sort' => 'string',
  'dir' => 'string',
  'intercom_id' => 0,
);
$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/analytics/groups', false, $context);
JavaScript errors detected

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

If this problem persists, please contact our support.