> For the complete documentation index, see [llms.txt](https://docs.parallels.com/landing/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.parallels.com/landing/ras-rest-api-guide/api-reference/infrastructure/avd/host-pool/optimization/windows-service.md).

# Windows Service

## List

> Retrieve Windows Service Custom

```json
{"openapi":"3.0.1","info":{"title":"Parallels RAS - REST API v1.0","version":"1.0"},"paths":{"/api/AVD/HostPool/{id}/Optimization/WindowsService":{"get":{"tags":["0-Infrastructure/AVD/Host Pool//Optimization"],"summary":"List","description":"Retrieve Windows Service Custom","operationId":"b9c2c968-e461-4f14-be18-2b55ea620b8f","parameters":[{"name":"id","in":"path","description":"The ID of the optimization setting to retrieve the windows service custom list.","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"Success","content":{"application/json; api-version=1.0":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/WindowsService"}}}}},"401":{"description":"Unauthorized","content":{"application/json; api-version=1.0":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"Not Found","content":{"application/json; api-version=1.0":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}}}},"components":{"schemas":{"WindowsService":{"type":"object","properties":{"type":{"$ref":"#/components/schemas/DetailsType"},"serviceName":{"type":"string","description":"<para type=\"synopsis\">Windows Services Name</para>\r\n<para type=\"description\"></para>","nullable":true},"displayName":{"type":"string","description":"<para type=\"synopsis\">Windows Services Display Name</para>\r\n<para type=\"description\"></para>","nullable":true},"aliases":{"type":"string","description":"<para type=\"synopsis\">Windows Service Aliases</para>\r\n<para type=\"description\"></para>","nullable":true}},"additionalProperties":false,"description":"<para type=\"synopsis\">Image optimization windows services</para>\r\n<para type=\"description\"></para>"},"DetailsType":{"enum":[["0 = Predefined","1 = Custom"]],"type":"string","description":"<para type=\"synopsis\">Details Type</para>\r\n<para type=\"description\"></para>","format":"int32"},"ProblemDetails":{"type":"object","properties":{"type":{"type":"string","nullable":true},"title":{"type":"string","nullable":true},"status":{"type":"integer","format":"int32","nullable":true},"detail":{"type":"string","nullable":true},"instance":{"type":"string","nullable":true}},"additionalProperties":{}}}}}
```

## Add

> Adds a Windows Service Custom to optimization.

```json
{"openapi":"3.0.1","info":{"title":"Parallels RAS - REST API v1.0","version":"1.0"},"paths":{"/api/AVD/HostPool/{id}/Optimization/WindowsService":{"post":{"tags":["0-Infrastructure/AVD/Host Pool//Optimization"],"summary":"Add","description":"Adds a Windows Service Custom to optimization.","operationId":"b2307937-ee22-480c-9aba-b66aae766a73","parameters":[{"name":"id","in":"path","description":"The ID of the Optimization settings to add the windows services custom.","required":true,"schema":{"type":"integer","format":"int32"}}],"requestBody":{"description":"Windows Services Settings.","content":{"application/json; api-version=1.0":{"schema":{"$ref":"#/components/schemas/AddImageOptimizationWindowsServices"}}}},"responses":{"201":{"description":"Created"},"401":{"description":"Unauthorized","content":{"application/json; api-version=1.0":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"Not Found","content":{"application/json; api-version=1.0":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"409":{"description":"Conflict","content":{"application/json; api-version=1.0":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}}}},"components":{"schemas":{"AddImageOptimizationWindowsServices":{"type":"object","properties":{"aliases":{"maxLength":255,"minLength":0,"type":"string","description":"<para type=\"synopsis\">Windows Services Alias</para>\r\n<para type=\"description\"></para>","nullable":true},"displayName":{"maxLength":255,"minLength":0,"type":"string","description":"<para type=\"synopsis\">Windows Services Diplay Name</para>\r\n<para type=\"description\"></para>","nullable":true},"serviceName":{"maxLength":255,"minLength":0,"type":"string","description":"<para type=\"synopsis\">Windows Service Name</para>\r\n<para type=\"description\"></para>","nullable":true}},"additionalProperties":false},"ProblemDetails":{"type":"object","properties":{"type":{"type":"string","nullable":true},"title":{"type":"string","nullable":true},"status":{"type":"integer","format":"int32","nullable":true},"detail":{"type":"string","nullable":true},"instance":{"type":"string","nullable":true}},"additionalProperties":{}}}}}
```

## Delete

> Removes Windows Service Custom From Optimization.

```json
{"openapi":"3.0.1","info":{"title":"Parallels RAS - REST API v1.0","version":"1.0"},"paths":{"/api/AVD/HostPool/{id}/Optimization/WindowsService":{"delete":{"tags":["0-Infrastructure/AVD/Host Pool//Optimization"],"summary":"Delete","description":"Removes Windows Service Custom From Optimization.","operationId":"45a40504-c934-4cda-8bb6-1758b345ea01","parameters":[{"name":"id","in":"path","description":"The ID of the optimization setting to remove the windows Service custom.","required":true,"schema":{"type":"integer","format":"int32"}}],"requestBody":{"description":"Windows Service Custom Settings","content":{"application/json; api-version=1.0":{"schema":{"$ref":"#/components/schemas/RemoveImageOptimizationWindowsService"}}}},"responses":{"204":{"description":"No Content"},"401":{"description":"Unauthorized","content":{"application/json; api-version=1.0":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"Not Found","content":{"application/json; api-version=1.0":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}}}},"components":{"schemas":{"RemoveImageOptimizationWindowsService":{"type":"object","properties":{"serviceName":{"maxLength":255,"minLength":0,"type":"string","description":"<para type=\"synopsis\">Windows Service Name</para>\r\n<para type=\"description\"></para>","nullable":true}},"additionalProperties":false},"ProblemDetails":{"type":"object","properties":{"type":{"type":"string","nullable":true},"title":{"type":"string","nullable":true},"status":{"type":"integer","format":"int32","nullable":true},"detail":{"type":"string","nullable":true},"instance":{"type":"string","nullable":true}},"additionalProperties":{}}}}}
```


---

# 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.parallels.com/landing/ras-rest-api-guide/api-reference/infrastructure/avd/host-pool/optimization/windows-service.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.
