> 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/site-settings/notifications/notification-scripts.md).

# Notification Scripts

## List

> Retrieves a list of notification script information

```json
{"openapi":"3.0.1","info":{"title":"Parallels RAS - REST API v1.0","version":"1.0"},"paths":{"/api/NotificationScripts":{"get":{"tags":["2-Site settings/Notifications//Scripts"],"summary":"List","description":"Retrieves a list of notification script information","operationId":"810d70fd-90c0-4de0-b3ad-382637ae3c75","parameters":[{"name":"SiteId","in":"query","description":"Site ID for which to retrieve notification scripts (optional)","schema":{"type":"integer","format":"int32"}},{"name":"Name","in":"query","description":"Filter the result by notification name (optional)","schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json; api-version=1.0":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/NotificationScript"}}}}},"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":{"NotificationScript":{"type":"object","properties":{"id":{"type":"integer","description":"<para type=\"description\">ID of the object.</para>","format":"int32"},"adminCreate":{"type":"string","description":"<para type=\"description\">User who created the object.</para>","nullable":true},"adminLastMod":{"type":"string","description":"<para type=\"description\">User who last modified the object.</para>","nullable":true},"timeCreate":{"type":"string","description":"<para type=\"description\">Time when the object was created.</para>","format":"date-time"},"timeLastMod":{"type":"string","description":"<para type=\"description\">Time when the object was last modified.</para>","format":"date-time"},"name":{"type":"string","nullable":true},"siteId":{"type":"integer","format":"int32"},"command":{"type":"string","nullable":true},"arguments":{"type":"string","nullable":true},"initialDirectory":{"type":"string","nullable":true},"username":{"type":"string","nullable":true}},"additionalProperties":false,"description":"<para type=\"synopsis\">Notification Script</para>\r\n<para type=\"description\"></para>"},"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":{}}}}}
```

## Create

> Creates a new notification script

```json
{"openapi":"3.0.1","info":{"title":"Parallels RAS - REST API v1.0","version":"1.0"},"paths":{"/api/NotificationScripts":{"post":{"tags":["2-Site settings/Notifications//Scripts"],"summary":"Create","description":"Creates a new notification script","operationId":"7ec30df2-a37e-46fd-b016-9b19333022c6","requestBody":{"description":"A script can be attached to any of the notifications.","content":{"application/json; api-version=1.0":{"schema":{"$ref":"#/components/schemas/NewNotificationScript"}}}},"responses":{"201":{"description":"Created","content":{"application/json; api-version=1.0":{"schema":{"$ref":"#/components/schemas/NotificationScript"}}}},"401":{"description":"Unauthorized","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":{"NewNotificationScript":{"required":["command","name"],"type":"object","properties":{"name":{"maxLength":255,"minLength":1,"type":"string","description":"<para type=\"description\">Script name.</para>","nullable":true},"siteId":{"type":"integer","description":"<para type=\"description\">Site ID</para>\r\n<para type=\"description\">If the parameter is omitted, the site ID of the Licensing Server will be used.</para>","format":"int32"},"command":{"maxLength":255,"minLength":1,"type":"string","description":"<para type=\"description\">Command to execute when invoked.</para>","nullable":true},"arguments":{"maxLength":255,"minLength":1,"type":"string","description":"<para type=\"description\">Command arguments.</para>\r\n<para type=\"description\">Possible values: ($CA), ($ENROLLMENTMETHOD), ($FARM-NAME), ($HOSTPOOL), \r\n            ($LOCATION), ($NOTIFICATION-TIME), ($NOTIFICATION-TYPE), ($PROVIDER), ($RESOURCEGROUP), ($SERVER-ADDRESS), ($SITE-NAME),\r\n            ($TENANTBROKER), ($TENANTNAME), ($THRESHOLD-DIRECTION), ($THRESHOLD-VALUE), ($TRIGGER-ADDRESS), ($WORKSPACE)</para>","nullable":true},"initialDirectory":{"maxLength":255,"minLength":1,"type":"string","description":"<para type=\"description\">Script base directory</para>","nullable":true},"username":{"maxLength":255,"minLength":1,"type":"string","description":"<para type=\"description\">Execute script as this system user.</para>","nullable":true},"password":{"type":"string","description":"<para type=\"description\">System user password.</para>","nullable":true}},"additionalProperties":false},"NotificationScript":{"type":"object","properties":{"id":{"type":"integer","description":"<para type=\"description\">ID of the object.</para>","format":"int32"},"adminCreate":{"type":"string","description":"<para type=\"description\">User who created the object.</para>","nullable":true},"adminLastMod":{"type":"string","description":"<para type=\"description\">User who last modified the object.</para>","nullable":true},"timeCreate":{"type":"string","description":"<para type=\"description\">Time when the object was created.</para>","format":"date-time"},"timeLastMod":{"type":"string","description":"<para type=\"description\">Time when the object was last modified.</para>","format":"date-time"},"name":{"type":"string","nullable":true},"siteId":{"type":"integer","format":"int32"},"command":{"type":"string","nullable":true},"arguments":{"type":"string","nullable":true},"initialDirectory":{"type":"string","nullable":true},"username":{"type":"string","nullable":true}},"additionalProperties":false,"description":"<para type=\"synopsis\">Notification Script</para>\r\n<para type=\"description\"></para>"},"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":{}}}}}
```

## Get

> Retrieves a notification script by ID

```json
{"openapi":"3.0.1","info":{"title":"Parallels RAS - REST API v1.0","version":"1.0"},"paths":{"/api/NotificationScripts/{id}":{"get":{"tags":["2-Site settings/Notifications//Scripts"],"summary":"Get","description":"Retrieves a notification script by ID","operationId":"bdd1ef91-cef0-4e9a-8c1b-6e64b65c7b0b","parameters":[{"name":"id","in":"path","description":"Notification script ID","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"Success","content":{"application/json; api-version=1.0":{"schema":{"$ref":"#/components/schemas/NotificationScript"}}}},"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":{"NotificationScript":{"type":"object","properties":{"id":{"type":"integer","description":"<para type=\"description\">ID of the object.</para>","format":"int32"},"adminCreate":{"type":"string","description":"<para type=\"description\">User who created the object.</para>","nullable":true},"adminLastMod":{"type":"string","description":"<para type=\"description\">User who last modified the object.</para>","nullable":true},"timeCreate":{"type":"string","description":"<para type=\"description\">Time when the object was created.</para>","format":"date-time"},"timeLastMod":{"type":"string","description":"<para type=\"description\">Time when the object was last modified.</para>","format":"date-time"},"name":{"type":"string","nullable":true},"siteId":{"type":"integer","format":"int32"},"command":{"type":"string","nullable":true},"arguments":{"type":"string","nullable":true},"initialDirectory":{"type":"string","nullable":true},"username":{"type":"string","nullable":true}},"additionalProperties":false,"description":"<para type=\"synopsis\">Notification Script</para>\r\n<para type=\"description\"></para>"},"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":{}}}}}
```

## Update

> Update script notification by ID.

```json
{"openapi":"3.0.1","info":{"title":"Parallels RAS - REST API v1.0","version":"1.0"},"paths":{"/api/NotificationScripts/{id}":{"put":{"tags":["2-Site settings/Notifications//Scripts"],"summary":"Update","description":"Update script notification by ID.","operationId":"ada096bc-e450-499d-ac04-3a879a91fe92","parameters":[{"name":"id","in":"path","description":"Script notification ID","required":true,"schema":{"type":"integer","format":"int32"}}],"requestBody":{"description":"Set script notification","content":{"application/json; api-version=1.0":{"schema":{"$ref":"#/components/schemas/SetNotificationScript"}}}},"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":{"SetNotificationScript":{"type":"object","properties":{"name":{"maxLength":255,"minLength":1,"type":"string","description":"<para type=\"description\">A new script name to assign.</para>","nullable":true},"command":{"maxLength":255,"minLength":1,"type":"string","description":"<para type=\"description\">Command to execute when invoked.</para>","nullable":true},"arguments":{"maxLength":255,"minLength":1,"type":"string","description":"<para type=\"description\">Command arguments.</para>","nullable":true},"initialDirectory":{"maxLength":255,"minLength":1,"type":"string","description":"<para type=\"description\">Script base directory.</para>","nullable":true},"username":{"maxLength":255,"minLength":1,"type":"string","description":"<para type=\"description\">Execute script as this system user.</para>","nullable":true},"password":{"type":"string","description":"<para type=\"description\">System user password.</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

> Delete a script notification by ID.

```json
{"openapi":"3.0.1","info":{"title":"Parallels RAS - REST API v1.0","version":"1.0"},"paths":{"/api/NotificationScripts/{id}":{"delete":{"tags":["2-Site settings/Notifications//Scripts"],"summary":"Delete","description":"Delete a script notification by ID.","operationId":"8ea65965-2695-444c-ab7d-528d70a860d0","parameters":[{"name":"id","in":"path","description":"Script notification ID","required":true,"schema":{"type":"integer","format":"int32"}}],"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":{"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/site-settings/notifications/notification-scripts.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.
