Skip to main content

Device App Access Devices

Retrieve access control devices and their configuration data for the device application system.

Base URL: https://gate.zequenze.com/api/v1

Authentication: All endpoints require a Bearer token:

Authorization: Bearer <your-api-token>

Endpoints

GET /device_app_access_devices/

Retrieves a list of access control devices configured for the device application. This endpoint provides access point information including device status, configuration, and recent changes.

Parameters:

Parameter Type In Required Description
last_change__gte string query No Filter devices by last change date (ISO 8601 format)
limit integer query No Number of results to return per page
offset integer query No The initial index from which to return the results

Example Request:

GET /api/v1/device_app_access_devices/?limit=10&offset=0

Example Request with Date Filter:

GET /api/v1/device_app_access_devices/?last_change__gte=2024-01-01T00:00:00Z&limit=20

Example Response:

{
  "count": 25,
  "next": "https://gate.zequenze.com/api/v1/device_app_access_devices/?limit=10&offset=10",
  "previous": null,
  "results": [
    {
      "id": 1,
      "device_name": "Main Entrance Reader",
      "device_id": "ACR-001",
      "location": "Building A - Main Entrance",
      "device_type": "card_reader",
      "status": "online",
      "last_change": "2024-01-15T14:30:00Z",
      "ip_address": "192.168.1.101",
      "firmware_version": "2.1.4",
      "access_permissions": [
        {
          "user_id": 123,
          "access_level": "standard",
          "valid_from": "2024-01-01T00:00:00Z",
          "valid_until": "2024-12-31T23:59:59Z"
        }
      ]
    },
    {
      "id": 2,
      "device_name": "Executive Floor Scanner",
      "device_id": "BIO-002",
      "location": "Building A - Floor 10",
      "device_type": "biometric_scanner",
      "status": "maintenance",
      "last_change": "2024-01-14T09:15:00Z",
      "ip_address": "192.168.1.102",
      "firmware_version": "3.0.1",
      "access_permissions": [
        {
          "user_id": 456,
          "access_level": "executive",
          "valid_from": "2024-01-01T00:00:00Z",
          "valid_until": "2024-12-31T23:59:59Z"
        }
      ]
    }
  ]
}
Status Description
200 Successfully retrieved device list
400 Invalid query parameters
401 Unauthorized - invalid or missing token
403 Forbidden - insufficient permissions
500 Internal server error

Best Practices

  • Pagination: Use limit and offset parameters for large datasets to improve performance
  • Date Filtering: Use the last_change__gte parameter to retrieve only recently updated devices
  • Rate Limiting: Implement exponential backoff if you encounter 429 status codes
  • Error Handling: Always check the response status and handle authentication errors gracefully
  • Caching: Consider caching device data locally and use date filters to sync changes
  • Monitoring: Track device status changes to identify maintenance needs or connectivity issues