Menu

Listing an API on RapidAPI: five things the docs don't cover
📰

Listing an API on RapidAPI: five things the docs don't cover

DEV Community: go·Atabek Murtazaev·13 days ago
#xFPrI0Hl
#devtogo#devto#dev#rapidapi#endpoints
Reading 0:00
15s threshold

I spent two weeks putting a PDF processing API on RapidAPI. The code was the

easy part: twelve endpoints that already worked, serving a website. What cost

me the time was the gateway, and almost none of it is in the documentation.

1. The gateway routes only the endpoints you declare

My origin server has twelve endpoints. I defined four in RapidAPI's dashboard

to get the listing live, assuming the gateway was a dumb proxy that would

forward whatever path came through.

$ curl -X POST "https://...p.rapidapi.com/ocr-pdf" -H "X-RapidAPI-Key: $KEY " ... { "message" : "Endpoint '/ocr-pdf' does not exist" }

Enter fullscreen mode

Exit fullscreen mode

Eight of my twelve endpoints were unreachable. I had already written the

documentation for all twelve. Had I published it, every subscriber would have

hit a 404 on two thirds of the product.

Declare every endpoint before you write a line of docs.

2.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.