Skip to end of metadata
Go to start of metadata

Using Swagger-UI

The REST API that makes up ARI is documented using Swagger, a lightweight specification for documenting RESTful API's. The Swagger API docs are used to generate validations and boilerplate in Asterisk itself, along with static wiki documentation, and interactive documentation using Swagger-UI.

Swagger-UI is a pure HTML+JavaScript application which can download Swagger api-docs, and generate an interactive web page which allows you to view resources, their operations, and submit API requests directly from the documentation. A fork of Swagger-UI is hosted on ari.asterisk.org, which enables DELETE operations (which are disabled by default in Swagger-UI), and sets the default URL to what it would be running Asterisk on your local system.

In order to access ARI, you have to populate the api_key field with a username:password configured in ari.conf. You should also set allowed_origins in ari.conf to allow the site hosting Swagger-UI to access ARI.

ari.conf

 

Swagger-UI Screenshot

  • No labels