# Using Swagger UI

The Link11 WAAP API is available in [Swagger UI](https://swagger.io/). This tool provides design documentation, and can also be used to submit API calls directly to your planet.

## Location

By default, the API is available in Swagger UI at:

`{your planet name}/api/v4.0/openapi`.&#x20;

## Access

Using Swagger UI will require the user to be logged into the planet with a sufficient [Access Level](https://waap.docs.link11.com/console-walkthrough/system/users-management#user-parameters).&#x20;

{% hint style="info" %}
Swagger will display the entire API. However, the availability of individual routes is dependent upon the user's Access Level. A request sent with insufficient permissions for the route will fail.
{% endhint %}

{% hint style="warning" %}
If Swagger UI receives a request and the response is an HTML document, the most likely cause is the user is not logged in, or is logged in with insufficient permissions.&#x20;
{% endhint %}

## Namespaces

The Swagger interface shows the namespaces and data models for the API. Often, each one is initially collapsed, as in this example:

<figure><img src="https://2966474948-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FcxktceFryDnM5HLHONr8%2Fuploads%2FkoyamLahO3k1sumPznyS%2FSwagger%20namespace.png?alt=media&#x26;token=40f3d860-9a69-4d38-b5e1-d34a7a95ed28" alt=""><figcaption></figcaption></figure>

Expanding a namespace reveals the endpoints within it:

<figure><img src="https://2966474948-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FcxktceFryDnM5HLHONr8%2Fuploads%2FxS3bOp7LeALwKOugyTXK%2FSwagger%20namespace%20expanded.png?alt=media&#x26;token=26df0fa1-5ded-4654-861a-f1ea1b122e81" alt=""><figcaption></figcaption></figure>

Expanding an endpoint reveals more information about required inputs (if any) and the information that will be returned in the response.

<figure><img src="https://2966474948-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FcxktceFryDnM5HLHONr8%2Fuploads%2FVrtr2iRQvq62ZeWnDywb%2FSwagger%20GET%20config.png?alt=media&#x26;token=6290357e-b69d-4d0c-8562-c43fd0af0d3f" alt=""><figcaption></figcaption></figure>

Some endpoints, as in the example above, do not require any inputs. Others require specific parameters:

<figure><img src="https://2966474948-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FcxktceFryDnM5HLHONr8%2Fuploads%2F6rzGy75I8pwSO8zZYqr5%2FSwagger%20parameters.png?alt=media&#x26;token=34f5c5b8-23ed-4be0-85fb-5da9a301039a" alt=""><figcaption></figcaption></figure>

... or other inputs, such as a request body.

<figure><img src="https://2966474948-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FcxktceFryDnM5HLHONr8%2Fuploads%2FUVQbinTNF4kVu0pDVCPr%2FSwagger%20request%20body.png?alt=media&#x26;token=a421ca6f-1d2b-4842-9762-e014353c41af" alt=""><figcaption></figcaption></figure>

## Running API calls

Selecting the **Try it out** button will enable the editing of the required inputs, if any. Once the required inputs have been completed, the system will:

* display a command that can be submitted via curl (as explained [here](https://waap.docs.link11.com/using-the-product/the-link11-waap-api/using-curl)), and
* display an **Execute** button, which if selected will submit the command to the system and display the results.

Swagger allows you to interact with the API, try different commands, and see what responses will be generated.
