LogicMonitor REST API

LM

ackAlertById

ack alert by id


/alert/alerts/{id}/ack

Usage and SDK Samples

curl -X POST -H "Authorization: [[apiKey]]" "https://localhost/santaba/rest/alert/alerts/{id}/ack"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.LMApi;

import java.io.File;
import java.util.*;

public class LMApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure API key authorization: LMv1
        ApiKeyAuth LMv1 = (ApiKeyAuth) defaultClient.getAuthentication("LMv1");
        LMv1.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //LMv1.setApiKeyPrefix("Token");

        LMApi apiInstance = new LMApi();
        AlertAck body = ; // AlertAck | 
        String id = id_example; // String | 
        try {
            Object result = apiInstance.ackAlertById(body, id);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling LMApi#ackAlertById");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.LMApi;

public class LMApiExample {

    public static void main(String[] args) {
        LMApi apiInstance = new LMApi();
        AlertAck body = ; // AlertAck | 
        String id = id_example; // String | 
        try {
            Object result = apiInstance.ackAlertById(body, id);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling LMApi#ackAlertById");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: LMv1)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"Authorization"];

AlertAck *body = ; // 
String *id = id_example; // 

LMApi *apiInstance = [[LMApi alloc] init];

// ack alert by id
[apiInstance ackAlertByIdWith:body
    id:id
              completionHandler: ^(Object output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var LogicMonitorRestApi = require('logic_monitor_rest_api');
var defaultClient = LogicMonitorRestApi.ApiClient.instance;

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

var api = new LogicMonitorRestApi.LMApi()

var body = ; // {AlertAck} 

var id = id_example; // {String} 


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.ackAlertById(body, id, callback);
using System;
using System.Diagnostics;
using logicmonitor_sdk.Api;
using logicmonitor_sdk.Client;
using logicmonitor_sdk.Model;

namespace Example
{
    public class ackAlertByIdExample
    {
        public void main()
        {
            
            // Configure API key authorization: LMv1
            Configuration.Default.ApiKey.Add("Authorization", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("Authorization", "Bearer");

            var apiInstance = new LMApi();
            var body = new AlertAck(); // AlertAck | 
            var id = id_example;  // String | 

            try
            {
                // ack alert by id
                Object result = apiInstance.ackAlertById(body, id);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling LMApi.ackAlertById: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: LMv1
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');

$api_instance = new Swagger\Client\Api\LMApi();
$body = ; // AlertAck | 
$id = id_example; // String | 

try {
    $result = $api_instance->ackAlertById($body, $id);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling LMApi->ackAlertById: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::LMApi;

# Configure API key authorization: LMv1
$WWW::SwaggerClient::Configuration::api_key->{'Authorization'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'Authorization'} = "Bearer";

my $api_instance = WWW::SwaggerClient::LMApi->new();
my $body = WWW::SwaggerClient::Object::AlertAck->new(); # AlertAck | 
my $id = id_example; # String | 

eval { 
    my $result = $api_instance->ackAlertById(body => $body, id => $id);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling LMApi->ackAlertById: $@\n";
}
from __future__ import print_function
import time
import logicmonitor_sdk
from logicmonitor_sdk.rest import ApiException
from pprint import pprint


# Configure API key authorization: LMv1
configuration = logicmonitor_sdk.Configuration()
configuration.company = 'YOUR_COMPANY'
configuration.access_id = 'YOUR_ACCESS_ID'
configuration.access_key = 'YOUR_ACCESS_KEY'

# create an instance of the API class
api_instance = logicmonitor_sdk.LMApi(logicmonitor_sdk.ApiClient(configuration))
    
try: # ack alert by id api_response = api_instance.ack_alert_by_id(body, id) pprint(api_response) except ApiException as e: print("Exception when calling LMApi->ackAlertById: %s\n" % e)
package main

import (
    "fmt"
    "github.com/logicmonitor/lm-sdk-go/client"
    "github.com/logicmonitor/lm-sdk-go/client/lm"
)
func main() {
// Configure API key authorization: LMv1
domain := "YOUR_COMPANY.logicmonitor.com"
accessID := "YOUR_ACCESS_ID"
accessKey := "YOUR_ACCESS_KEY"

config := client.NewConfig()
config.SetAccountDomain(&domain)
config.SetAccessID(&accessID)
config.SetAccessKey(&accessKey)

// create an instance of the API class
client := client.New(config)
params := lm.NewAckAlertByIDParams()
    
// ack alert by id resp, err := client.LM.AckAlertByID(params) if err != nil { fmt.Printf("Exception when calling client.LM.AckAlertByID: %v", err.Error()) } fmt.Print(resp) }

Parameters

Path parameters
Name Description
id*
String
Required
Body parameters
Name Description
body *

Responses

Status: 200 - successful operation

Status: default - Error


ackCollectorDownAlertById

ack collector down alert


/setting/collector/collectors/{id}/ackdown

Usage and SDK Samples

curl -X POST -H "Authorization: [[apiKey]]" "https://localhost/santaba/rest/setting/collector/collectors/{id}/ackdown"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.LMApi;

import java.io.File;
import java.util.*;

public class LMApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure API key authorization: LMv1
        ApiKeyAuth LMv1 = (ApiKeyAuth) defaultClient.getAuthentication("LMv1");
        LMv1.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //LMv1.setApiKeyPrefix("Token");

        LMApi apiInstance = new LMApi();
        Integer id = 56; // Integer | 
        AckCollectorDown body = ; // AckCollectorDown | 
        try {
            Object result = apiInstance.ackCollectorDownAlertById(id, body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling LMApi#ackCollectorDownAlertById");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.LMApi;

public class LMApiExample {

    public static void main(String[] args) {
        LMApi apiInstance = new LMApi();
        Integer id = 56; // Integer | 
        AckCollectorDown body = ; // AckCollectorDown | 
        try {
            Object result = apiInstance.ackCollectorDownAlertById(id, body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling LMApi#ackCollectorDownAlertById");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: LMv1)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"Authorization"];

Integer *id = 56; // 
AckCollectorDown *body = ; // 

LMApi *apiInstance = [[LMApi alloc] init];

// ack collector down alert
[apiInstance ackCollectorDownAlertByIdWith:id
    body:body
              completionHandler: ^(Object output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var LogicMonitorRestApi = require('logic_monitor_rest_api');
var defaultClient = LogicMonitorRestApi.ApiClient.instance;

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

var api = new LogicMonitorRestApi.LMApi()

var id = 56; // {Integer} 

var body = ; // {AckCollectorDown} 


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.ackCollectorDownAlertById(id, body, callback);
using System;
using System.Diagnostics;
using logicmonitor_sdk.Api;
using logicmonitor_sdk.Client;
using logicmonitor_sdk.Model;

namespace Example
{
    public class ackCollectorDownAlertByIdExample
    {
        public void main()
        {
            
            // Configure API key authorization: LMv1
            Configuration.Default.ApiKey.Add("Authorization", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("Authorization", "Bearer");

            var apiInstance = new LMApi();
            var id = 56;  // Integer | 
            var body = new AckCollectorDown(); // AckCollectorDown | 

            try
            {
                // ack collector down alert
                Object result = apiInstance.ackCollectorDownAlertById(id, body);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling LMApi.ackCollectorDownAlertById: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: LMv1
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');

$api_instance = new Swagger\Client\Api\LMApi();
$id = 56; // Integer | 
$body = ; // AckCollectorDown | 

try {
    $result = $api_instance->ackCollectorDownAlertById($id, $body);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling LMApi->ackCollectorDownAlertById: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::LMApi;

# Configure API key authorization: LMv1
$WWW::SwaggerClient::Configuration::api_key->{'Authorization'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'Authorization'} = "Bearer";

my $api_instance = WWW::SwaggerClient::LMApi->new();
my $id = 56; # Integer | 
my $body = WWW::SwaggerClient::Object::AckCollectorDown->new(); # AckCollectorDown | 

eval { 
    my $result = $api_instance->ackCollectorDownAlertById(id => $id, body => $body);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling LMApi->ackCollectorDownAlertById: $@\n";
}
from __future__ import print_function
import time
import logicmonitor_sdk
from logicmonitor_sdk.rest import ApiException
from pprint import pprint


# Configure API key authorization: LMv1
configuration = logicmonitor_sdk.Configuration()
configuration.company = 'YOUR_COMPANY'
configuration.access_id = 'YOUR_ACCESS_ID'
configuration.access_key = 'YOUR_ACCESS_KEY'

# create an instance of the API class
api_instance = logicmonitor_sdk.LMApi(logicmonitor_sdk.ApiClient(configuration))
    
try: # ack collector down alert api_response = api_instance.ack_collector_down_alert_by_id(id, body) pprint(api_response) except ApiException as e: print("Exception when calling LMApi->ackCollectorDownAlertById: %s\n" % e)
package main

import (
    "fmt"
    "github.com/logicmonitor/lm-sdk-go/client"
    "github.com/logicmonitor/lm-sdk-go/client/lm"
)
func main() {
// Configure API key authorization: LMv1
domain := "YOUR_COMPANY.logicmonitor.com"
accessID := "YOUR_ACCESS_ID"
accessKey := "YOUR_ACCESS_KEY"

config := client.NewConfig()
config.SetAccountDomain(&domain)
config.SetAccessID(&accessID)
config.SetAccessKey(&accessKey)

// create an instance of the API class
client := client.New(config)
params := lm.NewAckCollectorDownAlertByIDParams()
    
// ack collector down alert resp, err := client.LM.AckCollectorDownAlertByID(params) if err != nil { fmt.Printf("Exception when calling client.LM.AckCollectorDownAlertByID: %v", err.Error()) } fmt.Print(resp) }

Parameters

Path parameters
Name Description
id*
Integer (int32)
Required
Body parameters
Name Description
body *

Responses

Status: 200 - successful operation

Status: default - Error


addAdmin

add user


/setting/admins

Usage and SDK Samples

curl -X POST -H "Authorization: [[apiKey]]" "https://localhost/santaba/rest/setting/admins"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.LMApi;

import java.io.File;
import java.util.*;

public class LMApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure API key authorization: LMv1
        ApiKeyAuth LMv1 = (ApiKeyAuth) defaultClient.getAuthentication("LMv1");
        LMv1.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //LMv1.setApiKeyPrefix("Token");

        LMApi apiInstance = new LMApi();
        Admin body = ; // Admin | 
        try {
            Admin result = apiInstance.addAdmin(body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling LMApi#addAdmin");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.LMApi;

public class LMApiExample {

    public static void main(String[] args) {
        LMApi apiInstance = new LMApi();
        Admin body = ; // Admin | 
        try {
            Admin result = apiInstance.addAdmin(body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling LMApi#addAdmin");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: LMv1)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"Authorization"];

Admin *body = ; // 

LMApi *apiInstance = [[LMApi alloc] init];

// add user
[apiInstance addAdminWith:body
              completionHandler: ^(Admin output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var LogicMonitorRestApi = require('logic_monitor_rest_api');
var defaultClient = LogicMonitorRestApi.ApiClient.instance;

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

var api = new LogicMonitorRestApi.LMApi()

var body = ; // {Admin} 


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.addAdmin(body, callback);
using System;
using System.Diagnostics;
using logicmonitor_sdk.Api;
using logicmonitor_sdk.Client;
using logicmonitor_sdk.Model;

namespace Example
{
    public class addAdminExample
    {
        public void main()
        {
            
            // Configure API key authorization: LMv1
            Configuration.Default.ApiKey.Add("Authorization", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("Authorization", "Bearer");

            var apiInstance = new LMApi();
            var body = new Admin(); // Admin | 

            try
            {
                // add user
                Admin result = apiInstance.addAdmin(body);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling LMApi.addAdmin: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: LMv1
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');

$api_instance = new Swagger\Client\Api\LMApi();
$body = ; // Admin | 

try {
    $result = $api_instance->addAdmin($body);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling LMApi->addAdmin: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::LMApi;

# Configure API key authorization: LMv1
$WWW::SwaggerClient::Configuration::api_key->{'Authorization'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'Authorization'} = "Bearer";

my $api_instance = WWW::SwaggerClient::LMApi->new();
my $body = WWW::SwaggerClient::Object::Admin->new(); # Admin | 

eval { 
    my $result = $api_instance->addAdmin(body => $body);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling LMApi->addAdmin: $@\n";
}
from __future__ import print_function
import time
import logicmonitor_sdk
from logicmonitor_sdk.rest import ApiException
from pprint import pprint


# Configure API key authorization: LMv1
configuration = logicmonitor_sdk.Configuration()
configuration.company = 'YOUR_COMPANY'
configuration.access_id = 'YOUR_ACCESS_ID'
configuration.access_key = 'YOUR_ACCESS_KEY'

# create an instance of the API class
api_instance = logicmonitor_sdk.LMApi(logicmonitor_sdk.ApiClient(configuration))
    
try: # add user api_response = api_instance.add_admin(body) pprint(api_response) except ApiException as e: print("Exception when calling LMApi->addAdmin: %s\n" % e)
package main

import (
    "fmt"
    "github.com/logicmonitor/lm-sdk-go/client"
    "github.com/logicmonitor/lm-sdk-go/client/lm"
)
func main() {
// Configure API key authorization: LMv1
domain := "YOUR_COMPANY.logicmonitor.com"
accessID := "YOUR_ACCESS_ID"
accessKey := "YOUR_ACCESS_KEY"

config := client.NewConfig()
config.SetAccountDomain(&domain)
config.SetAccessID(&accessID)
config.SetAccessKey(&accessKey)

// create an instance of the API class
client := client.New(config)
params := lm.NewAddAdminParams()
    
// add user resp, err := client.LM.AddAdmin(params) if err != nil { fmt.Printf("Exception when calling client.LM.AddAdmin: %v", err.Error()) } fmt.Print(resp) }

Parameters

Body parameters
Name Description
body *

Responses

Status: 200 - successful operation

Status: default - Error


addAlertNoteById

add alert note


/alert/alerts/{id}/note

Usage and SDK Samples

curl -X POST -H "Authorization: [[apiKey]]" "https://localhost/santaba/rest/alert/alerts/{id}/note"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.LMApi;

import java.io.File;
import java.util.*;

public class LMApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure API key authorization: LMv1
        ApiKeyAuth LMv1 = (ApiKeyAuth) defaultClient.getAuthentication("LMv1");
        LMv1.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //LMv1.setApiKeyPrefix("Token");

        LMApi apiInstance = new LMApi();
        AlertAck body = ; // AlertAck | 
        String id = id_example; // String | 
        try {
            Object result = apiInstance.addAlertNoteById(body, id);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling LMApi#addAlertNoteById");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.LMApi;

public class LMApiExample {

    public static void main(String[] args) {
        LMApi apiInstance = new LMApi();
        AlertAck body = ; // AlertAck | 
        String id = id_example; // String | 
        try {
            Object result = apiInstance.addAlertNoteById(body, id);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling LMApi#addAlertNoteById");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: LMv1)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"Authorization"];

AlertAck *body = ; // 
String *id = id_example; // 

LMApi *apiInstance = [[LMApi alloc] init];

// add alert note
[apiInstance addAlertNoteByIdWith:body
    id:id
              completionHandler: ^(Object output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var LogicMonitorRestApi = require('logic_monitor_rest_api');
var defaultClient = LogicMonitorRestApi.ApiClient.instance;

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

var api = new LogicMonitorRestApi.LMApi()

var body = ; // {AlertAck} 

var id = id_example; // {String} 


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.addAlertNoteById(body, id, callback);
using System;
using System.Diagnostics;
using logicmonitor_sdk.Api;
using logicmonitor_sdk.Client;
using logicmonitor_sdk.Model;

namespace Example
{
    public class addAlertNoteByIdExample
    {
        public void main()
        {
            
            // Configure API key authorization: LMv1
            Configuration.Default.ApiKey.Add("Authorization", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("Authorization", "Bearer");

            var apiInstance = new LMApi();
            var body = new AlertAck(); // AlertAck | 
            var id = id_example;  // String | 

            try
            {
                // add alert note
                Object result = apiInstance.addAlertNoteById(body, id);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling LMApi.addAlertNoteById: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: LMv1
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');

$api_instance = new Swagger\Client\Api\LMApi();
$body = ; // AlertAck | 
$id = id_example; // String | 

try {
    $result = $api_instance->addAlertNoteById($body, $id);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling LMApi->addAlertNoteById: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::LMApi;

# Configure API key authorization: LMv1
$WWW::SwaggerClient::Configuration::api_key->{'Authorization'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'Authorization'} = "Bearer";

my $api_instance = WWW::SwaggerClient::LMApi->new();
my $body = WWW::SwaggerClient::Object::AlertAck->new(); # AlertAck | 
my $id = id_example; # String | 

eval { 
    my $result = $api_instance->addAlertNoteById(body => $body, id => $id);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling LMApi->addAlertNoteById: $@\n";
}
from __future__ import print_function
import time
import logicmonitor_sdk
from logicmonitor_sdk.rest import ApiException
from pprint import pprint


# Configure API key authorization: LMv1
configuration = logicmonitor_sdk.Configuration()
configuration.company = 'YOUR_COMPANY'
configuration.access_id = 'YOUR_ACCESS_ID'
configuration.access_key = 'YOUR_ACCESS_KEY'

# create an instance of the API class
api_instance = logicmonitor_sdk.LMApi(logicmonitor_sdk.ApiClient(configuration))
    
try: # add alert note api_response = api_instance.add_alert_note_by_id(body, id) pprint(api_response) except ApiException as e: print("Exception when calling LMApi->addAlertNoteById: %s\n" % e)
package main

import (
    "fmt"
    "github.com/logicmonitor/lm-sdk-go/client"
    "github.com/logicmonitor/lm-sdk-go/client/lm"
)
func main() {
// Configure API key authorization: LMv1
domain := "YOUR_COMPANY.logicmonitor.com"
accessID := "YOUR_ACCESS_ID"
accessKey := "YOUR_ACCESS_KEY"

config := client.NewConfig()
config.SetAccountDomain(&domain)
config.SetAccessID(&accessID)
config.SetAccessKey(&accessKey)

// create an instance of the API class
client := client.New(config)
params := lm.NewAddAlertNoteByIDParams()
    
// add alert note resp, err := client.LM.AddAlertNoteByID(params) if err != nil { fmt.Printf("Exception when calling client.LM.AddAlertNoteByID: %v", err.Error()) } fmt.Print(resp) }

Parameters

Path parameters
Name Description
id*
String
Required
Body parameters
Name Description
body *

Responses

Status: 200 - successful operation

Status: default - Error


addAlertRule

add alert rule


/setting/alert/rules

Usage and SDK Samples

curl -X POST -H "Authorization: [[apiKey]]" "https://localhost/santaba/rest/setting/alert/rules"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.LMApi;

import java.io.File;
import java.util.*;

public class LMApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure API key authorization: LMv1
        ApiKeyAuth LMv1 = (ApiKeyAuth) defaultClient.getAuthentication("LMv1");
        LMv1.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //LMv1.setApiKeyPrefix("Token");

        LMApi apiInstance = new LMApi();
        AlertRule body = ; // AlertRule | 
        try {
            AlertRule result = apiInstance.addAlertRule(body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling LMApi#addAlertRule");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.LMApi;

public class LMApiExample {

    public static void main(String[] args) {
        LMApi apiInstance = new LMApi();
        AlertRule body = ; // AlertRule | 
        try {
            AlertRule result = apiInstance.addAlertRule(body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling LMApi#addAlertRule");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: LMv1)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"Authorization"];

AlertRule *body = ; // 

LMApi *apiInstance = [[LMApi alloc] init];

// add alert rule
[apiInstance addAlertRuleWith:body
              completionHandler: ^(AlertRule output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var LogicMonitorRestApi = require('logic_monitor_rest_api');
var defaultClient = LogicMonitorRestApi.ApiClient.instance;

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

var api = new LogicMonitorRestApi.LMApi()

var body = ; // {AlertRule} 


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.addAlertRule(body, callback);
using System;
using System.Diagnostics;
using logicmonitor_sdk.Api;
using logicmonitor_sdk.Client;
using logicmonitor_sdk.Model;

namespace Example
{
    public class addAlertRuleExample
    {
        public void main()
        {
            
            // Configure API key authorization: LMv1
            Configuration.Default.ApiKey.Add("Authorization", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("Authorization", "Bearer");

            var apiInstance = new LMApi();
            var body = new AlertRule(); // AlertRule | 

            try
            {
                // add alert rule
                AlertRule result = apiInstance.addAlertRule(body);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling LMApi.addAlertRule: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: LMv1
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');

$api_instance = new Swagger\Client\Api\LMApi();
$body = ; // AlertRule | 

try {
    $result = $api_instance->addAlertRule($body);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling LMApi->addAlertRule: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::LMApi;

# Configure API key authorization: LMv1
$WWW::SwaggerClient::Configuration::api_key->{'Authorization'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'Authorization'} = "Bearer";

my $api_instance = WWW::SwaggerClient::LMApi->new();
my $body = WWW::SwaggerClient::Object::AlertRule->new(); # AlertRule | 

eval { 
    my $result = $api_instance->addAlertRule(body => $body);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling LMApi->addAlertRule: $@\n";
}
from __future__ import print_function
import time
import logicmonitor_sdk
from logicmonitor_sdk.rest import ApiException
from pprint import pprint


# Configure API key authorization: LMv1
configuration = logicmonitor_sdk.Configuration()
configuration.company = 'YOUR_COMPANY'
configuration.access_id = 'YOUR_ACCESS_ID'
configuration.access_key = 'YOUR_ACCESS_KEY'

# create an instance of the API class
api_instance = logicmonitor_sdk.LMApi(logicmonitor_sdk.ApiClient(configuration))
    
try: # add alert rule api_response = api_instance.add_alert_rule(body) pprint(api_response) except ApiException as e: print("Exception when calling LMApi->addAlertRule: %s\n" % e)
package main

import (
    "fmt"
    "github.com/logicmonitor/lm-sdk-go/client"
    "github.com/logicmonitor/lm-sdk-go/client/lm"
)
func main() {
// Configure API key authorization: LMv1
domain := "YOUR_COMPANY.logicmonitor.com"
accessID := "YOUR_ACCESS_ID"
accessKey := "YOUR_ACCESS_KEY"

config := client.NewConfig()
config.SetAccountDomain(&domain)
config.SetAccessID(&accessID)
config.SetAccessKey(&accessKey)

// create an instance of the API class
client := client.New(config)
params := lm.NewAddAlertRuleParams()
    
// add alert rule resp, err := client.LM.AddAlertRule(params) if err != nil { fmt.Printf("Exception when calling client.LM.AddAlertRule: %v", err.Error()) } fmt.Print(resp) }

Parameters

Body parameters
Name Description
body *

Responses

Status: 200 - successful operation

Status: default - Error


addApiTokenByAdminId

add api tokens for a user


/setting/admins/{adminId}/apitokens

Usage and SDK Samples

curl -X POST -H "Authorization: [[apiKey]]" "https://localhost/santaba/rest/setting/admins/{adminId}/apitokens?type="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.LMApi;

import java.io.File;
import java.util.*;

public class LMApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure API key authorization: LMv1
        ApiKeyAuth LMv1 = (ApiKeyAuth) defaultClient.getAuthentication("LMv1");
        LMv1.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //LMv1.setApiKeyPrefix("Token");

        LMApi apiInstance = new LMApi();
        Integer adminId = 56; // Integer | 
        APIToken body = ; // APIToken | 
        String type = type_example; // String | 
        try {
            APIToken result = apiInstance.addApiTokenByAdminId(adminId, body, type);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling LMApi#addApiTokenByAdminId");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.LMApi;

public class LMApiExample {

    public static void main(String[] args) {
        LMApi apiInstance = new LMApi();
        Integer adminId = 56; // Integer | 
        APIToken body = ; // APIToken | 
        String type = type_example; // String | 
        try {
            APIToken result = apiInstance.addApiTokenByAdminId(adminId, body, type);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling LMApi#addApiTokenByAdminId");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: LMv1)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"Authorization"];

Integer *adminId = 56; // 
APIToken *body = ; // 
String *type = type_example; //  (optional) (default to API Token)

LMApi *apiInstance = [[LMApi alloc] init];

// add api tokens for a user
[apiInstance addApiTokenByAdminIdWith:adminId
    body:body
    type:type
              completionHandler: ^(APIToken output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var LogicMonitorRestApi = require('logic_monitor_rest_api');
var defaultClient = LogicMonitorRestApi.ApiClient.instance;

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

var api = new LogicMonitorRestApi.LMApi()

var adminId = 56; // {Integer} 

var body = ; // {APIToken} 

var opts = { 
  'type': type_example // {String} 
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.addApiTokenByAdminId(adminId, body, opts, callback);
using System;
using System.Diagnostics;
using logicmonitor_sdk.Api;
using logicmonitor_sdk.Client;
using logicmonitor_sdk.Model;

namespace Example
{
    public class addApiTokenByAdminIdExample
    {
        public void main()
        {
            
            // Configure API key authorization: LMv1
            Configuration.Default.ApiKey.Add("Authorization", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("Authorization", "Bearer");

            var apiInstance = new LMApi();
            var adminId = 56;  // Integer | 
            var body = new APIToken(); // APIToken | 
            var type = type_example;  // String |  (optional)  (default to API Token)

            try
            {
                // add api tokens for a user
                APIToken result = apiInstance.addApiTokenByAdminId(adminId, body, type);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling LMApi.addApiTokenByAdminId: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: LMv1
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');

$api_instance = new Swagger\Client\Api\LMApi();
$adminId = 56; // Integer | 
$body = ; // APIToken | 
$type = type_example; // String | 

try {
    $result = $api_instance->addApiTokenByAdminId($adminId, $body, $type);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling LMApi->addApiTokenByAdminId: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::LMApi;

# Configure API key authorization: LMv1
$WWW::SwaggerClient::Configuration::api_key->{'Authorization'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'Authorization'} = "Bearer";

my $api_instance = WWW::SwaggerClient::LMApi->new();
my $adminId = 56; # Integer | 
my $body = WWW::SwaggerClient::Object::APIToken->new(); # APIToken | 
my $type = type_example; # String | 

eval { 
    my $result = $api_instance->addApiTokenByAdminId(adminId => $adminId, body => $body, type => $type);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling LMApi->addApiTokenByAdminId: $@\n";
}
from __future__ import print_function
import time
import logicmonitor_sdk
from logicmonitor_sdk.rest import ApiException
from pprint import pprint


# Configure API key authorization: LMv1
configuration = logicmonitor_sdk.Configuration()
configuration.company = 'YOUR_COMPANY'
configuration.access_id = 'YOUR_ACCESS_ID'
configuration.access_key = 'YOUR_ACCESS_KEY'

# create an instance of the API class
api_instance = logicmonitor_sdk.LMApi(logicmonitor_sdk.ApiClient(configuration))
    
try: # add api tokens for a user api_response = api_instance.add_api_token_by_admin_id(adminId, body, type=type) pprint(api_response) except ApiException as e: print("Exception when calling LMApi->addApiTokenByAdminId: %s\n" % e)
package main

import (
    "fmt"
    "github.com/logicmonitor/lm-sdk-go/client"
    "github.com/logicmonitor/lm-sdk-go/client/lm"
)
func main() {
// Configure API key authorization: LMv1
domain := "YOUR_COMPANY.logicmonitor.com"
accessID := "YOUR_ACCESS_ID"
accessKey := "YOUR_ACCESS_KEY"

config := client.NewConfig()
config.SetAccountDomain(&domain)
config.SetAccessID(&accessID)
config.SetAccessKey(&accessKey)

// create an instance of the API class
client := client.New(config)
params := lm.NewAddAPITokenByAdminIDParams()
    
// add api tokens for a user resp, err := client.LM.AddAPITokenByAdminID(params) if err != nil { fmt.Printf("Exception when calling client.LM.AddAPITokenByAdminID: %v", err.Error()) } fmt.Print(resp) }

Parameters

Path parameters
Name Description
adminId*
Integer (int32)
Required
Body parameters
Name Description
body *
Query parameters
Name Description
type
String

Responses

Status: 200 - successful operation

Status: default - Error


addAppliesToFunction

add applies to function


/setting/functions

Usage and SDK Samples

curl -X POST -H "Authorization: [[apiKey]]" "https://localhost/santaba/rest/setting/functions"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.LMApi;

import java.io.File;
import java.util.*;

public class LMApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure API key authorization: LMv1
        ApiKeyAuth LMv1 = (ApiKeyAuth) defaultClient.getAuthentication("LMv1");
        LMv1.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //LMv1.setApiKeyPrefix("Token");

        LMApi apiInstance = new LMApi();
        AppliesToFunction body = ; // AppliesToFunction | 
        try {
            AppliesToFunction result = apiInstance.addAppliesToFunction(body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling LMApi#addAppliesToFunction");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.LMApi;

public class LMApiExample {

    public static void main(String[] args) {
        LMApi apiInstance = new LMApi();
        AppliesToFunction body = ; // AppliesToFunction | 
        try {
            AppliesToFunction result = apiInstance.addAppliesToFunction(body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling LMApi#addAppliesToFunction");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: LMv1)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"Authorization"];

AppliesToFunction *body = ; //  (optional)

LMApi *apiInstance = [[LMApi alloc] init];

// add applies to function
[apiInstance addAppliesToFunctionWith:body
              completionHandler: ^(AppliesToFunction output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var LogicMonitorRestApi = require('logic_monitor_rest_api');
var defaultClient = LogicMonitorRestApi.ApiClient.instance;

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

var api = new LogicMonitorRestApi.LMApi()

var opts = { 
  'body':  // {AppliesToFunction} 
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.addAppliesToFunction(opts, callback);
using System;
using System.Diagnostics;
using logicmonitor_sdk.Api;
using logicmonitor_sdk.Client;
using logicmonitor_sdk.Model;

namespace Example
{
    public class addAppliesToFunctionExample
    {
        public void main()
        {
            
            // Configure API key authorization: LMv1
            Configuration.Default.ApiKey.Add("Authorization", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("Authorization", "Bearer");

            var apiInstance = new LMApi();
            var body = new AppliesToFunction(); // AppliesToFunction |  (optional) 

            try
            {
                // add applies to function
                AppliesToFunction result = apiInstance.addAppliesToFunction(body);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling LMApi.addAppliesToFunction: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: LMv1
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');

$api_instance = new Swagger\Client\Api\LMApi();
$body = ; // AppliesToFunction | 

try {
    $result = $api_instance->addAppliesToFunction($body);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling LMApi->addAppliesToFunction: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::LMApi;

# Configure API key authorization: LMv1
$WWW::SwaggerClient::Configuration::api_key->{'Authorization'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'Authorization'} = "Bearer";

my $api_instance = WWW::SwaggerClient::LMApi->new();
my $body = WWW::SwaggerClient::Object::AppliesToFunction->new(); # AppliesToFunction | 

eval { 
    my $result = $api_instance->addAppliesToFunction(body => $body);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling LMApi->addAppliesToFunction: $@\n";
}
from __future__ import print_function
import time
import logicmonitor_sdk
from logicmonitor_sdk.rest import ApiException
from pprint import pprint


# Configure API key authorization: LMv1
configuration = logicmonitor_sdk.Configuration()
configuration.company = 'YOUR_COMPANY'
configuration.access_id = 'YOUR_ACCESS_ID'
configuration.access_key = 'YOUR_ACCESS_KEY'

# create an instance of the API class
api_instance = logicmonitor_sdk.LMApi(logicmonitor_sdk.ApiClient(configuration))
    
try: # add applies to function api_response = api_instance.add_applies_to_function(body=body) pprint(api_response) except ApiException as e: print("Exception when calling LMApi->addAppliesToFunction: %s\n" % e)
package main

import (
    "fmt"
    "github.com/logicmonitor/lm-sdk-go/client"
    "github.com/logicmonitor/lm-sdk-go/client/lm"
)
func main() {
// Configure API key authorization: LMv1
domain := "YOUR_COMPANY.logicmonitor.com"
accessID := "YOUR_ACCESS_ID"
accessKey := "YOUR_ACCESS_KEY"

config := client.NewConfig()
config.SetAccountDomain(&domain)
config.SetAccessID(&accessID)
config.SetAccessKey(&accessKey)

// create an instance of the API class
client := client.New(config)
params := lm.NewAddAppliesToFunctionParams()
    
// add applies to function resp, err := client.LM.AddAppliesToFunction(params) if err != nil { fmt.Printf("Exception when calling client.LM.AddAppliesToFunction: %v", err.Error()) } fmt.Print(resp) }

Parameters

Body parameters
Name Description
body

Responses

Status: 200 - successful operation

Status: default - Error


addCollector

add collector


/setting/collector/collectors

Usage and SDK Samples

curl -X POST -H "Authorization: [[apiKey]]" "https://localhost/santaba/rest/setting/collector/collectors"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.LMApi;

import java.io.File;
import java.util.*;

public class LMApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure API key authorization: LMv1
        ApiKeyAuth LMv1 = (ApiKeyAuth) defaultClient.getAuthentication("LMv1");
        LMv1.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //LMv1.setApiKeyPrefix("Token");

        LMApi apiInstance = new LMApi();
        Collector body = ; // Collector | 
        try {
            Collector result = apiInstance.addCollector(body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling LMApi#addCollector");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.LMApi;

public class LMApiExample {

    public static void main(String[] args) {
        LMApi apiInstance = new LMApi();
        Collector body = ; // Collector | 
        try {
            Collector result = apiInstance.addCollector(body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling LMApi#addCollector");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: LMv1)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"Authorization"];

Collector *body = ; // 

LMApi *apiInstance = [[LMApi alloc] init];

// add collector
[apiInstance addCollectorWith:body
              completionHandler: ^(Collector output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var LogicMonitorRestApi = require('logic_monitor_rest_api');
var defaultClient = LogicMonitorRestApi.ApiClient.instance;

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

var api = new LogicMonitorRestApi.LMApi()

var body = ; // {Collector} 


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.addCollector(body, callback);
using System;
using System.Diagnostics;
using logicmonitor_sdk.Api;
using logicmonitor_sdk.Client;
using logicmonitor_sdk.Model;

namespace Example
{
    public class addCollectorExample
    {
        public void main()
        {
            
            // Configure API key authorization: LMv1
            Configuration.Default.ApiKey.Add("Authorization", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("Authorization", "Bearer");

            var apiInstance = new LMApi();
            var body = new Collector(); // Collector | 

            try
            {
                // add collector
                Collector result = apiInstance.addCollector(body);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling LMApi.addCollector: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: LMv1
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');

$api_instance = new Swagger\Client\Api\LMApi();
$body = ; // Collector | 

try {
    $result = $api_instance->addCollector($body);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling LMApi->addCollector: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::LMApi;

# Configure API key authorization: LMv1
$WWW::SwaggerClient::Configuration::api_key->{'Authorization'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'Authorization'} = "Bearer";

my $api_instance = WWW::SwaggerClient::LMApi->new();
my $body = WWW::SwaggerClient::Object::Collector->new(); # Collector | 

eval { 
    my $result = $api_instance->addCollector(body => $body);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling LMApi->addCollector: $@\n";
}
from __future__ import print_function
import time
import logicmonitor_sdk
from logicmonitor_sdk.rest import ApiException
from pprint import pprint


# Configure API key authorization: LMv1
configuration = logicmonitor_sdk.Configuration()
configuration.company = 'YOUR_COMPANY'
configuration.access_id = 'YOUR_ACCESS_ID'
configuration.access_key = 'YOUR_ACCESS_KEY'

# create an instance of the API class
api_instance = logicmonitor_sdk.LMApi(logicmonitor_sdk.ApiClient(configuration))
    
try: # add collector api_response = api_instance.add_collector(body) pprint(api_response) except ApiException as e: print("Exception when calling LMApi->addCollector: %s\n" % e)
package main

import (
    "fmt"
    "github.com/logicmonitor/lm-sdk-go/client"
    "github.com/logicmonitor/lm-sdk-go/client/lm"
)
func main() {
// Configure API key authorization: LMv1
domain := "YOUR_COMPANY.logicmonitor.com"
accessID := "YOUR_ACCESS_ID"
accessKey := "YOUR_ACCESS_KEY"

config := client.NewConfig()
config.SetAccountDomain(&domain)
config.SetAccessID(&accessID)
config.SetAccessKey(&accessKey)

// create an instance of the API class
client := client.New(config)
params := lm.NewAddCollectorParams()
    
// add collector resp, err := client.LM.AddCollector(params) if err != nil { fmt.Printf("Exception when calling client.LM.AddCollector: %v", err.Error()) } fmt.Print(resp) }

Parameters

Body parameters
Name Description
body *

Responses

Status: 200 - successful operation

Status: default - Error


addCollectorGroup

add collector group


/setting/collector/groups

Usage and SDK Samples

curl -X POST -H "Authorization: [[apiKey]]" "https://localhost/santaba/rest/setting/collector/groups"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.LMApi;

import java.io.File;
import java.util.*;

public class LMApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure API key authorization: LMv1
        ApiKeyAuth LMv1 = (ApiKeyAuth) defaultClient.getAuthentication("LMv1");
        LMv1.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //LMv1.setApiKeyPrefix("Token");

        LMApi apiInstance = new LMApi();
        CollectorGroup body = ; // CollectorGroup | 
        try {
            CollectorGroup result = apiInstance.addCollectorGroup(body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling LMApi#addCollectorGroup");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.LMApi;

public class LMApiExample {

    public static void main(String[] args) {
        LMApi apiInstance = new LMApi();
        CollectorGroup body = ; // CollectorGroup | 
        try {
            CollectorGroup result = apiInstance.addCollectorGroup(body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling LMApi#addCollectorGroup");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: LMv1)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"Authorization"];

CollectorGroup *body = ; // 

LMApi *apiInstance = [[LMApi alloc] init];

// add collector group
[apiInstance addCollectorGroupWith:body
              completionHandler: ^(CollectorGroup output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var LogicMonitorRestApi = require('logic_monitor_rest_api');
var defaultClient = LogicMonitorRestApi.ApiClient.instance;

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

var api = new LogicMonitorRestApi.LMApi()

var body = ; // {CollectorGroup} 


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.addCollectorGroup(body, callback);
using System;
using System.Diagnostics;
using logicmonitor_sdk.Api;
using logicmonitor_sdk.Client;
using logicmonitor_sdk.Model;

namespace Example
{
    public class addCollectorGroupExample
    {
        public void main()
        {
            
            // Configure API key authorization: LMv1
            Configuration.Default.ApiKey.Add("Authorization", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("Authorization", "Bearer");

            var apiInstance = new LMApi();
            var body = new CollectorGroup(); // CollectorGroup | 

            try
            {
                // add collector group
                CollectorGroup result = apiInstance.addCollectorGroup(body);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling LMApi.addCollectorGroup: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: LMv1
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');

$api_instance = new Swagger\Client\Api\LMApi();
$body = ; // CollectorGroup | 

try {
    $result = $api_instance->addCollectorGroup($body);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling LMApi->addCollectorGroup: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::LMApi;

# Configure API key authorization: LMv1
$WWW::SwaggerClient::Configuration::api_key->{'Authorization'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'Authorization'} = "Bearer";

my $api_instance = WWW::SwaggerClient::LMApi->new();
my $body = WWW::SwaggerClient::Object::CollectorGroup->new(); # CollectorGroup | 

eval { 
    my $result = $api_instance->addCollectorGroup(body => $body);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling LMApi->addCollectorGroup: $@\n";
}
from __future__ import print_function
import time
import logicmonitor_sdk
from logicmonitor_sdk.rest import ApiException
from pprint import pprint


# Configure API key authorization: LMv1
configuration = logicmonitor_sdk.Configuration()
configuration.company = 'YOUR_COMPANY'
configuration.access_id = 'YOUR_ACCESS_ID'
configuration.access_key = 'YOUR_ACCESS_KEY'

# create an instance of the API class
api_instance = logicmonitor_sdk.LMApi(logicmonitor_sdk.ApiClient(configuration))
    
try: # add collector group api_response = api_instance.add_collector_group(body) pprint(api_response) except ApiException as e: print("Exception when calling LMApi->addCollectorGroup: %s\n" % e)
package main

import (
    "fmt"
    "github.com/logicmonitor/lm-sdk-go/client"
    "github.com/logicmonitor/lm-sdk-go/client/lm"
)
func main() {
// Configure API key authorization: LMv1
domain := "YOUR_COMPANY.logicmonitor.com"
accessID := "YOUR_ACCESS_ID"
accessKey := "YOUR_ACCESS_KEY"

config := client.NewConfig()
config.SetAccountDomain(&domain)
config.SetAccessID(&accessID)
config.SetAccessKey(&accessKey)

// create an instance of the API class
client := client.New(config)
params := lm.NewAddCollectorGroupParams()
    
// add collector group resp, err := client.LM.AddCollectorGroup(params) if err != nil { fmt.Printf("Exception when calling client.LM.AddCollectorGroup: %v", err.Error()) } fmt.Print(resp) }

Parameters

Body parameters
Name Description
body *

Responses

Status: 200 - successful operation

Status: default - Error


addDashboard

add dashboard


/dashboard/dashboards

Usage and SDK Samples

curl -X POST -H "Authorization: [[apiKey]]" "https://localhost/santaba/rest/dashboard/dashboards"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.LMApi;

import java.io.File;
import java.util.*;

public class LMApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure API key authorization: LMv1
        ApiKeyAuth LMv1 = (ApiKeyAuth) defaultClient.getAuthentication("LMv1");
        LMv1.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //LMv1.setApiKeyPrefix("Token");

        LMApi apiInstance = new LMApi();
        Dashboard body = ; // Dashboard | 
        try {
            Dashboard result = apiInstance.addDashboard(body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling LMApi#addDashboard");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.LMApi;

public class LMApiExample {

    public static void main(String[] args) {
        LMApi apiInstance = new LMApi();
        Dashboard body = ; // Dashboard | 
        try {
            Dashboard result = apiInstance.addDashboard(body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling LMApi#addDashboard");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: LMv1)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"Authorization"];

Dashboard *body = ; // 

LMApi *apiInstance = [[LMApi alloc] init];

// add dashboard
[apiInstance addDashboardWith:body
              completionHandler: ^(Dashboard output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var LogicMonitorRestApi = require('logic_monitor_rest_api');
var defaultClient = LogicMonitorRestApi.ApiClient.instance;

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

var api = new LogicMonitorRestApi.LMApi()

var body = ; // {Dashboard} 


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.addDashboard(body, callback);
using System;
using System.Diagnostics;
using logicmonitor_sdk.Api;
using logicmonitor_sdk.Client;
using logicmonitor_sdk.Model;

namespace Example
{
    public class addDashboardExample
    {
        public void main()
        {
            
            // Configure API key authorization: LMv1
            Configuration.Default.ApiKey.Add("Authorization", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("Authorization", "Bearer");

            var apiInstance = new LMApi();
            var body = new Dashboard(); // Dashboard | 

            try
            {
                // add dashboard
                Dashboard result = apiInstance.addDashboard(body);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling LMApi.addDashboard: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: LMv1
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');

$api_instance = new Swagger\Client\Api\LMApi();
$body = ; // Dashboard | 

try {
    $result = $api_instance->addDashboard($body);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling LMApi->addDashboard: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::LMApi;

# Configure API key authorization: LMv1
$WWW::SwaggerClient::Configuration::api_key->{'Authorization'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'Authorization'} = "Bearer";

my $api_instance = WWW::SwaggerClient::LMApi->new();
my $body = WWW::SwaggerClient::Object::Dashboard->new(); # Dashboard | 

eval { 
    my $result = $api_instance->addDashboard(body => $body);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling LMApi->addDashboard: $@\n";
}
from __future__ import print_function
import time
import logicmonitor_sdk
from logicmonitor_sdk.rest import ApiException
from pprint import pprint


# Configure API key authorization: LMv1
configuration = logicmonitor_sdk.Configuration()
configuration.company = 'YOUR_COMPANY'
configuration.access_id = 'YOUR_ACCESS_ID'
configuration.access_key = 'YOUR_ACCESS_KEY'

# create an instance of the API class
api_instance = logicmonitor_sdk.LMApi(logicmonitor_sdk.ApiClient(configuration))
    
try: # add dashboard api_response = api_instance.add_dashboard(body) pprint(api_response) except ApiException as e: print("Exception when calling LMApi->addDashboard: %s\n" % e)
package main

import (
    "fmt"
    "github.com/logicmonitor/lm-sdk-go/client"
    "github.com/logicmonitor/lm-sdk-go/client/lm"
)
func main() {
// Configure API key authorization: LMv1
domain := "YOUR_COMPANY.logicmonitor.com"
accessID := "YOUR_ACCESS_ID"
accessKey := "YOUR_ACCESS_KEY"

config := client.NewConfig()
config.SetAccountDomain(&domain)
config.SetAccessID(&accessID)
config.SetAccessKey(&accessKey)

// create an instance of the API class
client := client.New(config)
params := lm.NewAddDashboardParams()
    
// add dashboard resp, err := client.LM.AddDashboard(params) if err != nil { fmt.Printf("Exception when calling client.LM.AddDashboard: %v", err.Error()) } fmt.Print(resp) }

Parameters

Body parameters
Name Description
body *

Responses

Status: 200 - successful operation

Status: default - Error


addDashboardGroup

add dashboard group


/dashboard/groups

Usage and SDK Samples

curl -X POST -H "Authorization: [[apiKey]]" "https://localhost/santaba/rest/dashboard/groups"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.LMApi;

import java.io.File;
import java.util.*;

public class LMApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure API key authorization: LMv1
        ApiKeyAuth LMv1 = (ApiKeyAuth) defaultClient.getAuthentication("LMv1");
        LMv1.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //LMv1.setApiKeyPrefix("Token");

        LMApi apiInstance = new LMApi();
        DashboardGroup body = ; // DashboardGroup | 
        try {
            DashboardGroup result = apiInstance.addDashboardGroup(body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling LMApi#addDashboardGroup");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.LMApi;

public class LMApiExample {

    public static void main(String[] args) {
        LMApi apiInstance = new LMApi();
        DashboardGroup body = ; // DashboardGroup | 
        try {
            DashboardGroup result = apiInstance.addDashboardGroup(body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling LMApi#addDashboardGroup");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: LMv1)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"Authorization"];

DashboardGroup *body = ; // 

LMApi *apiInstance = [[LMApi alloc] init];

// add dashboard group
[apiInstance addDashboardGroupWith:body
              completionHandler: ^(DashboardGroup output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var LogicMonitorRestApi = require('logic_monitor_rest_api');
var defaultClient = LogicMonitorRestApi.ApiClient.instance;

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

var api = new LogicMonitorRestApi.LMApi()

var body = ; // {DashboardGroup} 


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.addDashboardGroup(body, callback);
using System;
using System.Diagnostics;
using logicmonitor_sdk.Api;
using logicmonitor_sdk.Client;
using logicmonitor_sdk.Model;

namespace Example
{
    public class addDashboardGroupExample
    {
        public void main()
        {
            
            // Configure API key authorization: LMv1
            Configuration.Default.ApiKey.Add("Authorization", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("Authorization", "Bearer");

            var apiInstance = new LMApi();
            var body = new DashboardGroup(); // DashboardGroup | 

            try
            {
                // add dashboard group
                DashboardGroup result = apiInstance.addDashboardGroup(body);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling LMApi.addDashboardGroup: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: LMv1
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');

$api_instance = new Swagger\Client\Api\LMApi();
$body = ; // DashboardGroup | 

try {
    $result = $api_instance->addDashboardGroup($body);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling LMApi->addDashboardGroup: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::LMApi;

# Configure API key authorization: LMv1
$WWW::SwaggerClient::Configuration::api_key->{'Authorization'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'Authorization'} = "Bearer";

my $api_instance = WWW::SwaggerClient::LMApi->new();
my $body = WWW::SwaggerClient::Object::DashboardGroup->new(); # DashboardGroup | 

eval { 
    my $result = $api_instance->addDashboardGroup(body => $body);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling LMApi->addDashboardGroup: $@\n";
}
from __future__ import print_function
import time
import logicmonitor_sdk
from logicmonitor_sdk.rest import ApiException
from pprint import pprint


# Configure API key authorization: LMv1
configuration = logicmonitor_sdk.Configuration()
configuration.company = 'YOUR_COMPANY'
configuration.access_id = 'YOUR_ACCESS_ID'
configuration.access_key = 'YOUR_ACCESS_KEY'

# create an instance of the API class
api_instance = logicmonitor_sdk.LMApi(logicmonitor_sdk.ApiClient(configuration))
    
try: # add dashboard group api_response = api_instance.add_dashboard_group(body) pprint(api_response) except ApiException as e: print("Exception when calling LMApi->addDashboardGroup: %s\n" % e)
package main

import (
    "fmt"
    "github.com/logicmonitor/lm-sdk-go/client"
    "github.com/logicmonitor/lm-sdk-go/client/lm"
)
func main() {
// Configure API key authorization: LMv1
domain := "YOUR_COMPANY.logicmonitor.com"
accessID := "YOUR_ACCESS_ID"
accessKey := "YOUR_ACCESS_KEY"

config := client.NewConfig()
config.SetAccountDomain(&domain)
config.SetAccessID(&accessID)
config.SetAccessKey(&accessKey)

// create an instance of the API class
client := client.New(config)
params := lm.NewAddDashboardGroupParams()
    
// add dashboard group resp, err := client.LM.AddDashboardGroup(params) if err != nil { fmt.Printf("Exception when calling client.LM.AddDashboardGroup: %v", err.Error()) } fmt.Print(resp) }

Parameters

Body parameters
Name Description
body *

Responses

Status: 200 - successful operation

Status: default - Error


addDevice

add a new device


/device/devices

Usage and SDK Samples

curl -X POST -H "Authorization: [[apiKey]]" "https://localhost/santaba/rest/device/devices?start=&end=&netflowFilter=&addFromWizard="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.LMApi;

import java.io.File;
import java.util.*;

public class LMApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure API key authorization: LMv1
        ApiKeyAuth LMv1 = (ApiKeyAuth) defaultClient.getAuthentication("LMv1");
        LMv1.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //LMv1.setApiKeyPrefix("Token");

        LMApi apiInstance = new LMApi();
        Device body = ; // Device | 
        Long start = 789; // Long | 
        Long end = 789; // Long | 
        String netflowFilter = netflowFilter_example; // String | 
        Boolean addFromWizard = true; // Boolean | 
        try {
            Device result = apiInstance.addDevice(body, start, end, netflowFilter, addFromWizard);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling LMApi#addDevice");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.LMApi;

public class LMApiExample {

    public static void main(String[] args) {
        LMApi apiInstance = new LMApi();
        Device body = ; // Device | 
        Long start = 789; // Long | 
        Long end = 789; // Long | 
        String netflowFilter = netflowFilter_example; // String | 
        Boolean addFromWizard = true; // Boolean | 
        try {
            Device result = apiInstance.addDevice(body, start, end, netflowFilter, addFromWizard);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling LMApi#addDevice");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: LMv1)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"Authorization"];

Device *body = ; // 
Long *start = 789; //  (optional)
Long *end = 789; //  (optional)
String *netflowFilter = netflowFilter_example; //  (optional)
Boolean *addFromWizard = true; //  (optional) (default to false)

LMApi *apiInstance = [[LMApi alloc] init];

// add a new device
[apiInstance addDeviceWith:body
    start:start
    end:end
    netflowFilter:netflowFilter
    addFromWizard:addFromWizard
              completionHandler: ^(Device output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var LogicMonitorRestApi = require('logic_monitor_rest_api');
var defaultClient = LogicMonitorRestApi.ApiClient.instance;

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

var api = new LogicMonitorRestApi.LMApi()

var body = ; // {Device} 

var opts = { 
  'start': 789, // {Long} 
  'end': 789, // {Long} 
  'netflowFilter': netflowFilter_example, // {String} 
  'addFromWizard': true // {Boolean} 
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.addDevice(body, opts, callback);
using System;
using System.Diagnostics;
using logicmonitor_sdk.Api;
using logicmonitor_sdk.Client;
using logicmonitor_sdk.Model;

namespace Example
{
    public class addDeviceExample
    {
        public void main()
        {
            
            // Configure API key authorization: LMv1
            Configuration.Default.ApiKey.Add("Authorization", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("Authorization", "Bearer");

            var apiInstance = new LMApi();
            var body = new Device(); // Device | 
            var start = 789;  // Long |  (optional) 
            var end = 789;  // Long |  (optional) 
            var netflowFilter = netflowFilter_example;  // String |  (optional) 
            var addFromWizard = true;  // Boolean |  (optional)  (default to false)

            try
            {
                // add a new device
                Device result = apiInstance.addDevice(body, start, end, netflowFilter, addFromWizard);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling LMApi.addDevice: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: LMv1
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');

$api_instance = new Swagger\Client\Api\LMApi();
$body = ; // Device | 
$start = 789; // Long | 
$end = 789; // Long | 
$netflowFilter = netflowFilter_example; // String | 
$addFromWizard = true; // Boolean | 

try {
    $result = $api_instance->addDevice($body, $start, $end, $netflowFilter, $addFromWizard);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling LMApi->addDevice: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::LMApi;

# Configure API key authorization: LMv1
$WWW::SwaggerClient::Configuration::api_key->{'Authorization'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'Authorization'} = "Bearer";

my $api_instance = WWW::SwaggerClient::LMApi->new();
my $body = WWW::SwaggerClient::Object::Device->new(); # Device | 
my $start = 789; # Long | 
my $end = 789; # Long | 
my $netflowFilter = netflowFilter_example; # String | 
my $addFromWizard = true; # Boolean | 

eval { 
    my $result = $api_instance->addDevice(body => $body, start => $start, end => $end, netflowFilter => $netflowFilter, addFromWizard => $addFromWizard);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling LMApi->addDevice: $@\n";
}
from __future__ import print_function
import time
import logicmonitor_sdk
from logicmonitor_sdk.rest import ApiException
from pprint import pprint


# Configure API key authorization: LMv1
configuration = logicmonitor_sdk.Configuration()
configuration.company = 'YOUR_COMPANY'
configuration.access_id = 'YOUR_ACCESS_ID'
configuration.access_key = 'YOUR_ACCESS_KEY'

# create an instance of the API class
api_instance = logicmonitor_sdk.LMApi(logicmonitor_sdk.ApiClient(configuration))
    
try: # add a new device api_response = api_instance.add_device(body, start=start, end=end, netflowFilter=netflowFilter, addFromWizard=addFromWizard) pprint(api_response) except ApiException as e: print("Exception when calling LMApi->addDevice: %s\n" % e)
package main

import (
    "fmt"
    "github.com/logicmonitor/lm-sdk-go/client"
    "github.com/logicmonitor/lm-sdk-go/client/lm"
)
func main() {
// Configure API key authorization: LMv1
domain := "YOUR_COMPANY.logicmonitor.com"
accessID := "YOUR_ACCESS_ID"
accessKey := "YOUR_ACCESS_KEY"

config := client.NewConfig()
config.SetAccountDomain(&domain)
config.SetAccessID(&accessID)
config.SetAccessKey(&accessKey)

// create an instance of the API class
client := client.New(config)
params := lm.NewAddDeviceParams()
    
// add a new device resp, err := client.LM.AddDevice(params) if err != nil { fmt.Printf("Exception when calling client.LM.AddDevice: %v", err.Error()) } fmt.Print(resp) }

Parameters

Body parameters
Name Description
body *
Query parameters
Name Description
start
Long (int64)
end
Long (int64)
netflowFilter
String
addFromWizard
Boolean

Responses

Status: 200 - successful operation

Status: default - Error


addDeviceDatasourceInstance

add device instance


/device/devices/{deviceId}/devicedatasources/{hdsId}/instances

Usage and SDK Samples

curl -X POST -H "Authorization: [[apiKey]]" "https://localhost/santaba/rest/device/devices/{deviceId}/devicedatasources/{hdsId}/instances"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.LMApi;

import java.io.File;
import java.util.*;

public class LMApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure API key authorization: LMv1
        ApiKeyAuth LMv1 = (ApiKeyAuth) defaultClient.getAuthentication("LMv1");
        LMv1.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //LMv1.setApiKeyPrefix("Token");

        LMApi apiInstance = new LMApi();
        Integer deviceId = 56; // Integer | 
        Integer hdsId = 56; // Integer | The device-datasource ID
        DeviceDataSourceInstance body = ; // DeviceDataSourceInstance | 
        try {
            DeviceDataSourceInstance result = apiInstance.addDeviceDatasourceInstance(deviceId, hdsId, body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling LMApi#addDeviceDatasourceInstance");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.LMApi;

public class LMApiExample {

    public static void main(String[] args) {
        LMApi apiInstance = new LMApi();
        Integer deviceId = 56; // Integer | 
        Integer hdsId = 56; // Integer | The device-datasource ID
        DeviceDataSourceInstance body = ; // DeviceDataSourceInstance | 
        try {
            DeviceDataSourceInstance result = apiInstance.addDeviceDatasourceInstance(deviceId, hdsId, body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling LMApi#addDeviceDatasourceInstance");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: LMv1)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"Authorization"];

Integer *deviceId = 56; // 
Integer *hdsId = 56; // The device-datasource ID
DeviceDataSourceInstance *body = ; // 

LMApi *apiInstance = [[LMApi alloc] init];

// add device instance 
[apiInstance addDeviceDatasourceInstanceWith:deviceId
    hdsId:hdsId
    body:body
              completionHandler: ^(DeviceDataSourceInstance output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var LogicMonitorRestApi = require('logic_monitor_rest_api');
var defaultClient = LogicMonitorRestApi.ApiClient.instance;

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

var api = new LogicMonitorRestApi.LMApi()

var deviceId = 56; // {Integer} 

var hdsId = 56; // {Integer} The device-datasource ID

var body = ; // {DeviceDataSourceInstance} 


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.addDeviceDatasourceInstance(deviceId, hdsId, body, callback);
using System;
using System.Diagnostics;
using logicmonitor_sdk.Api;
using logicmonitor_sdk.Client;
using logicmonitor_sdk.Model;

namespace Example
{
    public class addDeviceDatasourceInstanceExample
    {
        public void main()
        {
            
            // Configure API key authorization: LMv1
            Configuration.Default.ApiKey.Add("Authorization", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("Authorization", "Bearer");

            var apiInstance = new LMApi();
            var deviceId = 56;  // Integer | 
            var hdsId = 56;  // Integer | The device-datasource ID
            var body = new DeviceDataSourceInstance(); // DeviceDataSourceInstance | 

            try
            {
                // add device instance 
                DeviceDataSourceInstance result = apiInstance.addDeviceDatasourceInstance(deviceId, hdsId, body);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling LMApi.addDeviceDatasourceInstance: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: LMv1
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');

$api_instance = new Swagger\Client\Api\LMApi();
$deviceId = 56; // Integer | 
$hdsId = 56; // Integer | The device-datasource ID
$body = ; // DeviceDataSourceInstance | 

try {
    $result = $api_instance->addDeviceDatasourceInstance($deviceId, $hdsId, $body);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling LMApi->addDeviceDatasourceInstance: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::LMApi;

# Configure API key authorization: LMv1
$WWW::SwaggerClient::Configuration::api_key->{'Authorization'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'Authorization'} = "Bearer";

my $api_instance = WWW::SwaggerClient::LMApi->new();
my $deviceId = 56; # Integer | 
my $hdsId = 56; # Integer | The device-datasource ID
my $body = WWW::SwaggerClient::Object::DeviceDataSourceInstance->new(); # DeviceDataSourceInstance | 

eval { 
    my $result = $api_instance->addDeviceDatasourceInstance(deviceId => $deviceId, hdsId => $hdsId, body => $body);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling LMApi->addDeviceDatasourceInstance: $@\n";
}
from __future__ import print_function
import time
import logicmonitor_sdk
from logicmonitor_sdk.rest import ApiException
from pprint import pprint


# Configure API key authorization: LMv1
configuration = logicmonitor_sdk.Configuration()
configuration.company = 'YOUR_COMPANY'
configuration.access_id = 'YOUR_ACCESS_ID'
configuration.access_key = 'YOUR_ACCESS_KEY'

# create an instance of the API class
api_instance = logicmonitor_sdk.LMApi(logicmonitor_sdk.ApiClient(configuration))
    
try: # add device instance api_response = api_instance.add_device_datasource_instance(deviceId, hdsId, body) pprint(api_response) except ApiException as e: print("Exception when calling LMApi->addDeviceDatasourceInstance: %s\n" % e)
package main

import (
    "fmt"
    "github.com/logicmonitor/lm-sdk-go/client"
    "github.com/logicmonitor/lm-sdk-go/client/lm"
)
func main() {
// Configure API key authorization: LMv1
domain := "YOUR_COMPANY.logicmonitor.com"
accessID := "YOUR_ACCESS_ID"
accessKey := "YOUR_ACCESS_KEY"

config := client.NewConfig()
config.SetAccountDomain(&domain)
config.SetAccessID(&accessID)
config.SetAccessKey(&accessKey)

// create an instance of the API class
client := client.New(config)
params := lm.NewAddDeviceDatasourceInstanceParams()
    
// add device instance resp, err := client.LM.AddDeviceDatasourceInstance(params) if err != nil { fmt.Printf("Exception when calling client.LM.AddDeviceDatasourceInstance: %v", err.Error()) } fmt.Print(resp) }

Parameters

Path parameters
Name Description
deviceId*
Integer (int32)
Required