Rate Limiting
Overview
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 on 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. Please work with your customer success manager proactively to discuss possible options if your needs exceed these design limits.
Rate Limit Information in Response Headers
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))
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
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);
}
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)
Default Rate Limits
The following table lists default rate limits per endpoint/method request combination.
HTTP Method | API Request | Rate Limit | Purpose of API |
Managing Ops Notes | |||
DELETE | /santaba/rest/setting/opsnotes/{id} | 300/min | Delete an OpsNote |
GET | /santaba/rest/setting/opsnotes/ | 500/min | Get list of OpsNotes |
GET | /santaba/rest/setting/opsnotes/{id} | 500/min | Get information about particular OpsNotes |
PUT | /santaba/rest/setting/opsnotes/{id} | 200/min | Update OpsNotes |
POST | /santaba/rest/setting/opsnotes | 100/min | Add OpsNotes |
Managing Alert Rule | |||
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 |
Managing Alert | |||
POST | /santaba/rest/alert/alerts/{id}/note | 200/min | Add a note to alerts |
POST | /santaba/rest/alert/alerts/{id}/ack | 200/min | Acknowledge alerts |
GET | /santaba/rest/alert/alerts | 400/min | Get alerts |
Managing API Token | |||
POST | /santaba/rest/setting/admins/{adminID}/apitokens | 200/min | Add API token |
PUT | /santaba/rest /setting/admins/{adminID}/apitokens/{apiTokenID} | 200/min | Update API token |
GET | /santaba/rest/setting/admins/apitokens | 500/min | Get API token |
DELETE | /santaba/rest/setting/admins/{adminID}/apitokens/{apiTokenID} | 300/min | Delete API token |
Accessing Audit Log | |||
GET | /santaba/rest/setting/accesslogs | 500/min | Get Audit Log entries |
Managing Collector | |||
POST | /santaba/rest/setting/collectors | 200/min | Add a Collector |
GET | /santaba/rest/setting/collectors | 500/min | Get Collectors |
GET | /santaba/rest/setting/collectors/{id} | 500/min | Get Collector info for particular id |
GET | /santaba/rest/setting/collectors/{id}/installers/{platform+architecture} | 500/min | Downloading Collector installer |
PUT | /santaba/rest/setting/collectors/{id} | 200/min | Update Collector |
DELETE | /santaba/rest/setting/collectors/{id} | 300/min | Delete Collector |
POST | /santaba/rest/setting/collectors/{id}/ackdown | 200/min | Acknowledge Collector down alert |
Managing Collector Group | |||
POST | /santaba/rest/setting/collectors/groups | 200/min | Add a Collector group |
GET | /santaba/rest/setting/collectors/groups | 500/min | Get Collector groups |
GET | /santaba/rest/setting/collectors/groups/{id} | 500/min | Get group info about particular Collector |
PUT | /santaba/rest/setting/collectors/groups/{id} | 200/min | Update Collector group |
DELETE | /santaba/rest/setting/collectors/groups/{id} | 300/min | Delete Collector group |
Managing Dashboard and Widget | |||
POST | /santaba/rest/dashboard/dashboards/dashboard/dashboards | 200/min | Add a dashboard |
PUT | /santaba/rest/dashboard/dashboards/{id} | 200/min | Update dashboards |
GET | /santaba/rest/dashboard/dashboards | 500/min | Get a dashboard |
GET | /santaba/rest/dashboard/dashboards/{id} | 500/min | Get information about specific dashboard |
DELETE | /santaba/rest/dashboard/dashboards/{id} | 300/min | Delete a dashboard |
PUT | /santaba/rest/dashboard/widgets/{id} | 200/min | Update widget |
POST | /santaba/rest/dashboard/widgets | 200/min | Add a widget |
GET | /santaba/rest/dashboard/widgets | 500/min | Get widgets |
GET | /santaba/rest/dashboard/widgets/{id} | 500/min | Get information about specific widgets |
DELETE | /santaba/rest/dashboard/widgets/{id} | 300/min | Delete widget |
Managing Dashboard Group | |||
POST | /santaba/rest/dashboard/groups | 200/min | Add a dashboard group |
PUT | /santaba/rest/dashboard/groups/{id} | 200/min | Update dashbaord group |
GET | /santaba/rest/dashboard/groups | 500/min | Get dashboard group |
GET | /santaba/rest/dashboard/groups/{id} | 500/min | Get information about specific dashboard group |
DELETE | /santaba/rest /dashboard/groups/{id} | 300/min | Delete dashboard group |
Getting Data | |||
GET | /santaba/rest/device/devices/{deviceID}/devicedatasources/{deviceDataSourceID}/instances/{instanceID}/graphs/{graphID}/data
OR /santaba/rest/device/devicedatasourceinstances/{instanceID}/graphs/{graphID}/data OR /santaba/rest/device/devicedatasources/{deviceDataSourceID}/groups/{instanceGroupId}/graphs/{overviewGraphID}/data |
500/min | Get instance graph data |
GET | /santaba/rest/dashboard/widgets/{widgetID}/data | 500/min | Get widget data |
GET | /santaba/rest/service/services/{serviceID}/checkpoints/{checkpointID}/graphs/{graphName}/data | 500/min | Get service graph data |
GET | /santaba/rest/device/devices/{deviceId}/devicedatasources/{deviceDatasourceId}/data | 500/min | Get device data for all instances of specific DataSource |
GET | /santaba/rest/device/devices/{deviceId}/devicedatasources/{deviceDatasourceId}/instances/{instanceId}/data | 500/min | Get device data for one instance of specific DataSource |
GET | /santaba/rest/service/services/{serviceID}/checkpoints/{checkpointID}/data | 500/min | Get website data |
GET | /santaba/rest//device/devices/{deviceId}>/devicedatasources/{deviceDataSourceId}/instances/{instanceId}/config | 500/min | Get all config for ConfigSource instance |
Managing DataSource | |||
POST | /santaba/rest/setting/datasources/importxml | 200/min | Import DataSource from XML |
GET | /santaba/rest/device/devices/{deviceId}/devicedatasources | 500/min | Get device DataSources |
GET | /santaba/rest/device/devices/{deviceId}/devicedatasources/{deviceDataSourceId} | 500/min | Get information about specific device DataSource |
GET | /santaba/rest/setting/datasources | 500/min | Get list of DataSources |
GET | /santaba/rest/setting/datasources/{id} | 500/min | Get information about specific DataSource |
GET | /santaba/rest/setting/datasources/{id}/devices | 500/min | Get device associated with DataSource |
GET | /santaba/rest/setting/datasources/{id}/updatereasons | 500/min | Get update history for a DataSource |
GET | /santaba/rest/setting/datasources?format=xml | 500/min | Export all DataSources to XML |
GET | /santaba/rest/setting/datasources/{id}?format=xml | 500/min | Export one DataSource to XML |
DELETE | /santaba/rest/setting/datasources/{ID} | 300/min | Delete DataSource |
Managing Datasource Instance | |||
POST | /santaba/rest/device/devices/{deviceId}/devicedatasources/{deviceDatasourceId}/instances | 200/min | Add an instance to a DataSource |
GET | /santaba/rest/device/devices/{deviceId}/devicedatasources/{deviceDatasourceId}/instances | 500/min | Get a list of DataSource instances |
GET | /santaba/rest/device/devices/{deviceId}/devicedatasources/{deviceDatasourceId}/instances/{instanceId} | 500/min | Get information about specific DataSource instance |
GET | /santaba/rest/device/devices/{deviceId}/devicedatasources/{deviceDatasourceId}/groups | 500/min | Get list of DataSource instance groups |
GET | /santaba/rest/device/devices/{deviceId}/devicedatasources/{deviceDatasourceId}/groups/{groupId} | 500/min | Get information about specific DataSource instance group |
PUT | /santaba/rest//device/devices/{deviceId}/devicedatasources/{deviceDatasourceId}/instances/{instanceId} | 200/min | Update DataSource instance |
DELETE | /santaba/rest/device/devices/{deviceId}/devicedatasources/{deviceDatasourceId}/instances/{instanceId} | 300/min | Delete DataSource instance |
Managing Device | |||
GET | /santaba/rest/device/unmonitoreddevices | 500/min | Get unmonitored device |
POST | /santaba/rest/device/devices/{id}/scheduleAutoDiscovery | 200/min | Schedule Active Discovery for device |
GET | /santaba/rest/device/devices/{id}/alerts | 600/min | Get all alerts for device |
POST | /santaba/rest/device/devices/{deviceID}/properties | 200/min | Add device properties |
DELETE | /santaba/rest/device/devices/{deviceID}/properties/{propertyName} | 300/min | Delete device properties |
PUT | /santaba/rest/device/devices/{deviceID}/properties/{propertyName} | 200/min | Update device properties |
GET | /santaba/rest/device/devices/{deviceID}/properties | 700/min | Get all device properties |
GET | /santaba/rest/device/devices/{deviceID}/properties/{propertyName} | 500/min | Get information about a particular device property |
GET | /santaba/rest/device/devices/{id}/sdts | 500/min | Get all SDTs for a device |
GET | /santaba/rest/device/devices | 700/min | Get a list of devices |
GET | /santaba/rest/device/devices/{id} | 500/min | Get information about a particular device |
POST | /santaba/rest/device/devices | 200/min | Add a device |
PUT | /santaba/rest/device/devices/{id} | 200/min | Update a device |
PATCH | /santaba/rest/device/devices/{id} | 250/min | Update a device |
DELETE | /santaba/rest/device/devices/{id} | 300/min | Delete a device |
Managing Device Group | |||
GET | /santaba/rest/device/groups/{id}/devices | 500/min | Get devices for a particular device group |
GET | /santaba/rest/device/groups/{id}/alerts | 500/min | Get all alerts for device group |
DELETE | /santaba/rest/device/groups/{groupID}/properties/{propertyName} | 300/min | Delete device group properties |
PUT | /santaba/rest/device/groups/{groupID}/properties/{propertyName} | 200/min | Update device group properties |
GET | /santaba/rest/device/groups/{groupID}/properties | 500/min | Get device group properties |
GET | /santaba/rest//device/groups/{groupID}/properties/{propertyName} | 500/min | Get information about a particular device group’s properties |
POST | /santaba/rest/device/groups/{groupID}/properties | 200/min | Add device group properties |
GET | /santaba/rest/device/groups/{id}/sdts | 500/min | Get all SDTs for device group |
DELETE | /santaba/rest/device/groups/{id} | 300/min | Delete device group |
GET | /santaba/rest/device/groups | 400/min | Get list of device groups |
GET | /santaba/rest/device/groups/{id} | 1000/min | Get information about particular device group |
PUT | /santaba/rest/device/groups/{id} | 200/min | Update device group |
PATCH | /santaba/rest/device/groups/{id} | 250/min | Update device group |
POST | /santaba/rest/device/groups | 200/min | Add device group |
Managing Escalation Chain | |||
POST | /santaba/rest/setting/alert/chains | 200/min | Add escalation chain |
PUT | /santaba/rest/setting/alert/chains/{id} | 200/min | Update escalation chain |
GET | /santaba/rest/setting/alert/chains | 500/min | Get list of escalation chains |
GET | /santaba/rest/setting/alert/chains/{id} | 500/min | Get information about a particular escalation chain |
DELETE | /santaba/rest/setting/alert/chains/{id} | 300/min | Delete escalation chain |
Managing Report | |||
GET | /santaba/rest/report/reports | 500/min | Get a list of reports |
GET | /santaba/rest/report/reports/{id} | 500/min | Get information about particular reports |
POST | /santaba/rest/report/reports | 200/min | Add reports |
PUT | /santaba/rest/report/reports/{id} | 200/min | Update a report |
POST | /santaba/rest/functions | 200/min | Run a report |
GET | /santaba/rest/report/reports/REPORT_ID/tasks/TASK_ID | 500/min | Get a URL for an existing report execution task |
DELETE | /santaba/rest/report/reports/{id} | 300/min | Delete report |
Managing Report Group | |||
GET | /santaba/rest/report/groups | 500/min | Get a list of report groups |
GET | /santaba/rest/report/groups/{id} | 500/min | Get information about a particular report group |
POST | /santaba/rest/report/groups | 200/min | Add report groups |
PUT | /santaba/rest/report/groups/{id} | 200/min | Update report groups |
DELETE | /santaba/rest/report/groups/{id} | 300/min | Delete report groups |
Managing Role | |||
POST | /santaba/rest/setting/roles | 200/min | Add roles |
GET | /santaba/rest/setting/roles | 500/min | Get a list of roles |
GET | /santaba/rest/setting/roles/{id} | 500/min | Get information about a particular role |
PUT | /santaba/rest/setting/roles/{id} | 200/min | Update roles |
DELETE | /santaba/rest/setting/roles/{id} | 300/min | Delete roles |
Managing SDT | |||
GET | /santaba/rest/sdt/sdts | 500/min | Get a list of SDTs |
GET | /santaba/rest/sdt/sdts/{id} | 500/min | Get information about a particular SDT |
POST | /santaba/rest/sdt/sdts | 200/min | Add SDTs |
PUT | /santaba/rest/sdt/sdts/{id} | 200/min | Update SDTs |
DELETE | /santaba/rest/sdt/sdts/{id} | 300/min | Delete SDTs |
Managing Website | |||
GET | /santaba/rest/service/services/{ID}/properties | 500/min | Get all properties for a website |
GET | /santaba/rest/service/services/{id}/alerts | 500/min | Get all alerts for a website |
GET | /santaba/rest/service/services | 500/min | Get list of websites |
GET | /santaba/rest/service/services/{id} | 500/min | Get information about a particular website |
PUT | /santaba/rest/service/services/{id} | 200/min | Update websites |
PATCH | /santaba/rest/service/services/{id} | 250/min | Update websites |
GET | /santaba/rest/service/services/{id}/sdts | 500/min | Get all SDTs for website |
DELETE | /santaba/rest/service/services/{id} | 300/min | Delete website |
Managing Website Group | |||
POST | /santaba/rest/service/groups | 200/min | Add website groups |
GET | /santaba/rest/service/groups | 500/min | Get list of website groups |
GET | /santaba/rest/service/groups/{id} | 500/min | Get information about a particular website group |
PUT | /santaba/rest/service/groups/{id} | 200/min | Update website groups |
PATCH | /santaba/rest/service/groups/{id} | 250/min | Update website groups |
GET | /santaba/rest/service/groups/{id}/sdts | 500/min | Get all SDTs for website group |
DELETE | /santaba/rest/service/groups/{id} | 300/min | Delete website groups |
Get Website Test Location | |||
GET | /santaba/rest/service/smcheckpoints | 500/min | Get a list of checkpoints |
GET | /santaba/rest/service/smcheckpoints/{id} | 500/min | Get information about one sitemonitor checkpoint |
Managing Threshold | |||
PUT | /santaba/rest/device/devices/{deviceId}/devicedatasources/{deviceDatasourceId}/instances/{instanceId}/alertsettings/{id} | 200/min | Update instance-level threshold |
GET | /santaba/rest/device/devices/{deviceId}/devicedatasources/{deviceDatasourceId}/instances/{instanceId}/alertsettings | 500/min | Get instance-level threshold |
PUT | /santaba/rest/device/groups/{groupId}/datasources/{datasourceId}/alertsettings | 200/min | Update group-level threshold |
GET | /santaba/rest/device/groups/{groupId}/datasources/{datasourceId}/alertsettings | 500/min | Get group-level threshold |
GET | /santaba/rest/device/groups/{groupId}/clusterAlertConf | 500/min | Get cluster alert configuration |
POST | /santaba/rest/device/groups/{groupId}/clusterAlertConf | 200/min | Add a cluster alert configuration |
PUT | /santaba/rest/device/groups/{groupId}/clusterAlertConf/{id} | 200/min | Update cluster alert configuration |
DELETE | /santaba/rest/device/groups/{groupId}/clusterAlertConf/{id} | 300/min | Delete a cluster alert configuration |
Managing User | |||
POST | /santaba/rest/setting/admins | 200/min | Add user |
PUT | /santaba/rest/setting/admins/{adminID} | 200/min | Update user |
GET | /santaba/rest/setting/admins | 500/min | Get a list of users |
GET | /santaba/rest/setting/admins/{adminID} | 500/min | Get information about a particular user |
DELETE | /santaba/rest/setting/admins/{adminID} | 300/min | Delete user |