Skip to content

Developers and integration

What is OpenAPI?

Definition

OpenAPI: A standard, machine-readable description of an API's endpoints, fields and error codes.

Also known as: OpenAPI Specification, OAS, Swagger

OpenAPI is an open standard for describing REST APIs; it used to be known as the Swagger Specification. An OpenAPI document is written in JSON or YAML and brings together in one place the API's paths, the operations available on each, the request and response fields, the authentication method and the possible error responses.

The document is written for people and machines alike. From the same file you can build a readable API reference, generate client code for many programming languages, run a mock server before the real system is ready, and check incoming requests against the document. As long as the document and the code stay in step, there are fewer integration errors.

Since version 3.1, OpenAPI can describe not only the endpoints you call but also the webhook events an API sends. Looking at the OpenAPI document before connecting to a service is the fastest way to see what is possible.

Example

A software team loads the OpenAPI document of the messaging service it is connecting to into its API client. Every endpoint, required field and sample response arrives as a ready list of requests; the team tries its first call without typing a line by hand and generates client code in its own language.

In UPPU

UPPU's REST API (v1) has a public OpenAPI document and an error-code page. Load the document into your API client or code generator, or read the API reference generated from it.

Talk to us

All terms