# Использование Swagger-UI

Для упрощения изучения и работы с oVirt REST API на Engine можно установить плагин [Swagger-UI](https://swagger.io/tools/swagger-ui/).

На сервере Engine создайте каталог `/usr/share/ovirt-engine/ui-plugins/swagger-ui-resources/` и скопируйте в него содержимое каталога dist из репозитария [https://github.com/swagger-api/swagger-ui. ](<https://github.com/swagger-api/swagger-ui >)

Загрузите Open API спецификацию для oVirt: <https://raw.githubusercontent.com/sdhuang32/OpenAPI-Specification/master/examples/v2.0/yaml/oVirt_API_swagger.yaml> и сохраните в каталоге `/usr/share/ovirt-engine/ui-plugins/swagger-ui/swagger-ui-resources/`

Отредактируйте файл `swagger-initializer.js`, указав в параметре url путь к .yaml файлу со спецификацией oVirt, скопированной на предыдущем шаге, например: `./swagger.yaml`

Создайте файл swagger-ui.json в каталоге `/usr/share/ovirt-engine/ui-plugins/` с содержимым:

```
{
  "name": "swagger-ui",
  "url": "plugin/swagger-ui/index.html",
  "resourcePath": "swagger-ui-resources"
}
```

Для доступ к Swagger-UI перейдите по ссылке: https\://\<manage\_engine\_fqdn>/ovirt-engine/webadmin/plugin/swagger-ui/index.html


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://omnimod.gitbook.io/ovirt/integraciya/ispolzovanie-swagger-ui.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
