Generated API Documentation JSON

If the REST API is enabled for your account, account administrators and employees with the Export data role permission can access a system-generated API documentation in OpenAPI 3.0 JSON format. The generated documentation provides a reference for the REST API including resource descriptions, endpoints and methods, parameters, request body and response examples and schema. It includes resource attributes for custom fields specific to your OpenAir account. You can then use any OpenAPI 3.0 compatible tool for further processing.

To access and use the generated API documentation:

  1. In OpenAir, go to Administration > Global settings > Account > Integration: Import/Export. You must be an Administrator or have the relevant role permission to access this screen.

  2. Click REST API documentation. The generated REST API documentation JSON object appears in a new browser tab.

    REST API Documentation JSON viewed in a browser.
  3. Click Copy.

  4. Open an OpenAPI 3.0 compatible tool. For example, open the freely available online tool Swagger Editor in a new browser tab.

  5. Clear any default content and paste the REST API documentation JSON you previously copied to your clipboard. If using Swagger Editor, you copy the JSON in the left pane, The tool can convert the JSON to YAML, generates a static web page and shows the web page in the right pane. You can edit the JSON or YAML and use the resulting static web page as reference to work with the REST API.

The following screenshots show the generated the REST API documentation as a static web page as obtained using Swagger Editor.

REST Documentation API documentation rendered as HTML using Swagger Editor.

The page shows a brief overview followed by endpoints and methods reference. Click any of the frame corresponding to a specific method and endpoint to show reference information for this method and endpoint, including a description of parameters and responses.

Description of a method as rendered by Swagger Editor.

Scroll down to see resource and response models (schema objects), including a description of attributes (fields).

ExpenseReport object model as rendered by Swagger Editor.