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
    3
    ·
    1 day ago

    They haven’t so far broken the historical data, so I can’t directly compare a response to a known good, sadly.

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

        Not that I’ve seen! No endpoint tells me anything about the API or endpoint. Would that be in the response headers, maybe? I’ll check, but they’re bad at change control anyway and they use slightly different versions of their systems for each customer, so there’s not really a unified version number anyway.

        edit: Nothing in the headers.

        • cv_octavio@piefed.ca
          link
          fedilink
          English
          arrow-up
          6
          ·
          1 day ago

          I mean… We version ours in the url.

          /api/v1/some_enpoint

          That way if, for whatever reason, you need to roll a breaking change, you do it in a new version mapped to a new url.

          I’m sorry for what you’re going through, I’ve been there before.

    • calliope@retrolemmy.com
      link
      fedilink
      arrow-up
      2
      ·
      1 day ago

      You can compare the status to a 500 or a 404 though, to see if it’s running?

      When it breaks, you’ll know.