Using LogicMonitor's REST API

Last updated on 05 January, 2024

All the updates and enhancements will be done to LogicMonitor REST API v3 ONLY. We strongly recommend that you switch to the latest v3 to stay ahead.

The LogicMonitor REST API will allow you to programmatically query and manage your LogicMonitor resources: dashboards, devices, reports, services, alerts, collectors, datasources, SDTs and more.

Base URL

The base URL for making REST API requests is:

https://ACCOUNTNAME.logicmonitor.com/santaba/rest

Here, you must replace ACCOUNTNAME with your LogicMonitor account name.

Supported API Versions

LogicMonitor REST APIs are available in three versions: v3, v2, and v1. You must consider the following guidelines to decide the version you want to use:

  • We follow Semantic versioning, but only major version is allowed in requests (the most recent minor / patch versions will always be returned)
  • All the updates and enhancements will be done to version 3 ONLY.
  • Version can be specified in an X-Version header, or in the URL as a query parameter. You can make v3 requests by including a ‘?v=3’ query parameter or by including a ‘X-Version:3’ header.

To access the latest v3 APIs, see v3 Swagger Documentation.

Authentication

Each request sent to the LogicMonitor server must be made over HTTPS, and must also be authenticated. All data is received as JSON.  LogicMonitor REST API currently supports two authentication methods:

  • API token-based authentication
  • Basic authentication

Note: Basic Authentication is only supported in v1 of the API, and may not be available with future versions of the API. Therefore, we highly recommend that you make REST API requests with API Token Authentication.

For more information, see REST API Authentication.

Rate Limiting

Rate limits are imposed for requests to LogicMonitor REST API. Limits vary per endpoint and method combination. For a listing of default rate limits, details on pulling rate limit information from response headers, and several cross-language examples of how to adjust scripts to accommodate rate limits, see Rate Limiting.

Status Codes and Error Codes

With each API version that we rolled out, we have evolved and improved the Status codes and Error codes. To access the list, see Status codes and Error codes.

Change Log

LogicMonitor REST APIs are constantly evolving. To track all the updates done to our APIs, see Change Log.

Supported HTTP Methods

LogicMonitor REST API use the globally-used HTTP verbs or methods. They are POST, GET, PUT, PATCH, and DELETE. These methods correspond to Create, Read/Retrieve, Update, and Delete (aka CRUD) operations, respectively.

  • POST– POST APIs are typically used to create new subordinate resources. LogicMonitor REST API use POST method to add API tokens, Dashboard groups, and so on. For example, POST/dashboard/groups and POST/setting/alert/chains.
  • GET– Use the GET request to read/retrieve resource information. You can use the GET method to get a representation of your resource’s content and data. For example, GET/alert/alerts/{id} and GET/dashboard/groups/{id}.
  • PUT– Use the PUT method to update a resource by completely replacing its content. Consistent with REST standards, any properties not specified in a PUT request will revert back to their default values. Examples of PUT requests are PUT/setting/alert/chains/{id} and PUT/setting/recipientgroups/{id}.
  • PATCH– Use the PATCH method to update/modify resource content. In your PATCH request you must specify the updates you want to make to the resource. For example, PATCH/report/reports/{id} and PATCH/setting/roles/{id}.
  • DELETE– Use the DELETE method to delete a resource identified by a URI. The resource is removed entirely. For example, DELETE/sdt/sdts/{id} and DELETE/setting/recipientgroups/{id}.

LogicMonitor SDK

In addition to the REST APIs, LogicMonitor also supports Python and GO SDKs. You must authenticate yourself before using the GO and Python SDK. To authenticate yourself, you can either use an LMv1Auth or a Bearer token. To get the downloadable v3 SDK files, see LogicMonitor v3 SDK.

Note: The updated Python and GO v3 SDK files released in Platform v198 will be available after v198 deployment to production is complete. For any questions, contact your LogicMonitor Customer Success Manager.

In This Article