> For the complete documentation index, see [llms.txt](https://docs.devolutions.net/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.devolutions.net/powershell-universal/es/config/management-api.md).

# API de gestión

Utilice la API de gestión de PowerShell Universal para automatizar las acciones de la consola de administración mediante llamadas REST, el módulo Universal y la autenticación con tokens de aplicación.

Puede gestionar PowerShell Universal mediante la API de gestión integrada. Ofrece la posibilidad de realizar todas las acciones de la consola de administración de forma automatizada. Puede ver y probar la API visitando la documentación de la API de Swagger en su ubicación predeterminada en su máquina `http://localhost:5000/swagger/index.html` .

{% hint style="info" %}
La API de gestión está integrada y no requiere una licencia de Universal API.
{% endhint %}

## Módulo de PowerShell

Proporcionamos un módulo de PowerShell que llama a la API en su nombre, de modo que no tenga que escribir usted mismo las solicitudes HTTP. Puede descargar este módulo desde la PowerShell Gallery.

```powershell
Install-Module Universal
```

El módulo de PowerShell requiere un token de aplicación y un nombre de equipo para llamar al servidor Universal. Puede proporcionar estos elementos en cada llamada.

```powershell
Invoke-PSUScript -Script $Script -ComputerName http://localhost:5000 -AppToken $AppToken
```

Además, puede conectarse al servidor Universal utilizando `Connect-UAServer`.

```powershell
Connect-PSUServer -ComputerName http://localhost:5000 -AppToken $AppToken
```

## API REST

Se puede acceder a la API de gestión de PowerShell Universal mediante llamadas REST. Puede consultar las llamadas disponibles utilizando la documentación integrada de la API de Swagger. Necesitará un token de aplicación para realizar llamadas a la API REST.

## Tokens de aplicación

La API de gestión requiere [tokens de aplicación](/powershell-universal/es/seguridad/app-tokens.md). Necesitará utilizar un token de aplicación tanto con los cmdlets de PowerShell como al llamar directamente a la API de gestión a través de REST.

Puede utilizar un token de aplicación con `Invoke-RestMethod` especificando el encabezado de autorización.

```powershell
Invoke-RestMethod http://localhost:5000/api/v1/script -Headers @{ Authorization = "Bearer appToken" }
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.devolutions.net/powershell-universal/es/config/management-api.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
