Skip to content

Latest commit

 

History

History
114 lines (74 loc) · 4.13 KB

AlertNotificationsApi.md

File metadata and controls

114 lines (74 loc) · 4.13 KB

SematextApiClientJavascript.AlertNotificationsApi

All URIs are relative to /

Method HTTP request Description
getAlertNotificationsForAppUsingPOST POST /users-web/api/v3/apps/{appId}/notifications/alerts Get alert notifications for an app
getAlertNotificationsForUserUsingPOST POST /users-web/api/v3/notifications/alerts Get alert notifications for a user

getAlertNotificationsForAppUsingPOST

NotificationsResponse getAlertNotificationsForAppUsingPOST(body, appId)

Get alert notifications for an app

Default value of interval is 1d

Example

import {SematextApiClientJavascript} from 'sematext-api-client-javascript';
let defaultClient = SematextApiClientJavascript.ApiClient.instance;

// Configure API key authorization: api_key
let api_key = defaultClient.authentications['api_key'];
api_key.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.apiKeyPrefix = 'Token';

let apiInstance = new SematextApiClientJavascript.AlertNotificationsApi();
let body = new SematextApiClientJavascript.AlertNotificationRequest(); // AlertNotificationRequest | Time Interval
let appId = 789; // Number | appId

apiInstance.getAlertNotificationsForAppUsingPOST(body, appId).then((data) => {
  console.log('API called successfully. Returned data: ' + data);
}, (error) => {
  console.error(error);
});

Parameters

Name Type Description Notes
body AlertNotificationRequest Time Interval
appId Number appId

Return type

NotificationsResponse

Authorization

api_key

HTTP request headers

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

getAlertNotificationsForUserUsingPOST

NotificationsResponse getAlertNotificationsForUserUsingPOST(body)

Get alert notifications for a user

Default value of interval is 1d

Example

import {SematextApiClientJavascript} from 'sematext-api-client-javascript';
let defaultClient = SematextApiClientJavascript.ApiClient.instance;

// Configure API key authorization: api_key
let api_key = defaultClient.authentications['api_key'];
api_key.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.apiKeyPrefix = 'Token';

let apiInstance = new SematextApiClientJavascript.AlertNotificationsApi();
let body = new SematextApiClientJavascript.AlertNotificationRequest(); // AlertNotificationRequest | Time Interval

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

Parameters

Name Type Description Notes
body AlertNotificationRequest Time Interval

Return type

NotificationsResponse

Authorization

api_key

HTTP request headers

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