feat: allow querying reporting events via the API (#12832)

This commit is contained in:
Shivam Mishra
2025-11-13 12:46:55 +05:30
committed by GitHub
parent f455e7994e
commit 4f09c2203c
22 changed files with 1373 additions and 5 deletions

View File

@@ -248,3 +248,9 @@ contact_conversations_response:
$ref: ./resource/contact_conversations_response.yml
contactable_inboxes_response:
$ref: ./resource/contactable_inboxes_response.yml
reporting_event:
$ref: ./resource/reporting_event.yml
reporting_event_meta:
$ref: ./resource/reporting_event_meta.yml
reporting_events_list_response:
$ref: ./resource/reporting_events_list_response.yml

View File

@@ -0,0 +1,47 @@
type: object
properties:
id:
type: number
description: ID of the reporting event
name:
type: string
description: Name of the event (e.g., first_response, resolution, reply_time)
value:
type: number
format: double
description: Value of the metric in seconds
value_in_business_hours:
type: number
format: double
description: Value of the metric in seconds, calculated only for business hours
event_start_time:
type: string
format: date-time
description: The timestamp when the event started
event_end_time:
type: string
format: date-time
description: The timestamp when the event ended
account_id:
type: number
description: ID of the account
conversation_id:
type: number
nullable: true
description: ID of the conversation
inbox_id:
type: number
nullable: true
description: ID of the inbox
user_id:
type: number
nullable: true
description: ID of the user/agent
created_at:
type: string
format: date-time
description: The timestamp when the reporting event was created
updated_at:
type: string
format: date-time
description: The timestamp when the reporting event was last updated

View File

@@ -0,0 +1,11 @@
type: object
properties:
count:
type: integer
description: Total number of reporting events
current_page:
type: integer
description: Current page number
total_pages:
type: integer
description: Total number of pages

View File

@@ -0,0 +1,10 @@
type: object
properties:
meta:
$ref: '#/components/schemas/reporting_event_meta'
description: Metadata about the reporting events list response
payload:
type: array
items:
$ref: '#/components/schemas/reporting_event'
description: List of reporting events