Skip to main content

Txlog Portal

The Transaction Log Portal API provides access to detailed transaction logs for Portal services, enabling developers to retrieve, filter, and analyze user authentication activities, session events, and system interactions. This endpoint is essential for monitoring user behavior, debugging authentication issues, and generating compliance reports.

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

Authentication: All endpoints require a Bearer token:

Authorization: Bearer <your-api-token>

Overview

The Transaction Log Portal API allows you to access comprehensive logs of all Portal-related transactions within your organization. These logs capture a wide range of activities including user authentication, login/logout events, session management, payment processing, and system triggers.

Key Features:

  • Comprehensive Filtering: Filter logs by transaction type, date range, user, location, and access point
  • Real-time Monitoring: Access up-to-date transaction logs for live monitoring
  • Audit Trail: Maintain detailed records for compliance and security auditing
  • Pagination Support: Efficiently handle large datasets with cursor-based pagination

Common Use Cases:

  • Security monitoring and incident investigation
  • User behavior analysis and reporting
  • Compliance auditing and documentation
  • Troubleshooting authentication and session issues
  • Performance monitoring of Portal services

The transaction logs include 26 different transaction types, from basic authentication (ua) and login events (ui) to advanced features like payment processing (pp) and email validation (ve). Each log entry provides detailed context including user information, location data, timestamps, and status codes.


Endpoints

GET /txlog_portal/

Description: Retrieves a paginated list of Portal transaction logs with comprehensive filtering options. This endpoint is the primary method for accessing historical transaction data, monitoring real-time activities, and generating reports for security, compliance, or analytical purposes.

Use Cases:

  • Monitor failed authentication attempts for security analysis
  • Generate compliance reports for specific date ranges
  • Track user activity patterns across different locations
  • Debug authentication issues for specific users or access points
  • Analyze system performance and identify bottlenecks

Full URL Example:

https://gate.zequenze.com/api/v1/txlog_portal/?type=ui&start_date=2024-01-01&end_date=2024-01-31&limit=50

Parameters:

Parameter Type In Required Description
type string query No Filter by transaction type. Options include: ua (Authenticate), ui (Login), ue (Re-authenticate), uo (Logout), uc (User capture), ur (User registration), uu (User update), un (User activation), up (Password change), um (User activated API), ai (Auto-login), aa (Auto-authenticate), st (Session timeout), si (Idle timeout), di (Disconnect), tg (Pre-login trigger), ti (Post-login trigger), to (Post-logout trigger), te (Pre-registration trigger), tr (Post-registration trigger), tp (Pre-update trigger), tu (Post-update trigger), ve (Email validation), vt (Telephone validation), pp (Payment process), zz (Service test)
start_date string query No Filter transactions from this date/time. Supports ISO format: 2000-01-01, 2000-01-01 00:01:00, 2000-01-01 00:01:00+00:00
end_date string query No Filter transactions until this date/time. Supports ISO format: 2000-01-01, 2000-01-01 00:01:00, 2000-01-01 00:01:00+00:00
user integer query No Filter transactions by specific user ID
page integer query No Filter transactions by specific page ID
access_point integer query No Filter transactions by specific access point ID
location integer query No Filter transactions by specific location ID
cursor string query No Pagination cursor for retrieving next/previous page results
limit integer query No Number of results to return per page (default pagination applies if not specified)

cURL Example:

curl -X GET "https://gate.zequenze.com/api/v1/txlog_portal/?type=ui&start_date=2024-01-01&limit=25" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Content-Type: application/json"

Example Response:

{
  "next": "https://gate.zequenze.com/api/v1/txlog_portal/?cursor=eyJpZCI6MTAwfQ%3D%3D&limit=25",
  "previous": null,
  "results": [
    {
      "id": 12345,
      "datetime": "2024-01-15T14:30:25.123456Z",
      "type": "ui",
      "organization": 1,
      "source": "u",
      "status": "h200",
      "message": "User successfully authenticated",
      "service": 101,
      "service_name": "Corporate WiFi Portal",
      "authservice": 201,
      "authservice_name": "LDAP Authentication",
      "user": 5678,
      "username": "john.doe@company.com",
      "email": "john.doe@company.com",
      "external_id": "emp_12345",
      "new_user": false,
      "session_id": "sess_abc123def456",
      "external_session": "ext_sess_789xyz",
      "payment_transaction_log": null,
      "site": "portal.company.com",
      "page": 301,
      "page_url": "https://portal.company.com/login",
      "action": "li",
      "location": 401,
      "location_name": "Main Office Building A",
      "access_point": 501,
      "access_point_name": "Lobby-AP-01",
      "ssid": "CompanyGuest",
      "user_agent": 601,
      "remote_ip_addr": 192168001100,
      "captured_ip_addr": 192168001100,
      "mac_addr": 123456789012,
      "http_referer": 701
    },
    {
      "id": 12344,
      "datetime": "2024-01-15T14:28:15.987654Z",
      "type": "ua",
      "organization": 1,
      "source": "u",
      "status": "h401",
      "message": "Authentication failed - invalid credentials",
      "service": 101,
      "service_name": "Corporate WiFi Portal",
      "authservice": 201,
      "authservice_name": "LDAP Authentication",
      "user": null,
      "username": "invalid.user@company.com",
      "email": "invalid.user@company.com",
      "external_id": null,
      "new_user": false,
      "session_id": "sess_failed_auth_123",
      "external_session": null,
      "payment_transaction_log": null,
      "site": "portal.company.com",
      "page": 301,
      "page_url": "https://portal.company.com/login",
      "action": "ma",
      "location": 401,
      "location_name": "Main Office Building A",
      "access_point": 501,
      "access_point_name": "Lobby-AP-01",
      "ssid": "CompanyGuest",
      "user_agent": 602,
      "remote_ip_addr": 192168001101,
      "captured_ip_addr": 192168001101,
      "mac_addr": 123456789013,
      "http_referer": 701
    }
  ]
}

Response Codes:

Status Description
200 Success - Returns filtered transaction log data
400 Bad Request - Invalid filter parameters or date format
401 Unauthorized - Invalid or missing API token
403 Forbidden - Insufficient permissions to access transaction logs
429 Too Many Requests - Rate limit exceeded
500 Internal Server Error - Server-side processing error

Common Use Cases

Use Case 1: Security Incident Investigation

Monitor failed authentication attempts and suspicious login patterns by filtering for authentication types (ua, ui) with failed status codes (h401, h403). Combine with IP address and location data to identify potential security threats.

https://gate.zequenze.com/api/v1/txlog_portal/?type=ua&start_date=2024-01-15T00:00:00&end_date=2024-01-15T23:59:59

Use Case 2: User Activity Reporting

Generate comprehensive user activity reports by filtering transactions for specific users across date ranges. Include session data, location information, and transaction types to create detailed user journey reports.

https://gate.zequenze.com/api/v1/txlog_portal/?user=5678&start_date=2024-01-01&end_date=2024-01-31

Use Case 3: Location-Based Analytics

Analyze usage patterns across different physical locations and access points to optimize network resources and identify high-traffic areas.

https://gate.zequenze.com/api/v1/txlog_portal/?location=401&access_point=501&start_date=2024-01-01

Use Case 4: Payment Transaction Monitoring

Track payment-related transactions and their associated Portal activities for financial reconciliation and fraud detection.

https://gate.zequenze.com/api/v1/txlog_portal/?type=pp&start_date=2024-01-01

Use Case 5: System Performance Monitoring

Monitor session timeouts, disconnections, and system triggers to identify performance issues and optimize Portal configuration.

https://gate.zequenze.com/api/v1/txlog_portal/?type=st&type=si&type=di&start_date=2024-01-15

Transaction Types Reference

Code Name Description
ua Authenticate Basic authentication attempts
ui Login Successful user login events
ue Re-authenticate User re-authentication required
uo Logout User logout events
uc User capture User data capture events
ur User registration New user registration
uu User update User profile updates
un User activation User account activation
up Password change Password modification events
um User activated API API-triggered user activation
ai Auto-login Automatic login processes
aa Auto-authenticate Automatic authentication
st Session timeout Session expiration events
si Idle timeout Idle session termination
di Disconnect Manual or forced disconnections
tg Pre-login trigger Pre-login system triggers
ti Post-login trigger Post-login system triggers
to Post-logout trigger Post-logout system triggers
te Pre-registration trigger Pre-registration triggers
tr Post-registration trigger Post-registration triggers
tp Pre-update trigger Pre-update system triggers
tu Post-update trigger Post-update system triggers
ve Email validation Email verification processes
vt Telephone validation Phone number verification
pp Payment process Payment-related transactions
zz Service test System testing and diagnostics

Best Practices

  • Use Date Ranges: Always specify reasonable date ranges to avoid retrieving excessive data and improve performance
  • Implement Pagination: Use the cursor-based pagination for large datasets to prevent timeouts and memory issues
  • Filter Strategically: Combine multiple filters (type, user, location) to narrow down results effectively
  • Monitor Rate Limits: Implement proper rate limiting and retry logic to handle API quotas gracefully
  • Cache Results: Cache frequently accessed data to reduce API calls and improve application performance
  • Error Handling: Always check status codes and implement proper error handling for failed authentication attempts
  • Security: Never log or expose API tokens in client-side code or public repositories
  • Time Zones: Use ISO format with timezone information for accurate date filtering across different regions