Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
76 changes: 35 additions & 41 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,80 +1,74 @@
# Wokelo OpenAPI Specification

Single-source-of-truth OpenAPI 3.0 specification for the Wokelo API suite.
Single-source-of-truth OpenAPI 3.0.3 specification for the Wokelo API suite.

The canonical spec is **`openapi.yaml`** at the repo root. A pre-bundled single-file version is published at **`dist/wokelo-openapi.yaml`** on every successful main-branch build.
The canonical spec is **`openapi.yaml`** at the repo root. A pre-bundled single-file version is published at **`dist/wokelo-openapi.yaml`** on every successful `main` branch build.

## What's in here

| Path | Purpose |
|------|---------|
| `openapi.yaml` | Canonical merged spec — edit this |
| `sources/` | Original per-API YAMLs (12 files) kept for reference |
| `dist/wokelo-openapi.yaml` | Bundled spec — what directories should import |
| `openapi.yaml` | Canonical merged spec for the full Wokelo API |
| `sources/` | 26 standalone capability specs, one per official docs page |
| `dist/wokelo-openapi.yaml` | Bundled spec for import into external tools and directories |
| `dist/index.html` | Static Redoc HTML docs |
| `redocly.yaml` | Linter configuration |
| `.github/workflows/validate.yml` | CI validation + GitHub Pages deploy |

## Coverage

17 endpoints across 16 tags:
Version `2.0.0` covers:

**Enrichment**
- Company Instant Enrichment — `POST /api/enterprise/company/enrich/` (instant mode)
- Company Deep Intelligence — `POST /api/enterprise/company/enrich/` (deep mode)
- Industry Deep Intelligence — `POST /api/enterprise/industry/enrich/`
- 22 unique OpenAPI operations in the canonical master spec
- 26 standalone capability specs under `sources/`
- 6 top-level tags in the merged spec

**Discovery**
- Market Map — `POST /api/enterprise/market-map/enrich/`
- Target Screening — `POST /api/enterprise/target-screening/enrich/`
- Buyer Screening — `POST /api/enterprise/buyer-screening/enrich/`
The 26 capability files map to the official Wokelo docs set:

**Monitoring**
- Company News Monitoring — `GET /api/enterprise/company/news/`

**Workflow**
- Company Research — `POST /api/company_primer/v3/start/` and workflow-manager variant
- Industry Research — `POST /api/industry_primer/v3/start/` and workflow-manager variant
- Peer Comparison — via workflow manager
- Custom Workflows — via workflow manager

**Supporting**
- Company Search, File Upload, Request Lifecycle (status / cancel / result), Report Lifecycle (status / download), Report Configuration
- Authentication: Login
- Enrichment: Company Instant Enrichment, Company Deep Intelligence, Industry Deep Intelligence, Fetch Filings Data, Employee Reviews, Fetch Earnings Transcripts, Product Reviews
- Discovery: Market Map, Target Screening, Buyer Screening, Company Search
- Monitoring: Company News Monitoring, Legacy Initiate News Report, Legacy Fetch News Report
- Workflow Automation: Company Research, Industry Research, Peer Comparison, Custom Workflows
- Supporting APIs: Upload File, Request Status, Request Cancel, Request Result, Get Report Status, Download Report, Notebook Configuration

## Working on the spec

```bash
npm install
npm run lint # validate spec
npm run lint # validate openapi.yaml
npm run preview # live-reload doc preview at http://localhost:8080
npm run bundle # produce dist/wokelo-openapi.yaml
npm run build-docs # produce dist/index.html (static)
npm run build # run all of the above
npm run build-docs # produce dist/index.html
npm run build # lint + bundle + docs
```

## Hosted URLs (once deployed)

- Canonical spec: `https://docs.wokelo.ai/openapi.yaml`
- Bundled spec: `https://raw.githubusercontent.com/wokelo-ai/openapi/main/dist/wokelo-openapi.yaml`
- Bundled spec: `https://raw.githubusercontent.com/Wokelo-AI/openapi/main/dist/wokelo-openapi.yaml`
- Hosted docs: `https://wokelo-ai.github.io/openapi/`

## Directory submissions

When submitting to external API directories, use the **bundled** URL (resolves all refs into one file):
When submitting to external API directories, use the **bundled** URL so every `$ref` is resolved into one file:

- APIs.guru / OpenAPI Directory
- Postman API Network
- SwaggerHub
- OpenAPIHub / Apidog Hub
- RapidAPI / APILayer / Zyla / ApyHub
- Public APIs (GitHub)

- APIs.guru / OpenAPI Directory — PR with bundled URL
- Postman API Network — import bundled URL
- SwaggerHub — import bundled URL
- OpenAPIHub, Apidog Hub — import bundled URL
- RapidAPI / APILayer / Zyla / ApyHub — import bundled URL + complete monetization onboarding
- Public APIs (GitHub) — one-line PR with docs link
## Design notes

## Two design decisions worth knowing
1. **Two shared server paths are merged in the master spec.** OpenAPI allows only one operation per method + path, so `POST /api/workflow_manager/start/` and `POST /api/enterprise/company/enrich/` are represented once each in `openapi.yaml` using `oneOf` plus discriminators. The standalone files in `sources/` keep those same real paths but narrow the request body to a single documented capability.

1. **Path collisions are merged with `oneOf`.** Two endpoints share a URL + method (`/api/enterprise/company/enrich/` and `/api/workflow_manager/start/`). Each is represented as a single operation whose request body is a `oneOf` of the supported modes. Every mode has a labeled example.
2. **The master spec is docs-authoritative.** This repo now follows the current official Wokelo docs and Postman collection. As part of the `2.0.0` refresh, the older direct primer endpoints (`/api/company_primer/v3/start/` and `/api/industry_primer/v3/start/`) were removed from the canonical spec because they are not part of the current official capability set.

2. **Duplicate schemas are deduplicated.** When two source files defined schemas with the same name and identical content, one copy is kept. When the content differed, later copies are prefixed with a short tag (e.g. `CustomWFFundingRoundSummary`).
## Versioning

## Spec version
- OpenAPI version: `3.0.3`
- Spec release version: `2.0.0`

OpenAPI **3.0.3** — chosen over 3.1.0 for broader directory compatibility. All current features (oneOf, nullable, etc.) work identically.
`2.0.0` is a semver-major refresh because the published canonical spec changed its endpoint set and now tracks the current official docs corpus directly.
6 changes: 3 additions & 3 deletions SUBMISSION_GUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Host the bundled spec at a stable public URL. Recommended:
Ensure the URL:
- Returns `Content-Type: application/yaml` (or `text/yaml`)
- Has CORS header `Access-Control-Allow-Origin: *` so browser tools can fetch
- Is versioned (tag git releases `v1.0.0`, `v1.1.0` etc.)
- Is versioned (tag git releases `v2.0.0`, `v2.1.0` etc.)

---

Expand All @@ -21,7 +21,7 @@ Ensure the URL:
- **Time:** 20 min
- **Steps:**
1. Fork `https://github.com/APIs-guru/openapi-directory`
2. Add your spec under `APIs/wokelo.ai/1.0.0/openapi.yaml` (or submit URL in registry)
2. Add your spec under `APIs/wokelo.ai/2.0.0/openapi.yaml` (or submit URL in registry)
3. Open PR with title "Add Wokelo API"
4. Maintainers auto-validate and merge
- **Result:** Listed on `https://apis.guru/` and `https://api.apis.guru/v2/list.json` — used by many downstream tools
Expand Down Expand Up @@ -129,4 +129,4 @@ Designed for Apify Actors (scraping bots), not REST APIs. Listing would require

- Add directory badges to your website and docs
- Monitor incoming traffic from each source (UTM tags help)
- When you publish v1.1, most directories auto-refetch from your hosted URL; Postman/SwaggerHub may need manual re-import
- When you publish v2.1, most directories auto-refetch from your hosted URL; Postman/SwaggerHub may need manual re-import
1,168 changes: 276 additions & 892 deletions dist/index.html

Large diffs are not rendered by default.

Loading
Loading