Skip to content

Latest commit

 

History

History
446 lines (294 loc) · 14.6 KB

StatisticsApi.md

File metadata and controls

446 lines (294 loc) · 14.6 KB

Sendbird.StatisticsApi

All URIs are relative to https://api-APP_ID.sendbird.com

Method HTTP request Description
getDetailedOpenRateOfAnnouncementById GET /v3/announcement_open_rate/{unique_id} Get detailed open rate of an announcement
getDetailedOpenStatusOfAnnouncementById GET /v3/announcement_open_status/{unique_id} Get detailed open status of an announcement
retrieveAdvancedAnalyticsMetrics GET /v3/statistics/metric Retrieve Advanced analytics metrics
viewNumberOfConcurrentConnections GET /v3/applications/ccu View number of concurrent connections
viewNumberOfDailyActiveUsers GET /v3/applications/dau View number of daily active users
viewNumberOfMonthlyActiveUsers GET /v3/applications/mau View number of monthly active users
viewNumberOfPeakConnections GET /v3/applications/peak_connections View number of peak connections

getDetailedOpenRateOfAnnouncementById

GetDetailedOpenRateOfAnnouncementByIdResponse getDetailedOpenRateOfAnnouncementById()

Get detailed open rate of an announcement Retrieves the detailed open rate information of an announcement. https://sendbird.com/docs/chat/v3/platform-api/guides/announcements#2-get-detailed-open-rate-of-an-announcement ---------------------------- unique_id Type: string Description: Specifies the unique ID of the announcement to get its open rate.

Example

import { Sendbird } from 'sendbird-platform-sdk';
import * as fs from 'fs';

const configuration = Sendbird.createConfiguration();
const apiInstance = new Sendbird.StatisticsApi(configuration);

let body:Sendbird.StatisticsApiGetDetailedOpenRateOfAnnouncementByIdRequest = {
  // string
  uniqueId: "unique_id_example",
  // string (optional)
  apiToken: "{{API_TOKEN}}",
};

apiInstance.getDetailedOpenRateOfAnnouncementById(body).then((data:any) => {
  console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));

Parameters

Name Type Description Notes
uniqueId [string] defaults to undefined
apiToken [string] (optional) defaults to undefined

Return type

GetDetailedOpenRateOfAnnouncementByIdResponse

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Successful response -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

getDetailedOpenStatusOfAnnouncementById

GetDetailedOpenStatusOfAnnouncementByIdResponse getDetailedOpenStatusOfAnnouncementById()

Get detailed open status of an announcement Retrieves the detailed open status information of a specific announcement. https://sendbird.com/docs/chat/v3/platform-api/guides/announcements#2-get-detailed-open-status-of-an-announcement ----------------------------

Example

import { Sendbird } from 'sendbird-platform-sdk';
import * as fs from 'fs';

const configuration = Sendbird.createConfiguration();
const apiInstance = new Sendbird.StatisticsApi(configuration);

let body:Sendbird.StatisticsApiGetDetailedOpenStatusOfAnnouncementByIdRequest = {
  // string
  uniqueId: "unique_id_example",
  // string (optional)
  apiToken: "{{API_TOKEN}}",
  // number (optional)
  limit: 1,
  // string (optional)
  next: "next_example",
  // Array<string> (optional)
  uniqueIds: [
    "unique_ids_example",
  ],
  // Array<string> (optional)
  channelUrls: [
    "channel_urls_example",
  ],
  // boolean (optional)
  hasOpened: true,
};

apiInstance.getDetailedOpenStatusOfAnnouncementById(body).then((data:any) => {
  console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));

Parameters

Name Type Description Notes
uniqueId [string] defaults to undefined
apiToken [string] (optional) defaults to undefined
limit [number] (optional) defaults to undefined
next [string] (optional) defaults to undefined
uniqueIds Array<string> (optional) defaults to undefined
channelUrls Array<string> (optional) defaults to undefined
hasOpened [boolean] (optional) defaults to undefined

Return type

GetDetailedOpenStatusOfAnnouncementByIdResponse

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Successful response -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

retrieveAdvancedAnalyticsMetrics

RetrieveAdvancedAnalyticsMetricsResponse retrieveAdvancedAnalyticsMetrics()

Retrieve Advanced analytics metrics Retrieves Advanced analytics metrics based on the specified parameters. You can retrieve either daily or monthly metrics using the time_dimension parameter. >Note: Daily metrics are calculated and updated every three hours, starting at 1 a.m. in UTC. Meanwhile, monthly metrics are calculated after the last day of the month. https://sendbird.com/docs/chat/v3/platform-api/guides/advanced-analytics#2-retrieve-advanced-analytics-metrics ----------------------------

Example

import { Sendbird } from 'sendbird-platform-sdk';
import * as fs from 'fs';

const configuration = Sendbird.createConfiguration();
const apiInstance = new Sendbird.StatisticsApi(configuration);

let body:Sendbird.StatisticsApiRetrieveAdvancedAnalyticsMetricsRequest = {
  // string (optional)
  apiToken: "{{API_TOKEN}}",
};

apiInstance.retrieveAdvancedAnalyticsMetrics(body).then((data:any) => {
  console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));

Parameters

Name Type Description Notes
apiToken [string] (optional) defaults to undefined

Return type

RetrieveAdvancedAnalyticsMetricsResponse

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Successful response -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

viewNumberOfConcurrentConnections

ViewNumberOfConcurrentConnectionsResponse viewNumberOfConcurrentConnections()

View number of concurrent connections Retrieves the number of devices and opened browser tabs which are currently connected to Sendbird server. https://sendbird.com/docs/chat/v3/platform-api/guides/application#2-view-number-of-concurrent-connections

Example

import { Sendbird } from 'sendbird-platform-sdk';
import * as fs from 'fs';

const configuration = Sendbird.createConfiguration();
const apiInstance = new Sendbird.StatisticsApi(configuration);

let body:Sendbird.StatisticsApiViewNumberOfConcurrentConnectionsRequest = {
  // string (optional)
  apiToken: "{{API_TOKEN}}",
};

apiInstance.viewNumberOfConcurrentConnections(body).then((data:any) => {
  console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));

Parameters

Name Type Description Notes
apiToken [string] (optional) defaults to undefined

Return type

ViewNumberOfConcurrentConnectionsResponse

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Successful response -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

viewNumberOfDailyActiveUsers

ViewNumberOfDailyActiveUsersResponse viewNumberOfDailyActiveUsers()

View number of daily active users Retrieves the number of daily active users of the application (DAU). https://sendbird.com/docs/chat/v3/platform-api/guides/application#2-view-number-of-daily-active-users ----------------------------

Example

import { Sendbird } from 'sendbird-platform-sdk';
import * as fs from 'fs';

const configuration = Sendbird.createConfiguration();
const apiInstance = new Sendbird.StatisticsApi(configuration);

let body:Sendbird.StatisticsApiViewNumberOfDailyActiveUsersRequest = {
  // string (optional)
  apiToken: "{{API_TOKEN}}",
  // string (optional)
  date: "date_example",
};

apiInstance.viewNumberOfDailyActiveUsers(body).then((data:any) => {
  console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));

Parameters

Name Type Description Notes
apiToken [string] (optional) defaults to undefined
date [string] (optional) defaults to undefined

Return type

ViewNumberOfDailyActiveUsersResponse

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Successful response -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

viewNumberOfMonthlyActiveUsers

ViewNumberOfMonthlyActiveUsersResponse viewNumberOfMonthlyActiveUsers()

View number of monthly active users Retrieves the number of monthly active users of the application (MAU). https://sendbird.com/docs/chat/v3/platform-api/guides/application#2-view-number-of-monthly-active-users ----------------------------

Example

import { Sendbird } from 'sendbird-platform-sdk';
import * as fs from 'fs';

const configuration = Sendbird.createConfiguration();
const apiInstance = new Sendbird.StatisticsApi(configuration);

let body:Sendbird.StatisticsApiViewNumberOfMonthlyActiveUsersRequest = {
  // string (optional)
  apiToken: "{{API_TOKEN}}",
  // string (optional)
  date: "date_example",
};

apiInstance.viewNumberOfMonthlyActiveUsers(body).then((data:any) => {
  console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));

Parameters

Name Type Description Notes
apiToken [string] (optional) defaults to undefined
date [string] (optional) defaults to undefined

Return type

ViewNumberOfMonthlyActiveUsersResponse

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Successful response -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

viewNumberOfPeakConnections

ViewNumberOfPeakConnectionsResponse viewNumberOfPeakConnections()

View number of peak connections Retrieves the number of concurrently connected devices to Sendbird server during the requested time period. https://sendbird.com/docs/chat/v3/platform-api/guides/application#2-view-number-of-peak-connections ----------------------------

Example

import { Sendbird } from 'sendbird-platform-sdk';
import * as fs from 'fs';

const configuration = Sendbird.createConfiguration();
const apiInstance = new Sendbird.StatisticsApi(configuration);

let body:Sendbird.StatisticsApiViewNumberOfPeakConnectionsRequest = {
  // string
  timeDimension: "time_dimension_example",
  // number
  startYear: 1,
  // number
  startMonth: 1,
  // number
  endYear: 1,
  // number
  endMonth: 1,
  // string (optional)
  apiToken: "{{API_TOKEN}}",
  // number (optional)
  startDay: 1,
  // number (optional)
  endDay: 1,
};

apiInstance.viewNumberOfPeakConnections(body).then((data:any) => {
  console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));

Parameters

Name Type Description Notes
timeDimension [string] defaults to undefined
startYear [number] defaults to undefined
startMonth [number] defaults to undefined
endYear [number] defaults to undefined
endMonth [number] defaults to undefined
apiToken [string] (optional) defaults to undefined
startDay [number] (optional) defaults to undefined
endDay [number] (optional) defaults to undefined

Return type

ViewNumberOfPeakConnectionsResponse

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Successful response -

[Back to top] [Back to API list] [Back to Model list] [Back to README]