Introducing ReadMe's API

ReadMe is an API documentation company - we provide people the ability to document their APIs via our dashboard. That's all well and good if you have a documentation team, with well defined releases and a list of changes to make to your docs. But if you're a smaller team, chances are you'll want to automate some of this stuff.

A few weeks ago we launched (by popular demand) the ability to upload your Swagger/OAS files to us programmatically.

This works pretty well and lots of people have been using it, but it's using an undocumented API that's hidden from public view. We decided it was time to use ReadMe's API documentation features ourselves.

ReadMe API

We now have a public HTTP API for your consumption. You can fetch your API key from inside the Dash by going to "General Settings" -> "API Key". You can use this API key via HTTP Basic authentication, with the key as the username and the password left blank. Like so:

curl https://dash.readme.io/api/v1 -X GET -u nIqc1XEA8C9HEpfgvNkTFOxHOl83SALL:

We only have a couple of endpoints so far for adding, updating and deleting your Swagger files (we're going to update rdme to use this too!). With a view to opening this up to more of our resources in future.

We're looking forward to adding more endpoints to this and to practice what we preach for API development!

Check out the API docs here: https://readme.readme.io/v2.0/reference. What APIs would you like us to add next? Email [support@readme.io](mailto:support@readme.io?subject=ReadMe API Feature Request)

Examples

Uploading a Swagger file

curl https://dash.readme.io/api/v1/swagger -X POST -u nIqc1XEA8C9HEpfgvNkTFOxHOl83SALL: -F "swagger=@./swagger.json"

Updating an existing Swagger file

Using ID from previous step:

curl https://dash.readme.io/api/v1/swagger/5a81e970397286358be4b784 -X POST -u nIqc1XEA8C9HEpfgvNkTFOxHOl83SALL: -F "swagger=@./swagger.json"

Deleting a Swagger file

Using ID from previous step:

curl https://dash.readme.io/api/v1/swagger/5a81e970397286358be4b784 -X DELETE -u nIqc1XEA8C9HEpfgvNkTFOxHOl83SALL:

Having problems? Email [support@readme.io](mailto:support@readme.io?subject=ReadMe API Problem)