Forum Discussion

Xiol's avatar
2 years ago

v3 Python SDK outdated?

Hello,

I’m trying to use the Python SDK to add websites for monitoring. For my current use case, the primary reason for this is to gain some alerting on our SSL expiry times.

Using the SDK has been a generally frustrating experience all around so far, however I’ve noticed that the v3 API is returning fields which aren’t supported or documented by the SDK or API docs.

Specifically, for the Website endpoints (GET/POST/PUT), the top-level fields `schema`, `trigger_ssl_expiration_alert` and `trigger_ssl_status_alert` are all unsupported in the 3.0.172 SDK. Unfortunately these also all sound like the fields I need to be setting in order to get SSL monitoring set up.

It also appears that the top-level `schema` field is required to enable HTTPS monitoring, as the `schema` field in the `steps` is ignored. I can see that this top-levle field is set to https when toggling the schema in the web UI, when using dev tools to inspect the request.

I’ve already done a fair bit of work using the SDK, so I’d hate to have to rip it out at this point and start building all my requests manually in order to support this.

I’m using logicmonitor_sdk 3.0.172 at present, which is the latest available release via Pip and tarball. I can see that these fields have been added on the master branch in Github. Is there a timeline for the release of these changes?

While I’m here, can I also ask that this functionality is added to your Terraform provider, because that would save me a lot of hours and stress going forward. 😉

  • Anonymous's avatar
    Anonymous

    Thank you for that link! It’s been driving me bonkers. 

    Yes, I knew the documentation still didn’t show the top level schema field. I’d reach out to support to get a ticket opened for the back end developers to get that fixed.

  • Oh I’m all too familiar with that documentation! Although I’ve been using this link rather than the one you have provided (where the links seem to work, at least).

    Unfortunately, the addWebsite documentation in your link also doesn’t cover the top-level `schema` field, nor the `trigger_ssl_*_alert` fields I mentioned.

  • Anonymous's avatar
    Anonymous

    Not going to help in this case because it appears the SDK might be broken, but here’s the documentation (broken links and all).