Skip to main content

Device App Register

The Device App Register andAPI manage deviceenables applications into register themselves with the backend system. This endpoint is typically used during app initialization or onboarding processes to establish a connection between client applications and the server infrastructure.

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

Authentication: All endpoints require a Bearer token:

Authorization: Bearer <your-api-token>

Overview

The Device App Register API category provides functionality for applications to register themselves with the backend system. This is a crucial step in the application lifecycle that establishes the connection between client applications (mobile apps, desktop software, IoT devices, etc.) and the server infrastructure.

When an application starts up for the first time or needs to re-establish its connection with the backend, it uses this registration endpoint to:

    Authenticate the application with the server Provide device/application metadata for tracking and management Receive configuration data or tokens for future API calls Enable the backend to track and manage connected applications

    This registration process is essential for applications that need to maintain persistent connections or receive push notifications, updates, or other server-initiated communications. The registration data helps administrators monitor connected applications and manage device policies across their infrastructure.


    Endpoints

    POST /device_app_register/

    RegisterDescription: Registers a new application instance with the device backend system. This endpoint allowsaccepts youapplication metadata and device information to associateestablish ana registered session between the client application withand the server. Use this endpoint when your application starts up for the first time, after a devicefresh installation, or when re-establishing connection after extended offline periods.

    Use Cases:

      Initial app registration during first-time setup Re-registration after app reinstallation or major updates Establishing connection for trackingIoT anddevices managementjoining purposes.the network Registering applications that need to receive push notifications or real-time updates

      Full URL Example:

      https://gate.zequenze.com/api/v1/device_app_register/
      

      Parameters:

      Parameter Type In Required Description
      data string body Yes JSON string containing application and device registration datainformation including app version, device type, platform details, and unique identifiers

      ExamplecURL Request:Example:

      curl -X POST "https://gate.zequenze.com/api/v1/device_app_register/" \
        -H "Authorization: Bearer YOUR_API_TOKEN" \
        -H "Content-Type: application/jsonjson" Authorization:\
        Bearer-d <your-api-token>
      
      '{
          "data"app_name": "{\MyMobileApp",
          "device_id\app_version": "2.1.0",
          "platform":\ "device_12345\iOS",
          "device_id": "ABC123-DEF456-GHI789",\
          "app_name\device_model": "iPhone 14 Pro",
          "os_version":\ "MyApplication\16.4.1",
          "push_token": "fcm_token_abc123def456",\
          "app_version\installation_id": ":\"1.0.0\",\"platform\":\"android\",\"installation_date\":\"2024-01-15T10:30:00Z\"}"unique-install-uuid-here"
        }'
      

      Example Response:

      {
        "id"registration_id": "app_reg_67890"reg_12345abcdef",
        "device_id"status": "device_12345"registered",
        "app_name"app_config": {
          "api_refresh_interval": 300,
          "push_enabled": true,
          "feature_flags": {
            "new_dashboard": true,
            "beta_features": false
          }
        },
        "device_token": "MyApplication"device_token_xyz789",
        "app_version": "1.0.0",
        "platform": "android",
        "registration_status": "active",
        "created_at"registration_timestamp": "2024-01-15T10:30:00Z",
        "expires_at": "2024-07-15T10:30:00Z"
      }
      

      Response Status Codes:

      Status Description
      201 Created - Application successfully registered
      400 Bad Request - Invalid requestregistration data or malformed JSONformat
      401 Unauthorized - invalidInvalid or missing authentication token
      422409 Validation errorConflict - missingApplication requiredalready fieldsregistered with this device ID
      500429 InternalToo serverMany errorRequests - Registration rate limit exceeded

      Common Use Cases

      Use Case 1: Mobile App First Launch

      When a user installs and opens your mobile application for the first time, call this endpoint to register the app instance. Include the device's unique identifier, push notification token, and app version to enable full functionality.

      Use Case 2: IoT Device Onboarding

      For IoT devices joining your network, use this endpoint during the initial setup process to register the device with your backend system. This enables remote monitoring, configuration updates, and command delivery.

      Use Case 3: Application Re-authentication

      After major app updates or when authentication tokens expire, re-register the application to refresh credentials and receive updated configuration settings.

      Use Case 4: Multi-Device User Accounts

      When users install your app on multiple devices, register each device separately to enable device-specific notifications and track usage across different platforms.


      Best Practices

      • DataInclude FormatUnique Identifiers: EnsureAlways provide stable, unique device identifiers that persist across app restarts but change on reinstallation for privacy compliance
      Handle Registration Expiry: Monitor the dataexpires_at parameterfield containsin properlyresponses escapedand JSONre-register stringbefore expiration to maintain uninterrupted service Implement Retry Logic: Network issues during registration are common; implement exponential backoff retry logic with allreasonable requiredlimits Secure Data Transmission: Never include sensitive user data in registration payloads; focus on device and application detailsmetadata only Rate Limiting Awareness: Respect registration rate limits to avoid temporary blocks; cache successful registration responses locally Version Tracking: Always include current app version in registration data to enable backend compatibility checks and update notifications Error Handling: AlwaysGracefully checkhandle theregistration response status codefailures and handleprovide validationfallback errorsfunctionality appropriatelywhen possible, Uniquebut Registration:ensure Verifycore thatfeatures therequiring sameregistration applicationare isn'tproperly registered multiple times for the same device Version Tracking: Include accurate version information to help with application lifecycle management Platform Specification: Use standardized platform identifiers (e.g., "android", "ios", "windows") for consistencygated