# OpenAPI

OpenAPI in Varbase is used as a means to create, describe, and consume RESTful APIs in a way that is accessible and easily understandable.

### The usage of OpenAPI:

1. **API Documentation:** OpenAPI provides a standardized way to document your API endpoints, making it easier for developers to understand how to interact with your services.&#x20;
2. **Auto-generate Code:** With OpenAPI specifications, you can auto-generate client libraries in various programming languages, reducing the time needed to write code for API consumption.&#x20;
3. **Interactive API Access:** Tools like Swagger UI use OpenAPI specifications to provide an interactive interface for exploring and testing API endpoints.

This approach streamlines the development process by ensuring that your API is well-documented, maintainable, and easy for other developers to integrate with.

{% hint style="info" %}
**Varbase API**: helps Drupal to connect the OpenAPI Javascript Library for further information visit: [Varbase API](https://docs.varbase.vardot.com/developers/understanding-varbase/optional-components/varbase-api).
{% endhint %}

### How to Navigate OpenAPI in Varbase:

Go to **Configuration/ Web Services/&#x20;*****OpenAPI.***

<figure><img src="https://content.gitbook.com/content/0NVNo0YmQjrLSa4Sn1ic/blobs/UmTZx5DKzK5Ymonaf5lH/image.png" alt=""><figcaption><p>Navigate OpenAPI</p></figcaption></figure>

<figure><img src="https://content.gitbook.com/content/0NVNo0YmQjrLSa4Sn1ic/blobs/sAscvxPpG28jCzZNX2Jd/image.png" alt=""><figcaption><p>OpenAPI Page</p></figcaption></figure>

### OpenAPI Documentation:

1. Navigate to **Configuration/ Web Services/&#x20;*****OpenAPI.***
2. Click on ***Explore with ReDoc*** or ***Explore with Swagger UI.***
3. You'll be redirected to the OpenAPI Documentation page.

<figure><img src="https://content.gitbook.com/content/0NVNo0YmQjrLSa4Sn1ic/blobs/WP7ANtF5xiZCrTHkxZhE/image.png" alt=""><figcaption><p>Explore with ReDoc &#x26; Explore with Swagger UI Buttons</p></figcaption></figure>

<figure><img src="https://content.gitbook.com/content/0NVNo0YmQjrLSa4Sn1ic/blobs/kVR0Bjazg3W5b7xNyZYo/image.png" alt=""><figcaption><p>OpenAPI Documentation - Explore with ReDoc</p></figcaption></figure>

<figure><img src="https://content.gitbook.com/content/0NVNo0YmQjrLSa4Sn1ic/blobs/k187eVYf1WtATs1Pslue/image.png" alt=""><figcaption><p>OpenAPI Documentation - Explore with Swagger UI</p></figcaption></figure>

{% hint style="info" %}
For further information about OpenAPI Documentation visit: [**Browsing OpenAPI Documentation For JSON API**](https://docs.varbase.vardot.com/developers/configuring-a-varbase-site/configuring-json-api-features#browsing-openapi-documentation-for-json-api)
{% endhint %}
