> For the complete documentation index, see [llms.txt](https://digital-legacy-studios.gitbook.io/digital-legacy-studios-dapp/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://digital-legacy-studios.gitbook.io/digital-legacy-studios-dapp/basics/openapi.md).

# OpenAPI

How to sync your DLS dApp documentation with OpenAPI or Swagger files to enable seamless API auto-generation, testing, and interaction within your documentation.

### **What is OpenAPI Integration?**

The **DLS dApp** supports **OpenAPI (OAS) and Swagger** integrations, allowing developers to:

* **Sync API documentation** automatically from a hosted URL or file.
* **Generate API method references** within the GitBook documentation.
* **Test API endpoints in real-time** using GitBook’s built-in **OpenAPI block powered by Scalar**.

This feature enhances **developer usability** by providing **interactive API testing** directly from the documentation, ensuring a streamlined development process.

### **Setting Up OpenAPI Sync in DLS Documentation**

#### **1. Syncing an OpenAPI File**

DLS allows you to sync API documentation from an **OpenAPI (OAS) or Swagger file**. Follow these steps:

1. Navigate to the **DLS GitBook documentation**.
2. Click on the **Sync OpenAPI File** option.
3. Upload your **.json** or **.yaml** OpenAPI specification file.
4. GitBook will **automatically generate** API documentation based on the file.

#### **2. Syncing an OpenAPI URL**

Alternatively, you can sync API updates dynamically using a hosted URL:

1. Navigate to the **DLS GitBook documentation**.
2. Click on **OpenAPI URL Sync**.
3. Enter the **API endpoint URL** that hosts the **OAS/Swagger file**.
4. GitBook will fetch and update the documentation automatically whenever changes are detected.

### **Using the OpenAPI Block in DLS Documentation**

GitBook’s **OpenAPI block**, powered by **Scalar**, allows developers to:

* **Test API requests and responses** directly from the documentation.
* **View request parameters, response formats, and authentication requirements**.
* **Send live API calls** using integrated request handlers.

#### **How to Insert an OpenAPI Block**

To add an interactive API block:

1. Press `/` to open the **Insert Block Menu**.
2. Search for **"OpenAPI Block"**.
3. Select the **OpenAPI block** and configure it with your API details.
4. GitBook will render an interactive API tester with **real-time response data**.

> **Pro Tip:** Use the OpenAPI block to allow DLS users to **query metadata, manage blockchain interactions, and retrieve decentralized storage details in real-time**.

### **Benefits of OpenAPI Integration in DLS**

* **Real-Time API Testing**: Ensure endpoints function correctly within the documentation.
* **Automated Updates**: Keep API docs in sync with the latest DLS protocol changes.
* **Improved Developer Experience**: Provide clear, interactive API references for easier adoption.
* **Enhanced Transparency**: OpenAPI documentation allows users to see **exactly how DLS dApp interacts with blockchain protocols and metadata storage**.

### **Next Steps**

#### **Explore More**

* Learn about **DLS API authentication and token-based access**.
* Discover **best practices for integrating blockchain APIs** with metadata storage.

#### **Join the Developer Community**

* Engage with **DLS dApp developers** in our forums and GitHub discussions.
* Share feedback and contribute to **API enhancements and improvements**.

***

By integrating **OpenAPI with the DLS dApp**, developers can seamlessly **document, test, and interact** with blockchain-powered media digitization and preservation services, making DLS an **accessible and developer-friendly decentralized platform**.

**Start building with DLS OpenAPI today!**
