> 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/it/api/about.md).

# Informazioni

Scopra come gli endpoint dell'API REST di PowerShell Universal eseguono script PowerShell, configurano gli ambienti di esecuzione e ottimizzano le prestazioni dei processi API.

Universal offre la possibilità di definire endpoint REST API utilizzando PowerShell. Quando gli endpoint vengono eseguiti da un client HTTP compatibile, lo script PowerShell viene eseguito e restituisce il risultato all'utente finale.

{% hint style="info" %}
Questa funzionalità serve a sviluppare API personalizzate eseguite da Universal. Non è necessaria per gestire Universal. Universal fornisce un set di API di gestione incluse nella piattaforma.
{% endhint %}

## Ambiente di esecuzione

L'ambiente di esecuzione delle REST API viene eseguito nella versione predefinita di PowerShell. A differenza dei job di Automation, che possono essere eseguiti anche tramite l'API di gestione di Universal, le API definite dall'utente vengono eseguite in un unico processo PowerShell. Poiché il processo PowerShell non viene avviato e arrestato a ogni chiamata all'endpoint, l'API è molto più veloce.

È possibile definire l'[ambiente ](/powershell-universal/it/config/environments.md)che esegue il processo API di PowerShell Universal specificando `-ApiEnvironment` in `Set-PSUSetting`. La modifica di questa impostazione provocherà il riavvio del processo API.

```powershell
Set-PSUSetting -ApiEnvironment '7.1'
```

### Ambiente per endpoint

È inoltre possibile definire l'ambiente utilizzato specificando l'Environment sull'endpoint stesso.

```powershell
New-PSUEndpoint -Url /environment -Environment Integrated -Endpoint {
    $PSUEnvironment
}
```

### Prestazioni

Le prestazioni dipendono dall'hardware e dalle condizioni di rete su cui si esegue Universal. Detto questo, in condizioni ideali ci si può aspettare che le API di Universal gestiscano circa 500 richieste al secondo. Questo con un endpoint completamente vuoto, quindi qualsiasi script aggiunto a tale endpoint ridurrà il throughput. La riduzione del throughput dipenderà dai cmdlet e dagli script eseguiti all'interno dell'endpoint API. Non esiste un limite rigido.

Consulti il [Devolutions Blog](https://devolutions.net/blog/) per informazioni dettagliate sui test di benchmark sulle API di Universal.

### Variabili

Le variabili sono elencate nella [pagina delle variabili](/powershell-universal/it/piattaforma/variables.md#api).

## API

* [New-PSUEndpoint](/powershell-universal/it/comandi-powershell/new-psuendpoint.md)
* [Get-PSUEndpoint](/powershell-universal/it/comandi-powershell/get-psuendpoint.md)
* [Remove-PSUEndpoint](/powershell-universal/it/comandi-powershell/remove-psuendpoint.md)
* [Set-PSUSetting](/powershell-universal/it/comandi-powershell/set-psusetting.md)


---

# 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/it/api/about.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.
