Skip to main content
Skip table of contents

Get the list of intercom keys

Get the list of intercom keys

GET /api/admin/v1/intercoms/{intercom}/keys

Parameters

int per_page, Number of elements in one pagination page.


int page, Pagination page number


string search


string sort, Field by which to sort servers


string dir, In which direction to sort.


date from, Start of time interval


date to, End of time interval


integer user_id, Filter by user


array exclude_keys_id, List of keys to exclude


bool unbound_users, true - Get only those keys that are not associated with users

false - Get the keys associated with the user


bool unbound_flats, true - Receive only those keys that are not associated with the apartment

false - Get keys associated with the apartment


integer intercom_flat_id, Get all apartment keys

200 OK

Successful response

JSON
{
    "data": [
        {
            "id": 1,
            "key": "0000003042CAAC",
            "user": null,
            "flat": {
                "id": 1,
                "flat": 1,
                "key_count": null,
                "users_count": null,
                "number": "91201692@vgw1.vms.local",
                "landline_number": "xxxxxxxxxxxx",
                "is_smartphone_sip_line_available": true,
                "is_landline_sip_line_available": false,
                "is_analog_line_enable": false,
                "is_sip_line_enable": false
            },
            "created_at": "2022-11-11 14:46:16",
            "updated_at": "2022-11-11 14:46:16",
            "deleted_at": null
        },
        {
            "id": 2,
            "key": "000000A3B48D3C",
            "user": null,
            "flat": null,
            "created_at": "2022-11-11 14:46:16",
            "updated_at": "2022-11-11 14:46:16"
        },
        {
            "id": 3,
            "key": "000000418D363A",
            "user": null,
            "flat": null,
            "created_at": "2022-11-11 14:46:16",
            "updated_at": "2022-11-11 14:46:16"
        },
        {
            "id": 4,
            "key": "000000417EE9AA",
            "user": null,
            "flat": null,
            "created_at": "2022-11-11 14:46:16",
            "updated_at": "2022-11-11 14:46:16"
        },
        {
            "id": 5,
            "key": "0000003043CAAC",
            "user": null,
            "flat": null,
            "created_at": "2022-11-14 14:26:40",
            "updated_at": "2022-11-14 14:26:40"
        }
    ],
    "links": {
        "first": "https://vms.local:8080/api/admin/v1/intercoms/1/keys?per_page=5&page=1",
        "last": "https://vms.local:8080/api/admin/v1/intercoms/1/keys?per_page=5&page=2",
        "prev": null,
        "next": "https://vms.local:8080/api/admin/v1/intercoms/1/keys?per_page=5&page=2"
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 2,
        "links": [
            {
                "url": null,
                "label": "pagination.previous",
                "active": false
            },
            {
                "url": "https://vms.local:8080/api/admin/v1/intercoms/1/keys?per_page=5&page=1",
                "label": "1",
                "active": true
            },
            {
                "url": "https://vms.local:8080/api/admin/v1/intercoms/1/keys?per_page=5&page=2",
                "label": "2",
                "active": false
            },
            {
                "url": "https://vms.local:8080/api/admin/v1/intercoms/1/keys?per_page=5&page=2",
                "label": "pagination.next",
                "active": false
            }
        ],
        "path": "https://vms.local:8080/api/admin/v1/intercoms/1/keys",
        "per_page": 5,
        "to": 5,
        "total": 8
    }
}

401 Unauthorized

Authorization token not sent or not valid

cURL
BASH
curl -k --request POST \
	--url 'https://your-domain/api/admin/v1/intercoms/{intercom}/keys' \
	--header 'Content-Type: application/json' \
	--header 'Accept: application/json' \
	--data '{
    "per_page": 0,
    "page": 0,
    "search": "string",
    "sort": "string",
    "dir": "string",
    "from": "date",
    "to": "date",
    "user_id": "integer",
    "exclude_keys_id": [],
    "unbound_users": true,
    "unbound_flats": true,
    "intercom_flat_id": "integer"
}'
PHP
PHP
$data = array (
  'per_page' => 0,
  'page' => 0,
  'search' => 'string',
  'sort' => 'string',
  'dir' => 'string',
  'from' => 'date',
  'to' => 'date',
  'user_id' => 'integer',
  'exclude_keys_id' => 
  array (
  ),
  'unbound_users' => true,
  'unbound_flats' => true,
  'intercom_flat_id' => 'integer',
);
$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/intercoms/{intercom}/keys', false, $context);
JavaScript errors detected

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

If this problem persists, please contact our support.