Use case · Website to API

The site has no API.Your program becomes one.

Describe the flow once as a program with inputs. From then on it is one HTTP call: inputs in, typed JSON out, with versions, aliases and webhooks, as if the site had shipped the API itself.

The problem

Partners and old portals rarely offer an API. Wrapping a site in a script works until the next redesign, and then the integration that depends on it breaks without warning.

How it works

  1. 01

    A program with inputs

    Declare the inputs the flow needs. Kaabist validates them on every call, with types, defaults and limits.

    example
    { "kaab": "1",
      "name": "plan-lookup",
      "inputs": { "account": "string" },
      "steps": [ … ] }
  2. 02

    One call, typed JSON back

    Create a job with the program's name and the inputs. With Prefer: wait the response holds up to 30 seconds and returns the finished job with its data.

    example
    curl https://api.kaab.ist/v1/jobs \
      -H "Authorization: Bearer $KAAB_API_KEY" \
      -H "Prefer: wait=30" \
      -d '{"program": "plan-lookup", "inputs": {"account": "A-1042"}}'
  3. 03

    Versions and aliases

    Every change is a new version with a diff. Point callers at an alias such as production, and move it when a new version is ready; rolling back is moving it back.

  4. 04

    Faster after the first run

    When the page loads its data from a JSON endpoint, a browser run finds it and later calls read it directly on the HTTP tier.

Questions

You were going to ask. So here’s the answer.

What if a call takes longer than 30 seconds?

You get the job back while it runs; wait for it with GET /jobs/{id}, or receive job.succeeded on your webhook.

More use cases

  • Automate a website that requires login

    Portals, dashboards, supplier sites: the data you need sits behind a sign-in form. Kaabist runs the login as part of a program, keeps the session between jobs, and reads the pages as typed, validated fields.

    Learn more about Automate a website that requires login
  • Automate logins with 2FA

    One-time codes by e-mail or SMS, authenticator prompts, approval screens: a second factor is a step only the account owner can finish. Kaabist pauses the job there, emails a link to you (or the teammate or customer who owns the account), and resumes the program the moment the code is typed.

    Learn more about Automate logins with 2FA
  • Forms that must submit exactly once

    Some forms change the world when they are sent: an order is placed, money moves, an application is filed. Kaabist records those steps just before and just after they run (a fence), so a crash, a retry or a redeploy can never send them twice.

    Learn more about Forms that must submit exactly once

Stop fixing selectors.Ship the automation.