openapi: 3.0.0
info:
  title: Remote Logger
  description: The Remote Logger APIs provide access to log data captured from your application in production. Use these APIs to retrieve raw log entries with full contextual details, or a summarized view of log message frequency. Logs can be filtered by date range, platform, log level, device, user, and more. Remote Logger supports all major platforms and respects PII (Personally Identifiable Information) access controls via the includePII parameter.
  contact: {}
  version: 1.0.0
servers:
  - url: https://apptics.zoho.com/cx/api/v1
    description: API Endpoint
tags:
  - name: remote-logger
    description: Remote Logger Module
paths:
  /remoteLogs:
    get:
      tags:
        - remote-logger
      summary: Get remote logs
      description: Retrieves raw log entries captured from your application for the specified date range. Supports filtering by platform, log level, function name, log message, device model, user, and customer group. Returns paginated results with full contextual information per log entry including device details, session data, and geographic information.
      parameters:
        - $ref: '#/components/parameters/zsoid'
        - $ref: '#/components/parameters/projectid'
        - $ref: '#/components/parameters/mode'
        - $ref: '#/components/parameters/startdate'
        - $ref: '#/components/parameters/enddate'
        - $ref: '#/components/parameters/platform'
        - $ref: '#/components/parameters/functionName'
        - $ref: '#/components/parameters/logMessage'
        - $ref: '#/components/parameters/level'
        - $ref: '#/components/parameters/deviceModel'
        - $ref: '#/components/parameters/offset'
        - $ref: '#/components/parameters/limit'
        - $ref: '#/components/parameters/user'
        - $ref: '#/components/parameters/userGroup'
        - $ref: '#/components/parameters/deviceID'
        - $ref: '#/components/parameters/includePII'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/remote_logs_response'
              examples:
                success:
                  summary: Successful response
                  value:
                    result: success
                    data:
                      data:
                        - linenumber: '42'
                          country: United States
                          level: Info
                          logmessage: User login successful
                          appversion: 2.1.0
                          userid: '100000000000001'
                          deviceid: '200000000000001'
                          platform: Android
                          filename: AuthManager.kt
                          apprelversion: 2.1.3
                          function: authenticateUser
                          sessionstarttime: '1751132723264'
                          model: Pixel 6
                          osversion: Android 14
                          logtime: '1751132723264'
                          customergroupid: '0'
                        - linenumber: '87'
                          country: Germany
                          level: Warning
                          logmessage: Network request timeout
                          appversion: 2.0.0
                          userid: '100000000000002'
                          deviceid: '200000000000002'
                          platform: iOS
                          filename: NetworkService.swift
                          apprelversion: 2.0.5
                          function: fetchData
                          sessionstarttime: '1751132721987'
                          model: iPhone 14
                          osversion: iOS 17
                          logtime: '1751132721987'
                          customergroupid: '0'
                        - linenumber: '15'
                          country: India
                          level: Error
                          logmessage: Failed to load cached data
                          appversion: 2.1.0
                          userid: '100000000000003'
                          deviceid: '200000000000003'
                          platform: Android
                          filename: CacheManager.kt
                          apprelversion: 2.1.3
                          function: loadCache
                          sessionstarttime: '1751132720137'
                          model: Samsung Galaxy S21
                          osversion: Android 13
                          logtime: '1751132720137'
                          customergroupid: '0'
                      isNextIndexAvailable: 'false'
                    status: 2000
                failure:
                  summary: Failure response
                  value:
                    result: failure
                    data: Exception Occured
                    status: 3000
      security:
        - Zoho_Auth:
            - JProxy.jmobileapi.ALL
  /logsSummary:
    get:
      tags:
        - remote-logger
      summary: Get log summary
      description: Retrieves a summarized view of log data, providing the occurrence count of each unique log message for the specified date range. Useful for identifying the most frequent log messages and spotting recurring issues. Supports the same filtering options as the raw logs API. Results are ordered by count in descending order.
      parameters:
        - $ref: '#/components/parameters/zsoid'
        - $ref: '#/components/parameters/projectid'
        - $ref: '#/components/parameters/mode'
        - $ref: '#/components/parameters/startdate'
        - $ref: '#/components/parameters/enddate'
        - $ref: '#/components/parameters/platform'
        - $ref: '#/components/parameters/functionName'
        - $ref: '#/components/parameters/logMessage'
        - $ref: '#/components/parameters/level'
        - $ref: '#/components/parameters/deviceModel'
        - $ref: '#/components/parameters/offset'
        - $ref: '#/components/parameters/limit'
        - $ref: '#/components/parameters/user'
        - $ref: '#/components/parameters/userGroup'
        - $ref: '#/components/parameters/deviceID'
        - $ref: '#/components/parameters/includePII'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/logs_summary_response'
              examples:
                success:
                  summary: Successful response
                  value:
                    result: success
                    data:
                      data:
                        - logmessage: User login successful
                          count: 39
                        - logmessage: Network request timeout
                          count: 27
                        - logmessage: Failed to load cached data
                          count: 26
                        - logmessage: Session expired
                          count: 14
                        - logmessage: Push notification received
                          count: 11
                    status: 2000
                failure:
                  summary: Failure response
                  value:
                    result: failure
                    data: Exception Occured
                    status: 3000
      security:
        - Zoho_Auth:
            - JProxy.jmobileapi.ALL
components:
  parameters:
    zsoid:
      name: zsoid
      description: Portal ID
      in: header
      required: true
      schema:
        type: string
      example: '10234695'
    projectid:
      name: projectid
      description: Project ID
      in: header
      required: true
      schema:
        type: string
      example: '12345689'
    mode:
      name: mode
      description: Environment mode filter. 0 for development, 1 for production.
      in: query
      required: true
      schema:
        type: integer
      example: 1
    startdate:
      name: startdate
      description: 'Beginning of date range. Required format: dd-MM-yyyy.'
      in: query
      required: true
      schema:
        type: string
      example: 01-07-2024
    enddate:
      name: enddate
      description: 'End of date range. Required format: dd-MM-yyyy.'
      in: query
      required: true
      schema:
        type: string
      example: 31-07-2024
    platform:
      name: platform
      description: 'Filter by platform. Allowed values: iOS, Android, Windows, tvOS, watchOS, macOS.'
      in: query
      required: false
      schema:
        type: string
      example: Android
    functionName:
      name: functionName
      description: Filter logs by the function or method name where the log was recorded.
      in: query
      required: false
      schema:
        type: string
      example: authenticateUser
    logMessage:
      name: logMessage
      description: Filter logs by a specific log message string.
      in: query
      required: false
      schema:
        type: string
      example: Network request timeout
    level:
      name: level
      description: 'Filter logs by severity level. Allowed values: 1 - Verbose, 2 - Debug, 3 - Info, 4 - Warning, 5 - Error.'
      in: query
      required: false
      schema:
        type: integer
        enum:
          - 1
          - 2
          - 3
          - 4
          - 5
      example: 3
    deviceModel:
      name: deviceModel
      description: Filter logs by device model name.
      in: query
      required: false
      schema:
        type: string
      example: Pixel 6
    offset:
      name: offset
      description: 'Pagination offset. Default: 0.'
      in: query
      required: false
      schema:
        type: integer
      example: 0
    limit:
      name: limit
      description: 'Number of records per page. Default: 500.'
      in: query
      required: false
      schema:
        type: integer
      example: 500
    user:
      name: user
      description: Filter logs by user identifier (e.g., email address, phone number, or custom user ID).
      in: query
      required: false
      schema:
        type: string
      example: user@example.com
    userGroup:
      name: userGroup
      description: Filter logs by customer group name.
      in: query
      required: false
      schema:
        type: string
      example: beta-testers
    deviceID:
      name: deviceID
      description: Filter logs by Apptics device ID.
      in: query
      required: false
      schema:
        type: integer
        format: int64
      example: 200000000000001
    includePII:
      name: includePII
      description: 'Whether to include Personally Identifiable Information (PII) in the response. Default: false.'
      in: query
      required: false
      schema:
        type: boolean
      example: false
  schemas:
    remote_logs_response:
      type: object
      properties:
        result:
          type: string
          example: success
        data:
          type: object
          properties:
            data:
              type: array
              description: List of raw log entries matching the specified filters
              items:
                type: object
                properties:
                  linenumber:
                    type: string
                    description: Line number in the source file where the log was recorded
                    example: '42'
                  country:
                    type: string
                    description: Country from which the log was sent
                    example: United States
                  level:
                    type: string
                    description: Log severity level (Verbose, Debug, Info, Warning, Error)
                    example: Info
                  logmessage:
                    type: string
                    description: The log message content
                    example: User login successful
                  appversion:
                    type: string
                    description: App version from which the log was sent
                    example: 2.1.0
                  userid:
                    type: string
                    description: User identifier associated with the log entry
                    example: '100000000000001'
                  deviceid:
                    type: string
                    description: Apptics device identifier
                    example: '200000000000001'
                  platform:
                    type: string
                    description: Platform from which the log was sent
                    example: Android
                  filename:
                    type: string
                    description: Source file name where the log was recorded
                    example: AuthManager.kt
                  apprelversion:
                    type: string
                    description: App release version string
                    example: 2.1.3
                  function:
                    type: string
                    description: Function or method name where the log was recorded
                    example: authenticateUser
                  sessionstarttime:
                    type: string
                    description: Epoch timestamp (ms) when the session started
                    example: '1751132723264'
                  model:
                    type: string
                    description: Device model name
                    example: Pixel 6
                  osversion:
                    type: string
                    description: OS version of the device
                    example: Android 14
                  logtime:
                    type: string
                    description: Epoch timestamp (ms) when the log was recorded
                    example: '1751132723264'
                  customergroupid:
                    type: string
                    description: Customer group identifier associated with the user
                    example: '0'
            isNextIndexAvailable:
              type: string
              description: Indicates whether more records are available for the next page. Pass incremented offset to retrieve the next page.
              example: 'false'
        status:
          type: integer
          example: 2000
    logs_summary_response:
      type: object
      properties:
        result:
          type: string
          example: success
        data:
          type: object
          properties:
            data:
              type: array
              description: List of log messages with their occurrence counts, ordered by count descending
              items:
                type: object
                properties:
                  logmessage:
                    type: string
                    description: The log message content
                    example: User login successful
                  count:
                    type: integer
                    description: Number of times this log message was recorded in the specified date range
                    example: 39
        status:
          type: integer
          example: 2000
  securitySchemes:
    Zoho_Auth:
      type: oauth2
      flows:
        implicit:
          authorizationUrl: https://accounts.zoho.com/oauth/v2/auth
          scopes:
            JProxy.jmobileapi.ALL: Analytics & Insight view
