Skip to content

Latest commit

 

History

History
554 lines (381 loc) · 17.8 KB

ReportApi.md

File metadata and controls

554 lines (381 loc) · 17.8 KB

Sendbird.ReportApi

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

Method HTTP request Description
listReports GET /v3/report List reports
listReportsOnChannelByUrl GET /v3/report/{channel_type}/{channel_url} List reports on a channel
listReportsOnMessageById GET /v3/report/{channel_type}/{channel_url}/messages/{message_id} List reports on a message
listReportsOnUserById GET /v3/report/users/{offending_user_id} List reports on a user
reportChannelByUrl POST /v3/report/{channel_type}/{channel_url} Report a channel
reportMessageById POST /v3/report/{channel_type}/{channel_url}/messages/{message_id} Report a message
reportUserById POST /v3/report/users/{offending_user_id} Report a user
viewModeratedMessageById GET /v3/report/{channel_type}/{channel_url}/profanity_messages/{message_id} View a moderated message

listReports

ListReportsResponse listReports()

List reports Retrieves a list of reports within an application regardless of object types. https://sendbird.com/docs/chat/v3/platform-api/guides/report-content-and-subject#2-list-reports ----------------------------

Example

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

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

let body:Sendbird.ReportApiListReportsRequest = {
  // string (optional)
  apiToken: "{{API_TOKEN}}",
  // string (optional)
  token: "token_example",
  // number (optional)
  limit: 1,
  // number (optional)
  startTs: 1,
  // number (optional)
  endTs: 1,
};

apiInstance.listReports(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
token [string] (optional) defaults to undefined
limit [number] (optional) defaults to undefined
startTs [number] (optional) defaults to undefined
endTs [number] (optional) defaults to undefined

Return type

ListReportsResponse

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]

listReportsOnChannelByUrl

ListReportsOnChannelByUrlResponse listReportsOnChannelByUrl()

List reports on a channel Retrieves a list of reports on a channel that has offensive messages or abusive activities. https://sendbird.com/docs/chat/v3/platform-api/guides/report-content-and-subject#2-list-reports-on-a-channel ---------------------------- channel_type Type: string Description: Specifies the type of the channel. Either open_channels or group_channels. channel_url Type: string Description: Specifies the URL of the channel which is reported for offensive messages or inappropriate activities.

Example

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

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

let body:Sendbird.ReportApiListReportsOnChannelByUrlRequest = {
  // string
  channelType: "channel_type_example",
  // string
  channelUrl: "channel_url_example",
  // string (optional)
  apiToken: "{{API_TOKEN}}",
  // string (optional)
  token: "token_example",
  // number (optional)
  limit: 1,
};

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

Parameters

Name Type Description Notes
channelType [string] defaults to undefined
channelUrl [string] defaults to undefined
apiToken [string] (optional) defaults to undefined
token [string] (optional) defaults to undefined
limit [number] (optional) defaults to undefined

Return type

ListReportsOnChannelByUrlResponse

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]

listReportsOnMessageById

ListReportsOnMessageByIdResponse listReportsOnMessageById()

List reports on a message Retrieves a list of reports on a message which contains suspicious, harassing, or inappropriate content. https://sendbird.com/docs/chat/v3/platform-api/guides/report-content-and-subject#2-list-reports-on-a-message ---------------------------- channel_type Type: string Description: Specifies the type of the channel. Either open_channels or group_channels. channel_url Type: string Description: Specifies the URL of the channel where the reported message is in. message_id Type: string Description: Specifies the unique ID of the reported message.

Example

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

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

let body:Sendbird.ReportApiListReportsOnMessageByIdRequest = {
  // string
  channelType: "channel_type_example",
  // string
  channelUrl: "channel_url_example",
  // string
  messageId: "message_id_example",
  // string (optional)
  apiToken: "{{API_TOKEN}}",
  // string (optional)
  token: "token_example",
  // number (optional)
  limit: 1,
};

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

Parameters

Name Type Description Notes
channelType [string] defaults to undefined
channelUrl [string] defaults to undefined
messageId [string] defaults to undefined
apiToken [string] (optional) defaults to undefined
token [string] (optional) defaults to undefined
limit [number] (optional) defaults to undefined

Return type

ListReportsOnMessageByIdResponse

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]

listReportsOnUserById

ListReportsOnUserByIdResponse listReportsOnUserById()

List reports on a user Retrieves a list of reports on a user who sends an offensive message. https://sendbird.com/docs/chat/v3/platform-api/guides/report-content-and-subject#2-list-reports-on-a-user ---------------------------- offending_user_id Type: string Description: Specifies the unique ID of the user who has sent the message to report.

Example

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

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

let body:Sendbird.ReportApiListReportsOnUserByIdRequest = {
  // string
  offendingUserId: "offending_user_id_example",
  // string (optional)
  apiToken: "{{API_TOKEN}}",
  // string (optional)
  token: "token_example",
  // number (optional)
  limit: 1,
};

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

Parameters

Name Type Description Notes
offendingUserId [string] defaults to undefined
apiToken [string] (optional) defaults to undefined
token [string] (optional) defaults to undefined
limit [number] (optional) defaults to undefined

Return type

ListReportsOnUserByIdResponse

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]

reportChannelByUrl

ReportChannelByUrlResponse reportChannelByUrl()

Report a channel Reports a channel that has offensive messages or abusive activities. https://sendbird.com/docs/chat/v3/platform-api/guides/report-content-and-subject#2-report-a-channel ----------------------------

Example

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

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

let body:Sendbird.ReportApiReportChannelByUrlRequest = {
  // string
  channelType: "channel_type_example",
  // string
  channelUrl: "channel_url_example",
  // string (optional)
  apiToken: "{{API_TOKEN}}",
  // ReportChannelByUrlData (optional)
  reportChannelByUrlData: {
    channelType: "channelType_example",
    channelUrl: "channelUrl_example",
    reportCategory: "reportCategory_example",
    reportingUserId: "reportingUserId_example",
    reportDescription: "reportDescription_example",
  },
};

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

Parameters

Name Type Description Notes
reportChannelByUrlData ReportChannelByUrlData
channelType [string] defaults to undefined
channelUrl [string] defaults to undefined
apiToken [string] (optional) defaults to undefined

Return type

ReportChannelByUrlResponse

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • 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]

reportMessageById

ReportMessageByIdResponse reportMessageById()

Report a message Reports a message which contains suspicious, harassing, or inappropriate content. https://sendbird.com/docs/chat/v3/platform-api/guides/report-content-and-subject#2-report-a-message ----------------------------

Example

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

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

let body:Sendbird.ReportApiReportMessageByIdRequest = {
  // string
  channelType: "channel_type_example",
  // string
  channelUrl: "channel_url_example",
  // string
  messageId: "message_id_example",
  // string (optional)
  apiToken: "{{API_TOKEN}}",
  // ReportMessageByIdData (optional)
  reportMessageByIdData: {
    channelType: "channelType_example",
    channelUrl: "channelUrl_example",
    messageId: "messageId_example",
    reportCategory: "reportCategory_example",
    offendingUserId: "offendingUserId_example",
    reportingUserId: "reportingUserId_example",
    reportDescription: "reportDescription_example",
  },
};

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

Parameters

Name Type Description Notes
reportMessageByIdData ReportMessageByIdData
channelType [string] defaults to undefined
channelUrl [string] defaults to undefined
messageId [string] defaults to undefined
apiToken [string] (optional) defaults to undefined

Return type

ReportMessageByIdResponse

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • 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]

reportUserById

ReportUserByIdResponse reportUserById()

Report a user Reports a user who sends an offensive message in a channel. https://sendbird.com/docs/chat/v3/platform-api/guides/report-content-and-subject#2-report-a-user ----------------------------

Example

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

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

let body:Sendbird.ReportApiReportUserByIdRequest = {
  // string
  offendingUserId: "offending_user_id_example",
  // string (optional)
  apiToken: "{{API_TOKEN}}",
  // ReportUserByIdData (optional)
  reportUserByIdData: {
    offendingUserId: "offendingUserId_example",
    channelType: "channelType_example",
    channelUrl: "channelUrl_example",
    reportCategory: "reportCategory_example",
    reportingUserId: "reportingUserId_example",
    reportDescription: "reportDescription_example",
  },
};

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

Parameters

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

Return type

ReportUserByIdResponse

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • 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]

viewModeratedMessageById

any viewModeratedMessageById()

View a moderated message Retrieves information on a message that has been moderated by the profanity filter. https://sendbird.com/docs/chat/v3/platform-api/guides/report-content-and-subject#2-view-a-moderated-message ----------------------------

Example

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

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

let body:Sendbird.ReportApiViewModeratedMessageByIdRequest = {
  // string
  channelType: "channel_type_example",
  // string
  channelUrl: "channel_url_example",
  // string
  messageId: "message_id_example",
  // string (optional)
  apiToken: "{{API_TOKEN}}",
};

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

Parameters

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

Return type

any

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]