LogicMonitor REST API

APITokens

addApiTokenByAdminId

add api tokens for a user


/setting/admins/{adminId}/apitokens

Usage and SDK Samples

curl -X POST\
-H "Authorization: [[apiKey]]"\
-H "Accept: application/json"\
-H "Content-Type: application/json"\
"/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.APITokensApi;

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

public class APITokensApiExample {

    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");

        APITokensApi apiInstance = new APITokensApi();
        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 APITokensApi#addApiTokenByAdminId");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.APITokensApi;

public class APITokensApiExample {

    public static void main(String[] args) {
        APITokensApi apiInstance = new APITokensApi();
        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 APITokensApi#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)

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

// add api tokens for a user
[apiInstance addApiTokenByAdminIdWith
    adminId:adminId: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.APITokensApi()
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(adminIdbody, 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 APITokensApi();
            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 APITokensApi.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\ApiAPITokensApi();
$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 APITokensApi->addApiTokenByAdminId: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::APITokensApi;

# 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::APITokensApi->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 APITokensApi->addApiTokenByAdminId: $@\n";
}
from __future__ import print_function
import time
import getpass
import logicmonitor_sdk
from logicmonitor_sdk.rest import ApiException
from pprint import pprint


configuration = logicmonitor_sdk.Configuration()
# Account Info: LogicMonitor recommends to NEVER hardcode the credentials. Instead, retrieve the values from a secure storage.
# Note: The below is provided for illustration purposes only.
# Configure API key authorization: LMv1
configuration.company = 'YOUR_COMPANY'
configuration.access_id = getpass.getpass("Enter your AccessId: ")
configuration.access_key = getpass.getpass("Enter your AccessKey: ")

# Configure API key authorization: Bearer configuration. In case of bearer token remove the above access_key and access_id assignments as they are LMv1 specific
# configuration.auth_type = "Bearer"
# configuration.bearer_token = getpass.getpass("Enter your Bearer Token: ")

# create an instance of the API class test2
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) print(api_response) except ApiException as e: print("Exception when calling APITokensApi->addApiTokenByAdminId: %s\n" % e)
package main

import (
    "fmt"
    "strings"
    "syscall"
    "golang.org/x/term"
    "github.com/logicmonitor/lm-sdk-go/client"
    "github.com/logicmonitor/lm-sdk-go/client/lm"
    "github.com/logicmonitor/lm-sdk-go/models"
)
func main() {
// Configure API key authorization: LMv1
domain := "YOUR_COMPANY.logicmonitor.com"
// Account Info: LogicMonitor recommends to NEVER hardcode the credentials. Instead, retrieve the values from a secure storage.
// Note: The below is provided for illustration purposes only.

// Configure API key authorization: LMv1
fmt.Println("\nEnter AccessID: ")
byteAccessID, err := term.ReadPassword(int(syscall.Stdin))
if err != nil {
        return
}
accessID := strings.TrimSpace(string(byteAccessID))

fmt.Println("\nEnter AccessKey: ")
byteAccessKey, err := term.ReadPassword(int(syscall.Stdin))
if err != nil {
        return
}
accessKey := strings.TrimSpace(string(byteAccessKey))

// Configure API key authorization: Bearer configuration. In case of bearer token remove the above access_key and access_id assignments as they are LMv1 specific
// fmt.Println("\nEnter Bearer Token: ")
// byteBearer, err := term.ReadPassword(int(syscall.Stdin))
// if err != nil {
//        return
// }
// bearer := strings.TrimSpace(string(byteBearer))


config := client.NewConfig()
config.SetAccountDomain(&domain)
config.SetAccessID(&accessID)
config.SetAccessKey(&accessKey)
// config.SetBearerToken(&bearer)
// create an instance of the API class
client := client.New(config)
params := lm.NewAddApiTokenByAdminIdParams()
// add api tokens for a user
// This method returns the all fields irrespective of 'fields' param. 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


getApiTokenList

get a list of api tokens across users


/setting/admins/apitokens

Usage and SDK Samples

curl -X GET\
-H "Authorization: [[apiKey]]"\
-H "Accept: application/json"\
"/santaba/rest/setting/admins/apitokens?type=&permission=&fields=&size=&offset=&filter="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.APITokensApi;

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

public class APITokensApiExample {

    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");

        APITokensApi apiInstance = new APITokensApi();
        String type = type_example; // String | 
        String permission = permission_example; // String | 
        String fields = fields_example; // String | 
        Integer size = 56; // Integer | 
        Integer offset = 56; // Integer | 
        String filter = filter_example; // String | 
        try {
            ApiTokenPaginationResponse result = apiInstance.getApiTokenList(type, permission, fields, size, offset, filter);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling APITokensApi#getApiTokenList");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.APITokensApi;

public class APITokensApiExample {

    public static void main(String[] args) {
        APITokensApi apiInstance = new APITokensApi();
        String type = type_example; // String | 
        String permission = permission_example; // String | 
        String fields = fields_example; // String | 
        Integer size = 56; // Integer | 
        Integer offset = 56; // Integer | 
        String filter = filter_example; // String | 
        try {
            ApiTokenPaginationResponse result = apiInstance.getApiTokenList(type, permission, fields, size, offset, filter);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling APITokensApi#getApiTokenList");
            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"];
String *type = type_example; //  (optional)
String *permission = permission_example; //  (optional)
String *fields = fields_example; //  (optional)
Integer *size = 56; //  (optional) (default to 50)
Integer *offset = 56; //  (optional) (default to 0)
String *filter = filter_example; //  (optional)

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

// get a list of api tokens across users
[apiInstance getApiTokenListWith:type
    permission:permission
    fields:fields
    size:size
    offset:offset
    filter:filter
              completionHandler: ^(ApiTokenPaginationResponse 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.APITokensApi()
var opts = { 
  'type': type_example, // {{String}} 
  'permission': permission_example, // {{String}} 
  'fields': fields_example, // {{String}} 
  'size': 56, // {{Integer}} 
  'offset': 56, // {{Integer}} 
  'filter': filter_example // {{String}} 
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getApiTokenList(opts, callback);
using System;
using System.Diagnostics;
using logicmonitor_sdk.Api;
using logicmonitor_sdk.Client;
using logicmonitor_sdk.Model;

namespace Example
{
    public class getApiTokenListExample
    {
        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 APITokensApi();
            var type = type_example;  // String |  (optional) 
            var permission = permission_example;  // String |  (optional) 
            var fields = fields_example;  // String |  (optional) 
            var size = 56;  // Integer |  (optional)  (default to 50)
            var offset = 56;  // Integer |  (optional)  (default to 0)
            var filter = filter_example;  // String |  (optional) 

            try
            {
                // get a list of api tokens across users
                ApiTokenPaginationResponse result = apiInstance.getApiTokenList(type, permission, fields, size, offset, filter);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling APITokensApi.getApiTokenList: " + 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\ApiAPITokensApi();
$type = type_example; // String | 
$permission = permission_example; // String | 
$fields = fields_example; // String | 
$size = 56; // Integer | 
$offset = 56; // Integer | 
$filter = filter_example; // String | 

try {
    $result = $api_instance->getApiTokenList($type, $permission, $fields, $size, $offset, $filter);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling APITokensApi->getApiTokenList: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::APITokensApi;

# 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::APITokensApi->new();
my $type = type_example; # String | 
my $permission = permission_example; # String | 
my $fields = fields_example; # String | 
my $size = 56; # Integer | 
my $offset = 56; # Integer | 
my $filter = filter_example; # String | 

eval { 
    my $result = $api_instance->getApiTokenList(type => $type, permission => $permission, fields => $fields, size => $size, offset => $offset, filter => $filter);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling APITokensApi->getApiTokenList: $@\n";
}
from __future__ import print_function
import time
import getpass
import logicmonitor_sdk
from logicmonitor_sdk.rest import ApiException
from pprint import pprint


configuration = logicmonitor_sdk.Configuration()
# Account Info: LogicMonitor recommends to NEVER hardcode the credentials. Instead, retrieve the values from a secure storage.
# Note: The below is provided for illustration purposes only.
# Configure API key authorization: LMv1
configuration.company = 'YOUR_COMPANY'
configuration.access_id = getpass.getpass("Enter your AccessId: ")
configuration.access_key = getpass.getpass("Enter your AccessKey: ")

# Configure API key authorization: Bearer configuration. In case of bearer token remove the above access_key and access_id assignments as they are LMv1 specific
# configuration.auth_type = "Bearer"
# configuration.bearer_token = getpass.getpass("Enter your Bearer Token: ")

# create an instance of the API class test2
api_instance = logicmonitor_sdk.LMApi(logicmonitor_sdk.ApiClient(configuration))

    
try: # get a list of api tokens across users api_response = api_instance.get_api_token_list(type=type, permission=permission, fields=fields, size=size, offset=offset, filter=filter) print(api_response) except ApiException as e: print("Exception when calling APITokensApi->getApiTokenList: %s\n" % e)
package main

import (
    "fmt"
    "strings"
    "syscall"
    "golang.org/x/term"
    "github.com/logicmonitor/lm-sdk-go/client"
    "github.com/logicmonitor/lm-sdk-go/client/lm"
    "github.com/logicmonitor/lm-sdk-go/models"
)
func main() {
// Configure API key authorization: LMv1
domain := "YOUR_COMPANY.logicmonitor.com"
// Account Info: LogicMonitor recommends to NEVER hardcode the credentials. Instead, retrieve the values from a secure storage.
// Note: The below is provided for illustration purposes only.

// Configure API key authorization: LMv1
fmt.Println("\nEnter AccessID: ")
byteAccessID, err := term.ReadPassword(int(syscall.Stdin))
if err != nil {
        return
}
accessID := strings.TrimSpace(string(byteAccessID))

fmt.Println("\nEnter AccessKey: ")
byteAccessKey, err := term.ReadPassword(int(syscall.Stdin))
if err != nil {
        return
}
accessKey := strings.TrimSpace(string(byteAccessKey))

// Configure API key authorization: Bearer configuration. In case of bearer token remove the above access_key and access_id assignments as they are LMv1 specific
// fmt.Println("\nEnter Bearer Token: ")
// byteBearer, err := term.ReadPassword(int(syscall.Stdin))
// if err != nil {
//        return
// }
// bearer := strings.TrimSpace(string(byteBearer))


config := client.NewConfig()
config.SetAccountDomain(&domain)
config.SetAccessID(&accessID)
config.SetAccessKey(&accessKey)
// config.SetBearerToken(&bearer)
// create an instance of the API class
client := client.New(config)
params := lm.NewGetApiTokenListParams()
// get a list of api tokens across users
// This method returns the all fields irrespective of 'fields' param. resp, err := client.LM.GetApiTokenList(params) if err != nil { fmt.Printf("Exception when calling client.LM.GetApiTokenList: %v", err.Error()) } fmt.Print(resp) }

Parameters

Query parameters
Name Description
type
String
permission
String
fields
String
size
Integer (int32)
offset
Integer (int32)
filter
String

Responses

Status: 200 - successful operation

Status: default - Error


getApiTokenListByAdminId

get api tokens for a user


/setting/admins/{adminId}/apitokens

Usage and SDK Samples

curl -X GET\
-H "Authorization: [[apiKey]]"\
-H "Accept: application/json"\
"/santaba/rest/setting/admins/{adminId}/apitokens?type=&permission=&fields=&size=&offset=&filter="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.APITokensApi;

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

public class APITokensApiExample {

    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");

        APITokensApi apiInstance = new APITokensApi();
        Integer adminId = 56; // Integer | 
        String type = type_example; // String | 
        String permission = permission_example; // String | 
        String fields = fields_example; // String | 
        Integer size = 56; // Integer | 
        Integer offset = 56; // Integer | 
        String filter = filter_example; // String | 
        try {
            ApiTokenPaginationResponse result = apiInstance.getApiTokenListByAdminId(adminId, type, permission, fields, size, offset, filter);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling APITokensApi#getApiTokenListByAdminId");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.APITokensApi;

public class APITokensApiExample {

    public static void main(String[] args) {
        APITokensApi apiInstance = new APITokensApi();
        Integer adminId = 56; // Integer | 
        String type = type_example; // String | 
        String permission = permission_example; // String | 
        String fields = fields_example; // String | 
        Integer size = 56; // Integer | 
        Integer offset = 56; // Integer | 
        String filter = filter_example; // String | 
        try {
            ApiTokenPaginationResponse result = apiInstance.getApiTokenListByAdminId(adminId, type, permission, fields, size, offset, filter);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling APITokensApi#getApiTokenListByAdminId");
            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; // 
String *type = type_example; //  (optional)
String *permission = permission_example; //  (optional)
String *fields = fields_example; //  (optional)
Integer *size = 56; //  (optional) (default to 50)
Integer *offset = 56; //  (optional) (default to 0)
String *filter = filter_example; //  (optional)

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

// get api tokens for a user
[apiInstance getApiTokenListByAdminIdWith:adminId
    type:type
    permission:permission
    fields:fields
    size:size
    offset:offset
    filter:filter
              completionHandler: ^(ApiTokenPaginationResponse 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.APITokensApi()
var adminId = 56; // {{Integer}} 
var opts = { 
  'type': type_example, // {{String}} 
  'permission': permission_example, // {{String}} 
  'fields': fields_example, // {{String}} 
  'size': 56, // {{Integer}} 
  'offset': 56, // {{Integer}} 
  'filter': filter_example // {{String}} 
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getApiTokenListByAdminId(adminId, opts, callback);
using System;
using System.Diagnostics;
using logicmonitor_sdk.Api;
using logicmonitor_sdk.Client;
using logicmonitor_sdk.Model;

namespace Example
{
    public class getApiTokenListByAdminIdExample
    {
        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 APITokensApi();
            var adminId = 56;  // Integer | 
            var type = type_example;  // String |  (optional) 
            var permission = permission_example;  // String |  (optional) 
            var fields = fields_example;  // String |  (optional) 
            var size = 56;  // Integer |  (optional)  (default to 50)
            var offset = 56;  // Integer |  (optional)  (default to 0)
            var filter = filter_example;  // String |  (optional) 

            try
            {
                // get api tokens for a user
                ApiTokenPaginationResponse result = apiInstance.getApiTokenListByAdminId(adminId, type, permission, fields, size, offset, filter);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling APITokensApi.getApiTokenListByAdminId: " + 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\ApiAPITokensApi();
$adminId = 56; // Integer | 
$type = type_example; // String | 
$permission = permission_example; // String | 
$fields = fields_example; // String | 
$size = 56; // Integer | 
$offset = 56; // Integer | 
$filter = filter_example; // String | 

try {
    $result = $api_instance->getApiTokenListByAdminId($adminId, $type, $permission, $fields, $size, $offset, $filter);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling APITokensApi->getApiTokenListByAdminId: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::APITokensApi;

# 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::APITokensApi->new();
my $adminId = 56; # Integer | 
my $type = type_example; # String | 
my $permission = permission_example; # String | 
my $fields = fields_example; # String | 
my $size = 56; # Integer | 
my $offset = 56; # Integer | 
my $filter = filter_example; # String | 

eval { 
    my $result = $api_instance->getApiTokenListByAdminId(adminId => $adminId, type => $type, permission => $permission, fields => $fields, size => $size, offset => $offset, filter => $filter);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling APITokensApi->getApiTokenListByAdminId: $@\n";
}
from __future__ import print_function
import time
import getpass
import logicmonitor_sdk
from logicmonitor_sdk.rest import ApiException
from pprint import pprint


configuration = logicmonitor_sdk.Configuration()
# Account Info: LogicMonitor recommends to NEVER hardcode the credentials. Instead, retrieve the values from a secure storage.
# Note: The below is provided for illustration purposes only.
# Configure API key authorization: LMv1
configuration.company = 'YOUR_COMPANY'
configuration.access_id = getpass.getpass("Enter your AccessId: ")
configuration.access_key = getpass.getpass("Enter your AccessKey: ")

# Configure API key authorization: Bearer configuration. In case of bearer token remove the above access_key and access_id assignments as they are LMv1 specific
# configuration.auth_type = "Bearer"
# configuration.bearer_token = getpass.getpass("Enter your Bearer Token: ")

# create an instance of the API class test2
api_instance = logicmonitor_sdk.LMApi(logicmonitor_sdk.ApiClient(configuration))

    
try: # get api tokens for a user api_response = api_instance.get_api_token_list_by_admin_id(adminId, type=type, permission=permission, fields=fields, size=size, offset=offset, filter=filter) print(api_response) except ApiException as e: print("Exception when calling APITokensApi->getApiTokenListByAdminId: %s\n" % e)
package main

import (
    "fmt"
    "strings"
    "syscall"
    "golang.org/x/term"
    "github.com/logicmonitor/lm-sdk-go/client"
    "github.com/logicmonitor/lm-sdk-go/client/lm"
    "github.com/logicmonitor/lm-sdk-go/models"
)
func main() {
// Configure API key authorization: LMv1
domain := "YOUR_COMPANY.logicmonitor.com"
// Account Info: LogicMonitor recommends to NEVER hardcode the credentials. Instead, retrieve the values from a secure storage.
// Note: The below is provided for illustration purposes only.

// Configure API key authorization: LMv1
fmt.Println("\nEnter AccessID: ")
byteAccessID, err := term.ReadPassword(int(syscall.Stdin))
if err != nil {
        return
}
accessID := strings.TrimSpace(string(byteAccessID))

fmt.Println("\nEnter AccessKey: ")
byteAccessKey, err := term.ReadPassword(int(syscall.Stdin))
if err != nil {
        return
}
accessKey := strings.TrimSpace(string(byteAccessKey))

// Configure API key authorization: Bearer configuration. In case of bearer token remove the above access_key and access_id assignments as they are LMv1 specific
// fmt.Println("\nEnter Bearer Token: ")
// byteBearer, err := term.ReadPassword(int(syscall.Stdin))
// if err != nil {
//        return
// }
// bearer := strings.TrimSpace(string(byteBearer))


config := client.NewConfig()
config.SetAccountDomain(&domain)
config.SetAccessID(&accessID)
config.SetAccessKey(&accessKey)
// config.SetBearerToken(&bearer)
// create an instance of the API class
client := client.New(config)
params := lm.NewGetApiTokenListByAdminIdParams()
// get api tokens for a user
// This method returns the all fields irrespective of 'fields' param. resp, err := client.LM.GetApiTokenListByAdminId(params) if err != nil { fmt.Printf("Exception when calling client.LM.GetApiTokenListByAdminId: %v", err.Error()) } fmt.Print(resp) }

Parameters

Path parameters
Name Description
adminId*
Integer (int32)
Required
Query parameters
Name Description
type
String
permission
String
fields
String
size
Integer (int32)
offset
Integer (int32)
filter
String

Responses

Status: 200 - successful operation

Status: default - Error


AccessGroup

addAccessGroup

Create a access group


/setting/accessgroup/add

Usage and SDK Samples

curl -X POST\
-H "Authorization: [[apiKey]]"\
-H "Accept: application/json"\
-H "Content-Type: application/json"\
"/santaba/rest/setting/accessgroup/add"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.AccessGroupApi;

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

public class AccessGroupApiExample {

    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");

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

public class AccessGroupApiExample {

    public static void main(String[] args) {
        AccessGroupApi apiInstance = new AccessGroupApi();
        AccessGroup body = ; // AccessGroup | 
        try {
            AccessGroup result = apiInstance.addAccessGroup(body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AccessGroupApi#addAccessGroup");
            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"];
AccessGroup *body = ; //  (optional)

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

// Create a access group
[apiInstance addAccessGroupWith:body
              completionHandler: ^(AccessGroup 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.AccessGroupApi()
var opts = { 
  'body':  // {{AccessGroup}} 
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.addAccessGroup(opts, callback);
using System;
using System.Diagnostics;
using logicmonitor_sdk.Api;
using logicmonitor_sdk.Client;
using logicmonitor_sdk.Model;

namespace Example
{
    public class addAccessGroupExample
    {
        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 AccessGroupApi();
            var body = new AccessGroup(); // AccessGroup |  (optional) 

            try
            {
                // Create a access group
                AccessGroup result = apiInstance.addAccessGroup(body);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling AccessGroupApi.addAccessGroup: " + 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\ApiAccessGroupApi();
$body = ; // AccessGroup | 

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

# 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::AccessGroupApi->new();
my $body = WWW::SwaggerClient::Object::AccessGroup->new(); # AccessGroup | 

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


configuration = logicmonitor_sdk.Configuration()
# Account Info: LogicMonitor recommends to NEVER hardcode the credentials. Instead, retrieve the values from a secure storage.
# Note: The below is provided for illustration purposes only.
# Configure API key authorization: LMv1
configuration.company = 'YOUR_COMPANY'
configuration.access_id = getpass.getpass("Enter your AccessId: ")
configuration.access_key = getpass.getpass("Enter your AccessKey: ")

# Configure API key authorization: Bearer configuration. In case of bearer token remove the above access_key and access_id assignments as they are LMv1 specific
# configuration.auth_type = "Bearer"
# configuration.bearer_token = getpass.getpass("Enter your Bearer Token: ")

# create an instance of the API class test2
api_instance = logicmonitor_sdk.LMApi(logicmonitor_sdk.ApiClient(configuration))

    
try: # Create a access group api_response = api_instance.add_access_group(body=body) print(api_response) except ApiException as e: print("Exception when calling AccessGroupApi->addAccessGroup: %s\n" % e)
package main

import (
    "fmt"
    "strings"
    "syscall"
    "golang.org/x/term"
    "github.com/logicmonitor/lm-sdk-go/client"
    "github.com/logicmonitor/lm-sdk-go/client/lm"
    "github.com/logicmonitor/lm-sdk-go/models"
)
func main() {
// Configure API key authorization: LMv1
domain := "YOUR_COMPANY.logicmonitor.com"
// Account Info: LogicMonitor recommends to NEVER hardcode the credentials. Instead, retrieve the values from a secure storage.
// Note: The below is provided for illustration purposes only.

// Configure API key authorization: LMv1
fmt.Println("\nEnter AccessID: ")
byteAccessID, err := term.ReadPassword(int(syscall.Stdin))
if err != nil {
        return
}
accessID := strings.TrimSpace(string(byteAccessID))

fmt.Println("\nEnter AccessKey: ")
byteAccessKey, err := term.ReadPassword(int(syscall.Stdin))
if err != nil {
        return
}
accessKey := strings.TrimSpace(string(byteAccessKey))

// Configure API key authorization: Bearer configuration. In case of bearer token remove the above access_key and access_id assignments as they are LMv1 specific
// fmt.Println("\nEnter Bearer Token: ")
// byteBearer, err := term.ReadPassword(int(syscall.Stdin))
// if err != nil {
//        return
// }
// bearer := strings.TrimSpace(string(byteBearer))


config := client.NewConfig()
config.SetAccountDomain(&domain)
config.SetAccessID(&accessID)
config.SetAccessKey(&accessKey)
// config.SetBearerToken(&bearer)
// create an instance of the API class
client := client.New(config)
params := lm.NewAddAccessGroupParams()
// Create a access group
// This method returns the all fields irrespective of 'fields' param. resp, err := client.LM.AddAccessGroup(params) if err != nil { fmt.Printf("Exception when calling client.LM.AddAccessGroup: %v", err.Error()) } fmt.Print(resp) }

Parameters

Body parameters
Name Description
body

Responses

Status: 200 - successful operation

Status: default - Error


deleteAccessGroup

Delete access group


/setting/accessgroup/{id}

Usage and SDK Samples

curl -X DELETE\
-H "Authorization: [[apiKey]]"\
-H "Accept: application/json"\
"/santaba/rest/setting/accessgroup/{id}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.AccessGroupApi;

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

public class AccessGroupApiExample {

    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");

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

public class AccessGroupApiExample {

    public static void main(String[] args) {
        AccessGroupApi apiInstance = new AccessGroupApi();
        Integer id = 56; // Integer | 
        try {
            Object result = apiInstance.deleteAccessGroup(id);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AccessGroupApi#deleteAccessGroup");
            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; // 

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

// Delete access group
[apiInstance deleteAccessGroupWith: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.AccessGroupApi()
var id = 56; // {{Integer}} 

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

namespace Example
{
    public class deleteAccessGroupExample
    {
        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 AccessGroupApi();
            var id = 56;  // Integer | 

            try
            {
                // Delete access group
                Object result = apiInstance.deleteAccessGroup(id);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling AccessGroupApi.deleteAccessGroup: " + 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\ApiAccessGroupApi();
$id = 56; // Integer | 

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

# 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::AccessGroupApi->new();
my $id = 56; # Integer | 

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


configuration = logicmonitor_sdk.Configuration()
# Account Info: LogicMonitor recommends to NEVER hardcode the credentials. Instead, retrieve the values from a secure storage.
# Note: The below is provided for illustration purposes only.
# Configure API key authorization: LMv1
configuration.company = 'YOUR_COMPANY'
configuration.access_id = getpass.getpass("Enter your AccessId: ")
configuration.access_key = getpass.getpass("Enter your AccessKey: ")

# Configure API key authorization: Bearer configuration. In case of bearer token remove the above access_key and access_id assignments as they are LMv1 specific
# configuration.auth_type = "Bearer"
# configuration.bearer_token = getpass.getpass("Enter your Bearer Token: ")

# create an instance of the API class test2
api_instance = logicmonitor_sdk.LMApi(logicmonitor_sdk.ApiClient(configuration))

    
try: # Delete access group api_response = api_instance.delete_access_group(id) print(api_response) except ApiException as e: print("Exception when calling AccessGroupApi->deleteAccessGroup: %s\n" % e)
package main

import (
    "fmt"
    "strings"
    "syscall"
    "golang.org/x/term"
    "github.com/logicmonitor/lm-sdk-go/client"
    "github.com/logicmonitor/lm-sdk-go/client/lm"
    "github.com/logicmonitor/lm-sdk-go/models"
)
func main() {
// Configure API key authorization: LMv1
domain := "YOUR_COMPANY.logicmonitor.com"
// Account Info: LogicMonitor recommends to NEVER hardcode the credentials. Instead, retrieve the values from a secure storage.
// Note: The below is provided for illustration purposes only.

// Configure API key authorization: LMv1
fmt.Println("\nEnter AccessID: ")
byteAccessID, err := term.ReadPassword(int(syscall.Stdin))
if err != nil {
        return
}
accessID := strings.TrimSpace(string(byteAccessID))

fmt.Println("\nEnter AccessKey: ")
byteAccessKey, err := term.ReadPassword(int(syscall.Stdin))
if err != nil {
        return
}
accessKey := strings.TrimSpace(string(byteAccessKey))

// Configure API key authorization: Bearer configuration. In case of bearer token remove the above access_key and access_id assignments as they are LMv1 specific
// fmt.Println("\nEnter Bearer Token: ")
// byteBearer, err := term.ReadPassword(int(syscall.Stdin))
// if err != nil {
//        return
// }
// bearer := strings.TrimSpace(string(byteBearer))


config := client.NewConfig()
config.SetAccountDomain(&domain)
config.SetAccessID(&accessID)
config.SetAccessKey(&accessKey)
// config.SetBearerToken(&bearer)
// create an instance of the API class
client := client.New(config)
params := lm.NewDeleteAccessGroupParams()
// Delete access group
// This method returns the all fields irrespective of 'fields' param. resp, err := client.LM.DeleteAccessGroup(params) if err != nil { fmt.Printf("Exception when calling client.LM.DeleteAccessGroup: %v", err.Error()) } fmt.Print(resp) }

Parameters

Path parameters
Name Description
id*
Integer (int32)
Required

Responses

Status: 200 - successful operation

Status: default - Error


getAccessGroupById

Get access group by id


/setting/accessgroup/{id}

Usage and SDK Samples

curl -X GET\
-H "Authorization: [[apiKey]]"\
-H "Accept: application/json"\
"/santaba/rest/setting/accessgroup/{id}?fields="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.AccessGroupApi;

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

public class AccessGroupApiExample {

    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");

        AccessGroupApi apiInstance = new AccessGroupApi();
        Integer id = 56; // Integer | 
        String fields = fields_example; // String | 
        try {
            AccessGroup result = apiInstance.getAccessGroupById(id, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AccessGroupApi#getAccessGroupById");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.AccessGroupApi;

public class AccessGroupApiExample {

    public static void main(String[] args) {
        AccessGroupApi apiInstance = new AccessGroupApi();
        Integer id = 56; // Integer | 
        String fields = fields_example; // String | 
        try {
            AccessGroup result = apiInstance.getAccessGroupById(id, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AccessGroupApi#getAccessGroupById");
            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; // 
String *fields = fields_example; //  (optional)

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

// Get access group by id
[apiInstance getAccessGroupByIdWith:id
    fields:fields
              completionHandler: ^(AccessGroup 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.AccessGroupApi()
var id = 56; // {{Integer}} 
var opts = { 
  'fields': fields_example // {{String}} 
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getAccessGroupById(id, opts, callback);
using System;
using System.Diagnostics;
using logicmonitor_sdk.Api;
using logicmonitor_sdk.Client;
using logicmonitor_sdk.Model;

namespace Example
{
    public class getAccessGroupByIdExample
    {
        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 AccessGroupApi();
            var id = 56;  // Integer | 
            var fields = fields_example;  // String |  (optional) 

            try
            {
                // Get access group by id
                AccessGroup result = apiInstance.getAccessGroupById(id, fields);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling AccessGroupApi.getAccessGroupById: " + 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\ApiAccessGroupApi();
$id = 56; // Integer | 
$fields = fields_example; // String | 

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

# 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::AccessGroupApi->new();
my $id = 56; # Integer | 
my $fields = fields_example; # String | 

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


configuration = logicmonitor_sdk.Configuration()
# Account Info: LogicMonitor recommends to NEVER hardcode the credentials. Instead, retrieve the values from a secure storage.
# Note: The below is provided for illustration purposes only.
# Configure API key authorization: LMv1
configuration.company = 'YOUR_COMPANY'
configuration.access_id = getpass.getpass("Enter your AccessId: ")
configuration.access_key = getpass.getpass("Enter your AccessKey: ")

# Configure API key authorization: Bearer configuration. In case of bearer token remove the above access_key and access_id assignments as they are LMv1 specific
# configuration.auth_type = "Bearer"
# configuration.bearer_token = getpass.getpass("Enter your Bearer Token: ")

# create an instance of the API class test2
api_instance = logicmonitor_sdk.LMApi(logicmonitor_sdk.ApiClient(configuration))

    
try: # Get access group by id api_response = api_instance.get_access_group_by_id(id, fields=fields) print(api_response) except ApiException as e: print("Exception when calling AccessGroupApi->getAccessGroupById: %s\n" % e)
package main

import (
    "fmt"
    "strings"
    "syscall"
    "golang.org/x/term"
    "github.com/logicmonitor/lm-sdk-go/client"
    "github.com/logicmonitor/lm-sdk-go/client/lm"
    "github.com/logicmonitor/lm-sdk-go/models"
)
func main() {
// Configure API key authorization: LMv1
domain := "YOUR_COMPANY.logicmonitor.com"
// Account Info: LogicMonitor recommends to NEVER hardcode the credentials. Instead, retrieve the values from a secure storage.
// Note: The below is provided for illustration purposes only.

// Configure API key authorization: LMv1
fmt.Println("\nEnter AccessID: ")
byteAccessID, err := term.ReadPassword(int(syscall.Stdin))
if err != nil {
        return
}
accessID := strings.TrimSpace(string(byteAccessID))

fmt.Println("\nEnter AccessKey: ")
byteAccessKey, err := term.ReadPassword(int(syscall.Stdin))
if err != nil {
        return
}
accessKey := strings.TrimSpace(string(byteAccessKey))

// Configure API key authorization: Bearer configuration. In case of bearer token remove the above access_key and access_id assignments as they are LMv1 specific
// fmt.Println("\nEnter Bearer Token: ")
// byteBearer, err := term.ReadPassword(int(syscall.Stdin))
// if err != nil {
//        return
// }
// bearer := strings.TrimSpace(string(byteBearer))


config := client.NewConfig()
config.SetAccountDomain(&domain)
config.SetAccessID(&accessID)
config.SetAccessKey(&accessKey)
// config.SetBearerToken(&bearer)
// create an instance of the API class
client := client.New(config)
params := lm.NewGetAccessGroupByIdParams()