This repository contains multiple ways to interact with the WorqHat API:
- Node TypeScript client using Axios (
node-typescript/) - Python FastAPI server using the official
worqhatSDK (python/) - Pure REST cURL scripts (
rest-api/)
Each approach demonstrates identical capabilities: status/health checks, database operations, and workflows (flows) with JSON, file upload, and URL triggers.
node-typescript/— Express/TypeScript example with endpoint scripts and a pre-configured Axios client.python/— FastAPI app mirroring the Node routes, using the officialworqhatPyPI package.rest-api/— cURL scripts calling WorqHat endpoints directly.
- A WorqHat API key. Keep it in a local
.envfile and never commit secrets.
- Node TypeScript: see
node-typescript/README.md - Python (FastAPI): see
python/README.md - REST cURL: see
rest-api/README.md
| Feature | Node TypeScript (SDK) | Python FastAPI (SDK) | REST cURL (HTTP) |
|---|---|---|---|
| Server status | checkStatus() |
GET /status |
rest-api/check-status.sh |
| Health check | checkHealth() |
GET /health |
rest-api/health.sh |
| DB: query | dbQuery() |
GET /db/query |
rest-api/db-query.sh |
| DB: insert | dbInsert() |
GET /db/insert |
rest-api/db-insert.sh |
| DB: update | dbUpdate() |
GET /db/update |
rest-api/db-update.sh |
| DB: delete | dbDelete() |
GET /db/delete |
rest-api/db-delete.sh |
| DB: NL query | dbNlQuery() |
GET /db/nl-query |
rest-api/db-nl-query.sh |
| Flows: trigger JSON | triggerFlowJson() |
GET /flows/trigger-json |
rest-api/flows-trigger-json.sh |
| Flows: metrics | getFlowsMetrics() |
GET /flows/metrics |
rest-api/flows-metrics.sh |
| Flows: file URL | triggerFlowWithUrl() |
GET /flows/file-url |
rest-api/flows-trigger-url.sh |
| Flows: file upload | triggerFlowWithFile() |
GET /flows/file-upload |
rest-api/flows-trigger-file.sh |
-
Node (SDK)
cd node-typescript cp .env.example .env && edit .env # set API_KEY npm install npm run dev
-
Python FastAPI (SDK)
cd python python -m venv .venv && source .venv/bin/activate cp .env.example .env && edit .env # set WORQHAT_API_KEY pip install -r requirements.txt uvicorn src.app:app --reload --port 4000 # Test: curl http://localhost:4000/status
-
REST cURL (HTTP)
cd rest-api cp .env.example .env && edit .env # set API_KEY chmod +x *.sh ./check-status.sh
- Node TypeScript:
.envtypically includesAPI_KEY(and optionallyAPI_URLif supported by that client). - Python:
.envusesWORQHAT_API_KEYonly. The SDK manages the base URL internally. - REST cURL:
.envusesAPI_KEYand a fixed base URLhttps://api.worqhat.comwithin scripts (noAPI_URL).
- Do not commit
.envor API keys. - Rotate keys periodically and follow WorqHat security best practices.
MIT (or repository default). See LICENSE if present.