sondahub / HTTP test endpoints
HTTP test endpoints
Everything a client has to get right that is not a business API: seeing what you sent, every status code, slow answers, redirects, cookies, compression, streams, uploads — and every authentication scheme, checked for real, with an OAuth 2 server and a JWT issuer. Free, no key.
Base URL https://api.sondahub.com/v1/utils. Credentials are public on purpose; they prove a flow works and protect nothing.
Inspect a request
See exactly what arrived: method, path, query, headers and body, parsed.
curl -X POST "https://api.sondahub.com/v1/utils/echo?a=1&a=2" -H "Content-Type: application/json" -d '{"hello":"sonda"}'
curl https://api.sondahub.com/v1/utils/headers
Status codes and timing
Make the server answer the way you need to test the client.
curl -i https://api.sondahub.com/v1/utils/status/418
curl -i "https://api.sondahub.com/v1/utils/flaky?rate=0.5"
Redirects
Chains and single hops, relative and absolute.
Cookies
Set, read and delete; a cookie jar has something to hold.
curl -c jar -b jar -L "https://api.sondahub.com/v1/utils/cookies/set?flavor=chocolate&count=2"
Bodies, encodings, streams
Every shape a response can take.
curl -i -H "Range: bytes=10-19" https://api.sondahub.com/v1/utils/range/100
curl -o hub.png "https://api.sondahub.com/v1/utils/image/png?w=200&h=120&color=2f6df6"
Tools
Small helpers that are handy mid-test.
Forms and uploads
Multipart and urlencoded, parsed and described.
curl -F "name=Ada" -F "[email protected]" https://api.sondahub.com/v1/utils/forms/post
Streams and sockets
Server-Sent Events and WebSockets with nothing to set up.
curl -N "https://api.sondahub.com/v1/utils/sse?count=10&interval=1000"
More on the SSE test server and the WebSocket test server.
Webhooks
Add X-Sondahub-Webhook: <url> to any write and each record it creates, changes or deletes is POSTed there, signed (Standard Webhooks, Stripe or GitHub style; playground secret whsec_c29uZGFodWItcGxheWdyb3VuZC13ZWJob29rLWtleSE=).
curl https://api.sondahub.com/v1/utils/webhooks
curl -X POST https://api.sondahub.com/v1/helpdesk/tickets \
-H "Content-Type: application/json" \
-H "X-Sondahub-Webhook: https://your-endpoint.example/hooks" \
-H "X-Sondahub-Webhook-Style: stripe" \
-d '{"customer_id": 1, "subject": "Printer on fire", "priority": "urgent"}'
Send a test event from a form, and the receiver code for each style: the webhook tester.
Authentication
Every scheme, checked for real. User sonda / probe; API key sonda-probe-key; client sonda / probe-secret; AWS AKIASONDAHUB000001 / probe-secret (us-east-1, execute-api); JWT secret probe-secret.
curl -u sonda:probe https://api.sondahub.com/v1/utils/auth/basic
curl --digest -u sonda:probe "https://api.sondahub.com/v1/utils/auth/digest?algorithm=SHA-256"
curl -H "X-API-Key: sonda-probe-key" https://api.sondahub.com/v1/utils/auth/apikey
curl --aws-sigv4 "aws:amz:us-east-1:execute-api" --user "AKIASONDAHUB000001:probe-secret" https://api.sondahub.com/v1/utils/auth/sigv4
Each scheme step by step: auth test endpoints.
OAuth 2.0 and OpenID Connect
A small real server: client sonda / probe-secret (or register your own), user sonda / probe or anyone in the Identity directory (user_name / probe). Access tokens are RS256 JWTs you can check against the JWKS; discovery at /.well-known/openid-configuration.
curl -u sonda:probe-secret -d grant_type=client_credentials -d scope=read https://api.sondahub.com/v1/utils/oauth/token
curl -d grant_type=password -d username=sonda -d password=probe -d client_id=sonda -d client_secret=probe-secret -d "scope=openid read" https://api.sondahub.com/v1/utils/oauth/token
curl -H "Authorization: Bearer ACCESS_TOKEN" https://api.sondahub.com/v1/utils/oauth/protected
curl -X POST https://api.sondahub.com/v1/utils/oauth/register \
-H "Content-Type: application/json" \
-d '{"client_name": "My CLI", "redirect_uris": ["http://127.0.0.1:8080/callback"], "token_endpoint_auth_method": "none"}'
In Sonda’s auth editor, OAuth 2 with the authorization-code grant: authorization URL https://api.sondahub.com/v1/utils/oauth/authorize, token URL https://api.sondahub.com/v1/utils/oauth/token, client sonda / probe-secret, any scope, PKCE on or off. Sonda opens the consent screen in the browser and receives the code on its 127.0.0.1 redirect. Every grant: the OAuth 2.0 test server.
JWT
Mint, decode, verify and use tokens. HS256 secret probe-secret; RS256 keys published (the private one too — it is a playground).
curl "https://api.sondahub.com/v1/utils/jwt/issue?sub=alice&role=admin" curl -H "Authorization: Bearer TOKEN" https://api.sondahub.com/v1/utils/jwt/protected
All Bridges
sondahub only takes HTTP and WebSocket, so the protocols that clients speak over TCP or UDP come through the bridge: one small Node script (Node 22 or newer, nothing installed) that runs on your computer, opens the port in the table below — for the brokers, the usual one plus 100, so a broker you already run keeps its own — and carries every connection to the hub over one WebSocket. Without a port it takes the next free one when that is taken, so several run side by side, each a world of its own; give it a port and it takes exactly that or stops. It prints who connects and what happens, with the reason when something is refused.
curl -O https://sondahub.com/industrial/bridge.mjs node bridge.mjs redis
| Bridge | Point the client at | For |
|---|---|---|
OPC UAnode bridge.mjs opcua [port] | opc.tcp://localhost:4840 | OPC UA clients that speak only opc.tcp — UaExpert, asyncua, node-opcua, open62541. |
Modbus TCPnode bridge.mjs modbus [port] | localhost:5020 | Modbus TCP masters — Modbus Poll, pymodbus, PLC libraries. 5020, because 502 needs administrator rights. |
HART-IPnode bridge.mjs hart [port] | localhost:5094 | HART-IP hosts and device managers, over TCP. |
DDSnode bridge.mjs dds [domain] [tcp port] [--secure] | UDP 7410, 7411TCP 5100 | DDS and ROS 2 participants on your computer find the hub’s participant on domain 0’s ports and the multicast group 239.255.0.1:7400; Fast DDS over TCP on 5100; --secure turns on DDS Security. |
Kafkanode bridge.mjs kafka [port] | localhost:9192 | Kafka producers, consumers and admin clients, with that as bootstrap.servers: one cluster, every connection through the one bridge. |
AMQP and STOMPnode bridge.mjs amqp [port] [stomp port] | localhost:5772localhost:61713 | RabbitMQ clients on 5772 as guest/guest — AMQP 0-9-1 and AMQP 1.0 on the same port — and STOMP clients on 61713, all on one broker. |
NATSnode bridge.mjs nats [port] | nats://localhost:4322 | NATS clients on TCP, JetStream included. Clients that speak WebSocket need no bridge. |
Redisnode bridge.mjs redis [port] | redis://localhost:6479 | redis-cli and every Redis client library, RESP2 and RESP3. |
HL7 v2node bridge.mjs hl7 [port] | localhost:2675 | HL7 v2 over MLLP — interface engines, Sonda’s HL7 interface. Over HTTP no bridge is needed. |
FIXnode bridge.mjs fix [port] | localhost:9976 | FIX initiators — QuickFIX, simplefix, your own engine — on FIX 4.2, 4.4 and 5.0 SP2, with TargetCompID SONDAHUB. |
Questions
What do the HTTP test endpoints cover?
Echo, any status code, delays, redirects, cookies, gzip and deflate, byte streams, ranges, uploads, Basic and Digest auth — plus AWS SigV4 verification, an OAuth 2.0 / OpenID Connect server with PKCE, a JWT issuer and verifier, a WebSocket echo and an SSE clock. Paths live under /v1/utils.
How do I test retries and timeouts?
/v1/utils/flaky?rate=0.3&code=503 fails at the rate you set; /v1/utils/status/200,500,503 picks one per request; /v1/utils/delay/5 waits five seconds; 429 and 503 answers carry a Retry-After header for a client to honour.
Can I test a webhook receiver?
Yes. Add X-Sondahub-Webhook: https://… to any write and every record it creates, changes or deletes is POSTed to that address, signed Standard Webhooks, Stripe or GitHub style, with retries; /v1/utils/webhooks/send fires one sample event on demand and /verify checks a signature. The webhook tester.
Does the echo show the body I sent?
Yes: /v1/utils/echo answers with the method, URL, query (repeated keys as arrays), every header, and the body parsed as JSON, text, form fields, or base64 for binary.