Rate limits are imposed for requests to LogicMonitor’s REST API. Limits are assigned per endpoint and method combination. For example, requests to GET /device/devices may have a different limit than requests to POST /device/devices or requests to GET /device/devices/ID/devicedatasources. Requests that are made in excess of the rate limits will get an HTTP 429 Too Many Requests and a response containing an error. Limits are not per user, and will apply to all requests made for your account.
Important: Default limits are tested for occasional peak usage, and not continuous use of the API at these limits. Continuous use of the API at the rated limits can impact the overall performance of the portal. LogicMonitor gives the highest precedence to the portal availability and performance and, therefore, reserves the right to reduce the API limits from the defaults if portal performance, alerting, and data collection are adversely affected. If your needs exceed these design limits, please work with your customer success manager proactively to discuss possible options.
Information about limits and proximity to limits is returned in the below response headers. This enables you to view the rate limits that will be imposed and adjust scripts as needed to work around them.
Header
Description
X-Rate-Limit-Limit
Request limit per X-Rate-Limit-Window
X-Rate-Limit-Remaining
The number of requests left for the time window
X-Rate-Limit-Window
The rolling time window length with the unit of second
Rate Limiting Logic
We recommend basing any logic intended to work around rate limiting on the above headers and their values, as the limits are subject to change. For example, you may introduce logic in your script that, when rate limits have been met, waits 60 seconds before making another request. The following are examples of such logic across various languages.
Python
The following logic can be utilized in a loop using the requests module, and implements a simple timeout if the ‘X-Rate-Limit-Remaining’ header value gets to zero.
if (response.headers['X-Rate-Limit-Remaining'] == 0):
window = response.headers['X-Rate-Limit-Window']
time.sleep(float(window))
Python
Copy
Ruby
The following logic can be utilized in a loop using the net http library, and implements a simple timeout if the ‘X-Rate-Limit-Remaining’ header value gets to zero.
if resp['X-Rate-Limit-Remaining'].to_i == 0
sleep resp['X-Rate-Limit-Window'].to_i
end
Ruby
Copy
Groovy
The following logic can be utilized in a loop using the Apache http library, and implements a simple timeout if the ‘X-Rate-Limit-Remaining’ header value gets to zero.
remainingRequestsHeader = response.getHeaders('X-Rate-Limit-Remaining');
windowHeader = response.getHeaders('X-Rate-Limit-Window');
remainingRequests = remainingRequestsHeader[0].getValue();
window = windowHeader[0].getValue();
if (remainingRequests.toInteger() == 0){
Thread.sleep(window.toInteger() * 1000);
}
Groovy
Copy
PowerShell
How you should work around rate limiting with PowerShell depends on how you’re making requests. The Invoke-RestMethod cmdlet throws out response headers unless an exception occurs, and as such we recommend attempting retries when an HTTP 429 is returned if using Invoke-RestMethod. For example, you could make the API request in a try catch loop, and retry if the resulting status is 429, as shown in the following code example.
(Alternately, you can use Invoke-WebRequest cmdlet and add logic based on the rate limiting response headers.)
<# Make request & retry if failed due to rate limiting #>
$Stoploop = $false
do {
try {
<# Make Request #>
$response = Invoke-RestMethod -Uri $url -Method $httpVerb -Headers $headers
<# Print status and body of response #>
$status = $response.status
$body = $response.data| ConvertTo-Json -Depth 5
Write-Host "Status:$status"
Write-Host "Response:$body"
$Stoploop = $true
}
catch {
if ($response.status -eq 429){
Write-Host "Request exceeded rate limit, retrying in 60 seconds..."
Start-Sleep -Seconds 60
}
else {
Write-Host "Request failed, not as a result of rate limiting"
$Stoploop = $true
}
}
}
While ($Stoploop -eq $false)
PowerShell
Copy
Default Rate Limits
The following tables list default rate limits per endpoint/method request combination.
Alert Rules
HTTP Method API Request Rate Limit Description PATCH /santaba/rest/setting/alert/rules/{id} 250/min Update alert rule GET /santaba/rest/setting/alert/rules/{id} 500/min Get alert rule by ID DELETE /santaba/rest/setting/alert/rules/{id} 300/min Delete alert rule PUT /santaba/rest/setting/alert/rules/{id} 200/min Update alert rule POST /santaba/rest/setting/alert/rules 200/min Add alert rule GET /santaba/rest/setting/alert/rules 500/min Get alert rule list
Alerts
HTTP Method API Request Rate Limit Description GET /santaba/rest/alert/alerts/{id} 500/min Get alert GET /santaba/rest/alert/alerts 400/min Get alert list POST /santaba/rest/alert/alerts/{id}/ack 200/min Acknowledge alert by ID POST /santaba/rest/alert/alerts/{id}/note 200/min Add alert note
API Tokens
HTTP Method API Request Rate Limit Description POST /santaba/rest/setting/admins/{adminId}/apitokens 200/min Add API tokens for a user GET /santaba/rest/setting/admins/{adminId}/apitokens 500/min Get API tokens for a user GET /santaba/rest/setting/admins/apitokens 500/min Get a list of API tokens across users
ApiPerfStats
HTTP Method API Request Rate Limit Description GET /santaba/rest/apiStats/externalApis 500/min Get external api stats info
AppliesToFunctions
HTTP Method API Request Rate Limit Description PATCH /santaba/rest/setting/functions/{id} 250/min Update applies to function GET /santaba/rest/setting/functions/{id} 500/min Get applies to function PUT /santaba/rest/setting/functions/{id} 200/min Update applies to function POST /santaba/rest/setting/functions 200/min Add applies to function GET /santaba/rest/setting/function 500/min Get applies to function list
Audit Logs
HTTP Method API Request Rate Limit Description GET /santaba/rest/setting/accesslog 500/min Get audit logs
Collector Groups
HTTP Method API Request Rate Limit Description POST /santaba/rest/setting/collector/groups 200/min Add collector group GET /santaba/rest/setting/collector/groups 500/min Get collector group list PATCH /santaba/rest/setting/collector/groups/{id} 250/min Update collector group GET /santaba/rest/setting/collector/groups/{id} 500/min Get collector group DELETE /santaba/rest/setting/collector/groups/{id} 300/min Delete collector group PUT /santaba/rest/setting/collector/groups/{id} 200/min Update collector group
Collectors
HTTP Method API Request Rate Limit Description GET /santaba/rest/setting/collector/collectors/{id} 500/min Get collector GET /santaba/rest/setting/collector/collectors 500/min Get collector list PATCH /santaba/rest/setting/collector/collectors/{id} 250/min Update collector POST /santaba/rest/setting/collector/collectors 200/min Add collector PUT /santaba/rest/setting/collector/collectors/{id} 200/min Update collector DELETE /santaba/rest/setting/collector/collectors/{id} 300/min Delete collector GET /santaba/rest/setting/collector/collectors/{collectorId}/installers/{osAndArch} 500/min Get collector installer POST /santaba/rest/setting/collector/collectors/{id}/ackdown 200/min Acknowledge collector down alert
Collector Versions
HTTP Method API Request Rate Limit Description GET /santaba/rest/setting/collector/collectors/versions 500/min Get collector version list
ConfigSources
HTTP Method API Request Rate Limit Description POST /santaba/rest/setting/configsources/{id}/audit 200/min Add audit version
Dashboard Groups
HTTP Method API Request Rate Limit Description PATCH /santaba/rest/dashboard/groups/{id} 250/min Update dashboard group GET /santaba/rest/dashboard/groups/{id} 500/min Get dashboard group DELETE /santaba/rest/dashboard/groups/{id} 300/min Delete dashboard group PUT /santaba/rest/dashboard/groups/{id} 200/min Update dashboard group POST /santaba/rest/dashboard/groups 200/min Add dashboard group GET /santaba/rest/dashboard/groups 500/min Get dashboard group list
Dashboards
HTTP Method API Request Rate Limit Description POST /santaba/rest/dashboard/dashboards 200/min Add dashboard GET /santaba/rest/dashboard/dashboards 500/min Get dashboard list GET /santaba/rest/dashboard/dashboards/{id}/widgets 500/min Get widget list by DashboardId PATCH /santaba/rest/dashboard/dashboards/{id} 250/min Update dashboard GET /santaba/rest/dashboard/dashboards/{id} 500/min Get dashboard DELETE /santaba/rest/dashboard/dashboards/{id} 300/min Delete dashboard PUT /santaba/rest/dashboard/dashboards/{id} 200/min Update dashboard
Data
HTTP Method API Request Rate Limit Description GET /santaba/rest/device/devices/{deviceId}/devicedatasources/{hdsId}/instances/{id}/graphs/{graphId}/data 500/min Get device instance graph data GET /santaba/rest/device/devices/{deviceId}/devicedatasources/{deviceDsId}/groups/{dsigId}/graphs/{ographId}/data 500/min Get device instance group overview graph data GET /santaba/rest/website/websites/{websiteId}/checkpoints/{checkpointId}/graphs/{graphName}/data 500/min Get website graph data GET /santaba/rest/device/devicedatasourceinstances/{instanceId}/graphs/{graphId}/data 500/min Get device instance data GET /santaba/rest/device/devices/{deviceId}/devicedatasources/{hdsId}/instances/{id}/data 500/min Get device instance data GET /santaba/rest/dashboard/widgets/{id}/data 500/min Get widget data GET /santaba/rest/website/websites/{srvId}/checkpoints/{checkId}/data 500/min Get data for a website checkpoint
Datasource Instances
HTTP Method API Request Rate Limit Description GET /santaba/rest/device/devices/{deviceId}/devicedatasources/{hdsId}/instances/{instanceId}/config 500/min Get detailed config information for the instance GET /santaba/rest/device/devices/{deviceId}/devicedatasources/{deviceDsId}/groups 500/min Get device datasource instance group list POST /santaba/rest/device/devices/{deviceId}/devicedatasources/{hdsId}/instances 200/min Add device instance GET /santaba/rest/device/devices/{deviceId}/devicedatasources/{hdsId}/instances 500/min Get device instance list POST /santaba/rest/device/devices/{deviceId}/devicedatasources/{hdsId}/instances/{instanceId}/config/configCollection 200/min Collect a config for a device GET /santaba/rest/device/devices/{deviceId}/devicedatasources/{hdsId}/instances/{id}/historysdts 500/min Get device instance SDT history PATCH /santaba/rest/device/devices/{deviceId}/devicedatasources/{hdsId}/instances/{id} 250/min Update device instance GET /santaba/rest/device/devices/{deviceId}/devicedatasources/{hdsId}/instances/{id} 500/min Get device instance DELETE /santaba/rest/device/devices/{deviceId}/devicedatasources/{hdsId}/instances/{id} 300/min Delete a device instance PUT /santaba/rest/device/devices/{deviceId}/devicedatasources/{hdsId}/instances/{id} 200/min Update device instance
Datasources
HTTP Method API Request Rate Limit Description GET /santaba/rest/setting/datasources/{dsId}/ograph 500/min Get datasource overview graph list GET /santaba/rest/setting/datasources/{id}/devices 500/min Get devices associated with a datasource GET /santaba/rest/setting/datasources 500/min Get datasource list GET /santaba/rest/setting/datasources/{id} 500/min Get datasource by id GET /santaba/rest/setting/datasources/{id}/updatereasons 500/min Get update history for a datasource POST /santaba/rest/setting/datasources/{id}/audit 200/min Add audit version DELETE /santaba/rest/setting/datasources/{id} 300/min Delete datasource
Debug
HTTP Method API Request Rate Limit Description POST /santaba/rest/debug 200/min Execute a Collector debug command GET /santaba/rest/debug/{id} 500/min Get the result of a Collector debug command
Device Groups
HTTP Method API Request Rate Limit Description GET /santaba/rest/device/groups/{id}/devices 500/min Get immediate devices under group GET /santaba/rest/device/groups/{deviceGroupId}/datasources 500/min Get device group datasource list GET /santaba/rest/aws/externalId 500/min Get AWS external id POST /santaba/rest/device/groups/{gid}/properties 200/min Add device group property GET /santaba/rest/device/groups/{gid}/properties 500/min Get device group properties PATCH /santaba/rest/device/groups/{id} 250/min Update device group GET /santaba/rest/device/groups/{id} 1000/min Get device group by ID DELETE /santaba/rest/device/groups/{id} 300/min Delete device group PUT /santaba/rest/device/groups/{id} 200/min Update device group POST /santaba/rest/device/groups 200/min Add device group GET /santaba/rest/device/groups 400/min Get device group list GET /santaba/rest/device/groups/{id}/historysdts 500/min Get SDT history for the group PATCH /santaba/rest/device/groups/{gid}/properties/{name} 250/min Update device group property GET /santaba/rest/device/groups/{gid}/properties/{name} 500/min Get device group property by name DELETE /santaba/rest/device/groups/{gid}/properties/{name} 300/min Delete device group property PUT /santaba/rest/device/groups/{gid}/properties/{name} 200/min Update device group property PATCH /santaba/rest/device/groups/{deviceGroupId}/datasources/{id} 250/min Update device group datasource GET /santaba/rest/device/groups/{deviceGroupId}/datasources/{id} 500/min Get device group datasource PUT /santaba/rest/device/groups/{deviceGroupId}/datasources/{id} 200/min Update device group datasource GET /santaba/rest/device/groups/{id}/sdts 500/min Get device group SDTs GET /santaba/rest/device/groups/{id}/alerts 500/min Get device group alerts
Devices
HTTP Method API Request Rate Limit Description GET /santaba/rest/device/devices/{deviceId}/devicedatasources 500/min Get device datasource list POST /santaba/rest/device/devices 200/min Add a new device GET /santaba/rest/device/devices 700/min Get device list GET /santaba/rest/device/devices/{id}/alerts 600/min Get alerts POST /santaba/rest/device/devices/{id}/scheduleAutoDiscovery 200/min Schedule active discovery for a device GET /santaba/rest/device/devices/{id}/historysdts 500/min Get SDT history for the device PATCH /santaba/rest/device/devices/{id} 250/min Update a device GET /santaba/rest/device/devices/{id} 500/min Get device by ID DELETE /santaba/rest/device/devices/{id} 300/min Delete a device PUT /santaba/rest/device/devices/{id} 200/min Update a device GET /santaba/rest/device/devices/{id}/flows 500/min Get netflow flow list GET /santaba/rest/device/devices/{id}/sdts 500/min Get SDTs for a device GET /santaba/rest/device/devices/{id}/instances 500/min Get device instance list GET /santaba/rest/device/unmonitoreddevices 500/min Get unmonitored device list GET /santaba/rest/device/devices/{deviceId}/devicedatasources/{id}/data 500/min Get device datasource data PATCH /santaba/rest/device/devices/{deviceId}/properties/{name} 250/min Update device property GET /santaba/rest/device/devices/{deviceId}/properties/{name} 500/min Get device property by name DELETE /santaba/rest/device/devices/{deviceId}/properties/{name} 300/min Delete device property PUT /santaba/rest/device/devices/{deviceId}/properties/{name} 200/min Update device property GET /santaba/rest/device/devices/{id}/topTalkersGraph 500/min Get top talkers graph GET /santaba/rest/device/devices/{deviceId}/devicedatasources/{id} 500/min Get device datasource GET /santaba/rest/device/devices/{deviceId}/devicedatasources/{id}/historysdts 500/min Get SDT history for the device dataSource POST /santaba/rest/device/devices/{deviceId}/properties 200/min Add device property GET /santaba/rest/device/devices/{deviceId}/properties 700/min Get device properties
Escalation Chain
HTTP Method API Request Rate Limit Description POST /santaba/rest/setting/alert/chains 200/min Add escalation chain GET /santaba/rest/setting/alert/chains 500/min Get escalation chain list PATCH /santaba/rest/setting/alert/chains/{id} 250/min Update escalation chain GET /santaba/rest/setting/alert/chains/{id} 500/min Get escalation chain by id PUT /santaba/rest/setting/alert/chains/{id} 200/min Update escalation chain
EventSources
HTTP Method API Request Rate Limit Description GET /santaba/rest/setting/eventsources 500/min Get eventSource list POST /santaba/rest/setting/eventsource/{id}/audit 200/min Add audit version
IntegrationAuditLogs
HTTP Method API Request Rate Limit Description GET /santaba/rest/setting/integrations/auditlogs 500/min Get integration audit logs list
Metrics
HTTP method API Request Rate Limit Description Get /santaba/rest/metrics/usage 500/min Get metrics usage
Netscans
HTTP Method API Request Rate Limit Description POST /santaba/rest/setting/netscans 200/min Add a new netscan GET /santaba/rest/setting/netscans 500/min Get netscan list GET /santaba/rest/setting/netscans/{id} 500/min Get netscan by id
Ops Notes
HTTP Method API Request Rate Limit Description POST /santaba/rest/setting/opsnotes 100/min Add opsnote GET /santaba/rest/setting/opsnotes 500/min Get opsnote list
PropertySources
HTTP method API Request Rate Limit Description POST /santaba/rest/setting/propertyrules/{id}/audit 200/min Add audit version
Recipient Groups
HTTP Method API Request Rate Limit Description PATCH /santaba/rest/setting/recipientgroups/{id} 250/min Update recipient group GET /santaba/rest/setting/recipientgroups/{id} 500/min Get recipient group by ID PUT /santaba/rest/setting/recipientgroups/{id} 200/min Update recipient group POST /santaba/rest/setting/recipientgroups 200/min Add recipient group GET /santaba/rest/setting/recipientgroups 500/min Get recipient group list
Report
HTTP Method API Request Rate Limit Description POST /santaba/rest/report/reports 200/min Add report GET /santaba/rest/report/reports 500/min Get report list PATCH /santaba/rest/report/reports/{id} 250/min Update report GET /santaba/rest/report/reports/{id} 500/min Get report by ID DELETE /santaba/rest/report/reports/{id} 300/min Delete report PUT /santaba/rest/report/reports/{id} 200/min Update report POST /santaba/rest/report/reports/{id}/executions 200/min Run a report
Report Groups
HTTP Method API Request Rate Limit Description POST /santaba/rest/report/groups 200/min Add report group GET /santaba/rest/report/groups 500/min Get report group list PATCH /santaba/rest/report/groups/{id} 250/min Update report group GET /santaba/rest/report/groups/{id} 500/min Get report group by ID DELETE /santaba/rest/report/groups/{id} 300/min Delete report group PUT /santaba/rest/report/groups/{id} 200/min Update report group
Roles
HTTP Method API Request Rate Limit Description PATCH /santaba/rest/setting/roles/{id} 250/min Update role GET /santaba/rest/setting/roles/{id} 500/min Get role by ID DELETE /santaba/rest/setting/roles/{id} 300/min Delete role PUT /santaba/rest/setting/roles/{id} 200/min Update role POST /santaba/rest/setting/roles 200/min Add role GET /santaba/rest/setting/roles 500/min Get role list
SDTs
HTTP Method API Request Rate Limit Description POST /santaba/rest/sdt/sdts 200/min Add SDT GET /santaba/rest/sdt/sdts 500/min Get SDT list PATCH /santaba/rest/sdt/sdts/{id} 250/min Update SDT GET /santaba/rest/sdt/sdts/{id} 500/min Get SDT by ID DELETE /santaba/rest/sdt/sdts/{id} 300/min Delete SDT PUT /santaba/rest/sdt/sdts/{id} 200/min Update SDT
Thresholds
HTTP Method API Request Rate Limit Description GET /santaba/rest/device/devices/{deviceId}/devicedatasources/{hdsId}/instances/{instanceId}/alertsettings 500/min Get a list of alert settings for a device datasource instance PATCH /santaba/rest/device/groups/{deviceGroupId}/datasources/{dsId}/alertsettings 250/min Update device group datasource alert setting GET /santaba/rest/device/groups/{deviceGroupId}/datasources/{dsId}/alertsettings 500/min Get device group datasource alert setting PUT /santaba/rest/device/groups/{deviceGroupId}/datasources/{dsId}/alertsettings 200/min Update device group datasource alert setting PATCH /santaba/rest/device/devices/{deviceId}/devicedatasources/{hdsId}/instances/{instanceId}/alertsettings/{id} 250/min Update device instance alert setting PUT /santaba/rest/device/devices/{deviceId}/devicedatasources/{hdsId}/instances/{instanceId}/alertsettings/{id} 200/min Update device instance alert setting
Users
HTTP Method API Request Rate Limit Description PATCH /santaba/rest/setting/admins/{id} 250/min Update user GET /santaba/rest/setting/admins/{id} 500/min Get user DELETE /santaba/rest/setting/admins/{id} 300/min Delete user PUT /santaba/rest/setting/admins/{id} 200/min Update user POST /santaba/rest/setting/admins 200/min Add user GET /santaba/rest/setting/admins 500/min Get user list
Website Groups
HTTP Method API Request Rate Limit Description PATCH /santaba/rest/website/groups/{id} 250/min Update website group GET /santaba/rest/website/groups/{id} 500/min Get website group DELETE /santaba/rest/website/groups/{id} 300/min Delete website group PUT /santaba/rest/website/groups/{id} 200/min Update website group GET /santaba/rest/website/groups/{id}/sdts 500/min Get a list of SDTs for a website group GET /santaba/rest/website/groups/{id}/websites 500/min Get a list of websites for a group POST /santaba/rest/website/groups 200/min Add website group GET /santaba/rest/website/groups 500/min Get website group list
Websites
HTTP Method API Request Rate Limit Description GET /santaba/rest/website/websites/{id}/historysdts 500/min Get SDT history for the website PATCH /santaba/rest/website/websites/{id} 250/min Update website GET /santaba/rest/website/websites/{id} 500/min Get website by id DELETE /santaba/rest/website/websites/{id} 300/min Delete website PUT /santaba/rest/website/websites/{id} 200/min Update website GET /santaba/rest/website/websites/{id}/properties 500/min Get a list of properties for a website GET /santaba/rest/website/websites/{id}/alerts 500/min Get alerts for a website POST /santaba/rest/website/websites 200/min Add website GET /santaba/rest/website/websites 500/min Get website list GET /santaba/rest/website/websites/{id}/sdts 500/min Get a list of SDTs for a website GET /santaba/rest/website/smcheckpoints 500/min Get website checkpoint list GET /santaba/rest/website/websites/{id}/graphs/{graphName}/data 500/min Get website data by graph name
HTTP Method API Request Rate Limit Description PATCH /santaba/rest/dashboard/widgets/{id} 250/min Update widget GET /santaba/rest/dashboard/widgets/{id} 500/min Get widget by ID DELETE /santaba/rest/dashboard/widgets/{id} 300/min Delete widget PUT /santaba/rest/dashboard/widgets/{id} 200/min Update widget POST /santaba/rest/dashboard/widgets 200/min Add widget GET /santaba/rest/dashboard/widgets 500/min Get widget list