Learn

Point SnapAPI at your API

Swap the mock for the origin you already curl. Same file, real URL:.

Start from a curl that works

If this works:

curl -sS https://api.myapp.com/users \
  -H "Authorization: Bearer $TOKEN"

convert it:

snapapi convert 'curl -sS https://api.myapp.com/users -H "Authorization: Bearer $TOKEN"' -o my.sapi

that’s this suite:

SUITE: Converted Request
URL: https://api.myapp.com

TEST: Get Users
  GET: /users
  AUTH: bearer ${TOKEN}
snapapi my.sapi -D TOKEN="$TOKEN"

Then add EXPECT, SAVE, and helpers. Curl is the on-ramp; SnapAPI is the maintainable test. It will not import a full Karate/Postman suite — only the requests you already curl.

The rest maps the obvious way:

curlSnapAPI
https://host in the URLURL: https://host (no path)
-X POST and the pathPOST: /that/path
-H "Authorization: Bearer …"AUTH: bearer ${TOKEN}
-H "Content-Type: application/json"HEADER Content-Type: application/json
-d '{"name":"Jane"}'BODY: {"name": "Jane"}
status you already know is successEXPECT: status == 201
https://api.example.com in the DSL reference is a placeholder. It isn’t a live demo. Use the host you actually curl.

When it fails

Green on your laptop → same command in CI. Common misses: Troubleshooting.