> 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

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 dynamically by asking a question.

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

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
