> 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

Utilisez la Management API de PowerShell Universal pour automatiser les actions de la console d'administration au moyen d'appels REST, du module Universal et de l'authentification par jeton d'appli.

Vous pouvez gérer PowerShell Universal à l'aide de la Management API intégrée. Elle permet 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 API à son emplacement par défaut sur votre machine `http://localhost:5000/swagger/index.html` .

{% hint style="info" %}
La Management API 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 le PowerShell Gallery.

```powershell
Install-Module Universal
```

Le module PowerShell nécessite un jeton d'appli 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 à l'aide de `Connect-UAServer`.

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

## REST API

La Management API de PowerShell Universal est accessible au moyen d'appels REST. Vous pouvez consulter les appels disponibles à l'aide de la documentation Swagger API intégrée. Vous aurez besoin d'un App Token pour effectuer des appels vers la REST API.

## App Tokens

Les [App Tokens](/powershell-universal/fr/securite/app-tokens.md) sont requis par la Management API. Vous devrez utiliser un App Token avec les applets de commande PowerShell ainsi que pour appeler la Management API directement au moyen de REST.

Vous pouvez utiliser un App Token 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 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/fr/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.
