> 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/fr/config/management-api.md).

# API de gestion

Vous pouvez gérer PowerShell Universal à l'aide de l'API de gestion intégrée. Elle offre la possibilité d'effectuer toutes les actions de la console d'administration de manière automatisée. Vous pouvez consulter et tester l'API en visitant la documentation Swagger à son emplacement par défaut sur votre machine `http://localhost:5000/swagger/index.html`.

{% hint style="info" %}
L'API de gestion est intégrée et ne nécessite pas de licence pour Universal API.
{% endhint %}

## Module PowerShell

Nous fournissons un module PowerShell qui appelle l'API en votre nom afin que vous n'ayez pas à écrire les requêtes HTTP vous-même. Vous pouvez télécharger ce module depuis la PowerShell Gallery.

```powershell
Install-Module Universal
```

Le module PowerShell nécessite un jeton d'application et un nom d'ordinateur pour appeler le serveur Universal. Vous pouvez fournir ces éléments à chaque appel.

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

De plus, vous pouvez vous connecter au serveur Universal en utilisant `Connect-UAServer`.

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

## REST API

L'API de gestion de PowerShell Universal est accessible via des appels REST. Vous pouvez consulter les appels disponibles à l'aide de la documentation Swagger intégrée. Vous aurez besoin d'un jeton d'application pour effectuer des appels vers l'API REST.

## Jetons d'application

Les [jetons d'application](/powershell-universal/fr/securite/app-tokens.md) sont requis par l'API de gestion. Vous devrez utiliser un jeton d'application aussi bien avec les cmdlets PowerShell que pour appeler l'API de gestion directement via REST.

Vous pouvez utiliser un jeton d'application avec `Invoke-RestMethod` en spécifiant l'en-tête d'autorisation.

```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:

```
GET https://docs.devolutions.net/powershell-universal/fr/config/management-api.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.
