Get Access rules list
Returns Access rules list
Query Parameters
- limit integer required
Possible values:
<= 1000Number of items. Value by default is 10
- page_number integer required
Possible values:
>= 1Page number
- order_by string
sorting expression:
[field name 1], [field name 2]... <order (asc or desc)>
- filter string
Filtering expression:
[field name] [compare operator] [value] <logical operator>...
field name see the list of available fields in filter.available_fields[].field_namevalue see the list of available values in filter.available_fields[].options object, may be missingcompare operator see the list of available operators in filter.available_fields[].compare_operators arrayCompare operators Description Example eq Equal name eq 'Sherlock Holmes' gt Greater than building gt 10 lt Less than building lt 10 nq Not equal name nq 'Sherlock Holmes' ge Greater than or equal floor ge 5 le Less than or equal floor le 5 Logical operators and logical AND floor le 10 and floor gt 3 or logical OR floor le 3 or floor gt 10 not logical NOT not floor le 3 group operations () group by priority (name eq 'Sherlock Holmes' or building eq 221) and floor gt 10
- 200
- 400
- 401
OK
- application/json
- Schema
- Example (from schema)
Schema
options object
This model provides the options can be used to sort, filter and pagination when getting list of entities
pagination object
Available pagination options for tables
total_items integerThe total number of items found and reflected across all pages
items_limit integerPossible values:
<= 1000Limiting the display of the amount of data for one page
total_pages integerThe number of pages that hold the requested data
current_page integerPossible values:
>= 1Current page number
filter object
Specified filtering options for the requested dataset
available_filtering booleanDetermines if filtering is available for this dataset
is_filtered booleanDescribes if this dataset is filtered
available_fields object[]
List of fields available for filtering
field_name stringName of the field used for filtering
compare_operators string[]Possible values: [
eq,gt,lt,nq,ge,le,lk]Set of filter operators available for this field
data_type stringPossible values: [
string,integer,timestamp]Describes data type of the field
options object
Extra settings of the field
anyOf- MOD1
- MOD2
- MOD3
- MOD4
available_values object[]This model provide filter available values, data type of values depends on field data type
available_values object[]This model provide filter available values, data type of values depends on field data type
available_values_localized string[]The field is used only for UI localization and is not a filter value.
available_range object
This model provide filter integer range
min integerRepresents minimum range value
max integerRepresents maximum range value
has_date booleanDefault value:
falseDetermines if field value has date part, used for timestamp data type
has_time booleanDefault value:
falseDetermines if field value has time part, used for timestamp data type
has_milliseconds booleanDefault value:
falseDetermines if field value has milliseconds part, used for timestamp data type
sort object
Describes current sorting information and list of the dataset fields available for sorting
is_sorted booleanDirection of sorting
order stringPossible values: [
asc,desc]Direction of applied sorting, true is ascending, false is descending
available_fields string[]List of the dataset fields available for sorting
items object[]
List of Access rules
id integerPossible values:
>= -1UID for entities references. If value is
-1, then it means that is no entity reference for this structurelink_id objectUnique entity set by the server to bind some parameters with each other
name stringPossible values:
<= 100 charactersName of access rule entity
description stringPossible values:
<= 255 charactersDescription of access rule entity
settings object[]
Describes relations the reader-to-relay relationship for the access rule entity
reader stringUnique reader identifier
relays integer[]Set of relays
references_count object
list of the number of links
identifiers integerCount of identifiers attached to the access rules
time_profiles integerCount of time_profiles attached to the access rules
users integerCount of users attached to the access rules
{
"options": {
"pagination": {
"total_items": 18,
"items_limit": 10,
"total_pages": 2,
"current_page": 1
},
"filter": {
"available_filtering": true,
"is_filtered": true,
"available_fields": [
{
"field_name": "category",
"compare_operators": [
"eq"
],
"data_type": "string",
"options": {
"available_values": [
"extra option",
1,
false
]
}
}
]
},
"sort": {
"is_sorted": true,
"order": "asc",
"available_fields": [
"name"
]
}
},
"items": [
{
"id": 3,
"link_id": "91c615e3-1040-4815-8ecb-039a18b756b5",
"name": "Main access rule",
"description": "Main access used as general access rule for whole building",
"settings": [
{
"reader": "wiegand_1",
"relays": [
1
]
}
],
"references_count": {
"identifiers": 1,
"time_profiles": 1,
"users": 1
}
}
]
}
Bad Request
- application/json
- Schema
- Example (from schema)
- Example
Schema
error object
Error object, contains error details
code stringPossible values: [
invalid_authentication,permission_denied,not_valid,system_error,bad_request,connection_timeout]Error code
message stringError message
data object
Did not pass validation parameters. Can be represented as an object, which can include field names, arrays, query parameters etc.
param stringContains validation error details
{
"error": {
"code": "not_valid",
"message": "Data validation error",
"data": {
"param": "must be an string"
}
}
}
{
"error": {
"code": "bad_request",
"message": "Bad request sent"
}
}
Unauthorized request. Log In
- application/json
- Schema
- Example (from schema)
- Example
Schema
error object
Error object, contains error details
code stringPossible values: [
invalid_authentication,permission_denied,not_valid,system_error,bad_request,connection_timeout]Error code
message stringError message
data object
Did not pass validation parameters. Can be represented as an object, which can include field names, arrays, query parameters etc.
param stringContains validation error details
{
"error": {
"code": "not_valid",
"message": "Data validation error",
"data": {
"param": "must be an string"
}
}
}
{
"error": {
"code": "invalid_authentication",
"message": "Invalid authentication"
}
}