Reporting API gives you access to different type of Reports for CDR and Usage Summary with many filter options.

Table of Contents

Get Video CDR

This API is used to get Video CDR Usage Report across of all or selected projects.

  • API Route: https://api.enablex.io/cpaas/video-cdr
  • HTTP Request: GET
  • Access Mechanism: HTTP Basic Authentication
  • Role Based Accessibility: All
    • Admin (Access to projects against any customer)
    • Customer (Access to own projects)

Headers Explanation:

  • Content-Type: To have application/json.
  • Authorization: To have Token Access Information.

Response Example:

{
  "result": "1",
  "cdr": [
    {
      "app_id": "xyzxyzxyz",
      "customer_id": "xyzxyzxyz",
      "cdr_id": "xyzxyzxyz",
      "trans_date": "YYYY-MM-DDTHH:II:SS.mmmZ",
      "conf_num": "XXX",
      "call_num": "XXX",
      "call_log_id": "XXX",
      "room": {
        "room_id": "XXXX",
        "connect_dt": "YYYY-MM-DDTHH:II:SS.mmmZ",
        "disconnect_dt": "YYYY-MM-DDTHH:II:SS.mmmZ",
        "duration": 9999.999,
        "price": 9999.999
      },
      "user": {
        "ip": "1.1.1.1",
        "name": "",
        "role": "moderator",
        "ref": "",
        "agent": "okhttp/3.5.0",
        "token": "",
        "confName": ""
      },
      "sigserver": {
        "connect_dt": "YYYY-MM-DDTHH:II:SS.mmmZ",
        "ip": "",
        "disconnect_dt": "YYYY-MM-DDTHH:II:SS.mmmZ",
        "duration": 9999.999,
        "hold_duration": 9.999
      },
      "usage": {
        "subscribed_minutes": 9999.999,
        "published_minutes": 9999.999
      }
    }
  ]
}

Response Explanation (Only for important Object and Keys) :

Object/KeyDescription
cdrArray of Objects. Each Object contains CDR for single User Connection
cdr.app_id To search CDR for a project
cdr.customer_id To search CDR for a customer
cdr.call_log_idUnique Log ID helps to retrieve logs for audit
cdr.roomArray of Objects
cdr.room.room_id To search CDR for a room
cdr.userArray of Objects
cdr.user_ipTo search CDR for an IP
cdr.usage Array of Objects
cdr.usage.subscribed_minutes Subscribed minutes
cdr.usage.published_minutes Published minutes

Error Codes

Code Description
1004Invalid Customer ID
1007 Invalid App ID
1101Invalid page. Number. Range: 1+
1102Invalid page_num. Number. Range: 1+
1105Invalid order_qualify. Enumerated Data: asc, desc

Get Video Usage Summary

This API is used to get Video Usage Summary Report across of all or selected projects / customers.

  • API Route: https://api.enablex.io/cpaas/video-usage-summary
  • API Route: https://api.enablex.io/cpaas/video-usage-summary?page={{$PAGE_NUM}}&group_by=project
  • HTTP Request: GET
  • Access Mechanism: HTTP Basic Authentication
  • Role Based Accessibility; All
    • Admin (Access to projects against any customer)
    • Customer (Access to own projects)

Headers Explanation:

  • Content-Type: To have application/json.
  • Authorization: To have Token Access Information

Response Example: Group by Customer

{
  "result": "1",
  "report": [
    {
      "customer_id": "String",
      "customer_name": "String",
      "video_minutes": {
        "minutes": 9999.999,
        "price": 9999.999
      },
      "recording": {
        "minutes": 9999.999,
        "size": 9999.999,
        "price": 9999.999
      },
      "live_recording": {
        "minutes": 9999.999,
        "size": 9999.999,
        "price": 9999.999
      },
      "transcoding ": {
        "minutes": 9999.999,
        "size": 9999.999,
        "price": 9999.999
      },
      "live_streaming ": {
        "minutes": 9999.999,
        "price": 9999.999
      }
    }
  ]
}

Response Example: Group by Project

{
  "result": "1",
  "report": [
    {
      "app_id": "String",
      "app_name": "String",
      "video_minutes": {
        "minutes": 9999.999,
        "price": 9999.999
      },
      "recording": {
        "minutes": 9999.999,
        "size": 9999.999,
        "price": 9999.999
      },
      "live_recording": {
        "minutes": 9999.999,
        "size": 9999.999,
        "price": 9999.999
      },
      "transcoding ": {
        "minutes": 9999.999,
        "size": 9999.999,
        "price": 9999.999
      },
      "live_streaming ": {
        "minutes": 9999.999,
        "price": 9999.999
      }
    }
  ]
}

Response Explanation (Only for important Object and Keys) :

Object/KeyDescription
reportArray of Objects.
report.app_idTo search video usage summary for a project
report.app_name To search video usage summary for a project
report.recording Object. It contains the recording information which is queried
report.live_recordingObject. It contains the live recording information which is queried
report.transcoding Object. It contains the transcoding information which is queried
report.live_streaming Object. It contains the live streaming information which is queried

Error Codes

Code Description
1101Invalid page. Number. Range: 1+
1102Invalid page_num. Number. Range: 1+