Migration from LogicMonitor REST API v2 to API v3
Last updated on 20 June, 2025LogicMonitor REST API v3 has all the enhancements and fixes compared to API v2. The following are key highlights why you must migrate to API v3:
- API v3 version header updates
- Support for filter syntax
LogicMonitor REST API v2 to v3 Changes
Version Header for REST API v2 to API v3
You can make API v3 request using one of the following version headers:
- Header X-version with value 3. For example, “X-version: 3”
- API query parameter
v
with value 3. For example, “v=3”
For more information, see REST API v3 Swagger Documentation.
API Response Format for REST API v2 and API v3
There is no difference in the success and error response format of API v2 and API v3. Therefore, migrating from API v2 to API v3 does not require any changes to the parsing logic.
Success Response for REST API v2 and v3
The success response format for API v3 is as follows:
{
<API specific data>
}
Error Response for REST API v2 and API v3
The error response format for API v3 is as follows:
{
"errorMessage": <ERROR_MESSAGE>,
"errorCode": <ERROR_CODE>,
"errorDetail": null
}
Example of Response Format in Python Code
import json
# Success Response Handling
def handle_success_response(json_response):
response = json.loads(json_response)
# Process the fields directly from the response
# Example: total = response['total']
# Error Response Handling
def handle_error_response(json_response):
response = json.loads(json_response)
error_message = response['errorMessage']
error_code = response['errorCode']
error_detail = response['errorDetail']
# Process the error message, code, and detail