Note: The updated Python and GO v3 SDK files released in Platform v198 release will be available after v198 deployment to production is complete. For any questions, contact your LogicMonitor Customer Success Manager.
LogicMonitor supports Python and GO SDK for REST API v3. You can use these SDKs to efficiently interact with v3 APIs and build API-based integrations and workflow processes.
- For Python SDKs, the REQUEST parameters can contain camelCase or an underscore.
- Both underscore and camelCase are supported if parameters are encapsulated within the body.
- Only camelCase is supported if parameters are encapsulated within the body and also if the user is passing raw JSON as REQUEST parameter. However, the RESPONSE parameters always contain an underscore. For example, you can use testLocation or test_location in the REQUEST parameter. But the RESPONSE parameter will always be test_location.
- The fields parameter only supports camelCase.
Downloading the SDK
You can download Python SDK via pip:
pip install logicmonitor-sdk
Authenticating the SDK
You must authenticate yourself before using the GO and Python SDK. You can use either an LMv1Auth or a Bearer token to authenticate.
Authenticating GO SDK using Bearer Token
The supported method in config is SetBearerToken(). By default, nil is set as the bearer token. You have to enter your bearer token to authenticate.
bearerToken := “BEARER_TOKEN_VALUE”
Authenticating Python SDK using Bearer Token
To authenticate yourself using Bearer token, enter the following details:
configuration.auth_type = ‘Bearer’
configuration.bearer_token = ‘BEARER_TOKEN_VALUE’
Using the SDK
The Python and GO SDKs are auto-generated using Swagger Codegen. Detailed documentation with additional examples for the SDK is available here.