I have a vendor that sucks donkey balls. Their systems break often. An endpoint we rely on will start returning [] and take months to fix. They’ll change a data label in their backend and not notice that it flows into all of their filters and stuff.

I have some alerts when my consumers break, but I think I’d like something more direct. What’s the best way to monitor an external API?

I’m imagining some very basic ML that can pop up and tell me that something has changed, like there are more hosts or categories or whatever than usual, that a structure has gone blank or is missing, that some field has gone to 0 or null across the structure. Heck, that a field name has changed.

Is the best way to basically write tests for everything I can think of, and add more as things break, or is there a better tool? I see API monitoring tools but they are for calculating availability for your own APIs, not for enforcing someone else’s!

  • Clay_pidgin@sh.itjust.worksOP
    link
    fedilink
    English
    arrow-up
    12
    ·
    1 day ago

    No, they don’t have version numbers and they don’t provide release notes when they change things intentionally. The more common problem for me is when they break it and don’t notice.

    • grandel@lemmy.ml
      link
      fedilink
      English
      arrow-up
      5
      ·
      edit-2
      1 day ago

      If the API does not use versioning or document changes, your only option is to use defensive programming and good error handling to figure out what breaks.

      • Clay_pidgin@sh.itjust.worksOP
        link
        fedilink
        English
        arrow-up
        3
        ·
        24 hours ago

        Yeah, that’s what I’ve been doing but it’s a pain to add it to each of my little scripts that consume their APIs. Thank you!