# Custom Routes

## List

> Retrieve information about one or multiple custom routes.

```json
{"openapi":"3.0.1","info":{"title":"Parallels RAS - REST API v1.0","version":"1.0"},"paths":{"/api/CustomRoutes":{"get":{"tags":["2-Site settings/Connection and Authentication//Addresses"],"summary":"List","description":"Retrieve information about one or multiple custom routes.","operationId":"dab2aba9-39ed-407e-b999-f9ee630f43fe","parameters":[{"name":"SiteId","in":"query","description":"Site ID from which to retrieve the custom route information (optional).","schema":{"type":"integer","format":"int32"}},{"name":"Name","in":"query","description":"The name of the custom route for which to retrieve the information.","schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json; api-version=1.0":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CustomRoute"}}}}},"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":{"CustomRoute":{"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"},"enabled":{"type":"boolean","description":"<para type=\"description\">Whether Custom Route is enabled or not.</para>"},"name":{"type":"string","description":"<para type=\"description\">Name of the Custom Route</para>","nullable":true},"siteId":{"type":"integer","description":"<para type=\"description\">Site ID</para>","format":"int32"},"description":{"type":"string","description":"<para type=\"description\">Description of the Custom Route</para>","nullable":true},"publicAddress":{"type":"string","description":"<para type=\"description\">Public Address of the Custom Route</para>","nullable":true},"port":{"type":"integer","description":"<para type=\"description\">Port of the Custom Route</para>","format":"int32"},"sslPort":{"type":"integer","description":"<para type=\"description\">SSL Port of the Custom Route</para>","format":"int32"}},"additionalProperties":false,"description":"<para type=\"synopsis\">Custom Route</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

> Create a new custom route.

```json
{"openapi":"3.0.1","info":{"title":"Parallels RAS - REST API v1.0","version":"1.0"},"paths":{"/api/CustomRoutes":{"post":{"tags":["2-Site settings/Connection and Authentication//Addresses"],"summary":"Create","description":"Create a new custom route.","operationId":"eb4e125c-4fc1-4a2a-ad78-113c3b4c19d3","requestBody":{"description":"Custom route settings","content":{"application/json; api-version=1.0":{"schema":{"$ref":"#/components/schemas/NewCustomRoute"}}}},"responses":{"201":{"description":"Created","content":{"application/json; api-version=1.0":{"schema":{"$ref":"#/components/schemas/CustomRoute"}}}},"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":{"NewCustomRoute":{"required":["name","publicAddress"],"type":"object","properties":{"name":{"maxLength":255,"minLength":1,"type":"string","description":"<para type=\"description\">The name of the Custom Route.</para>","nullable":true},"siteId":{"type":"integer","description":"<para type=\"description\">Site ID in which to add the specified Custom Route.</para>\r\n<para type=\"description\">If the parameter is omitted, the site ID of the Licensing Server will be used.</para>","format":"int32"},"enabled":{"type":"boolean","description":"<para type=\"description\">Whether Custom Route is enabled or not</para>"},"description":{"type":"string","description":"<para type=\"description\">A user-defined Custom Route description.</para>","nullable":true},"publicAddress":{"type":"string","description":"<para type=\"description\">Public Address of the Custom Route</para>","nullable":true},"port":{"type":"integer","description":"<para type=\"description\">Port of the Custom Route. Default: 80</para>","format":"int32"},"sslPort":{"type":"integer","description":"<para type=\"description\">SSL Port of the Custom Route. Default: 443</para>","format":"int32"}},"additionalProperties":false,"description":"<para type=\"synopsis\">Create a new Custom Route</para>\r\n<para type=\"description\"></para>"},"CustomRoute":{"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"},"enabled":{"type":"boolean","description":"<para type=\"description\">Whether Custom Route is enabled or not.</para>"},"name":{"type":"string","description":"<para type=\"description\">Name of the Custom Route</para>","nullable":true},"siteId":{"type":"integer","description":"<para type=\"description\">Site ID</para>","format":"int32"},"description":{"type":"string","description":"<para type=\"description\">Description of the Custom Route</para>","nullable":true},"publicAddress":{"type":"string","description":"<para type=\"description\">Public Address of the Custom Route</para>","nullable":true},"port":{"type":"integer","description":"<para type=\"description\">Port of the Custom Route</para>","format":"int32"},"sslPort":{"type":"integer","description":"<para type=\"description\">SSL Port of the Custom Route</para>","format":"int32"}},"additionalProperties":false,"description":"<para type=\"synopsis\">Custom Route</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

> Retrieve information about one custom route by ID.

```json
{"openapi":"3.0.1","info":{"title":"Parallels RAS - REST API v1.0","version":"1.0"},"paths":{"/api/CustomRoutes/{id}":{"get":{"tags":["2-Site settings/Connection and Authentication//Addresses"],"summary":"Get","description":"Retrieve information about one custom route by ID.","operationId":"4fb2f962-4a12-4dfc-9a57-300f2d05c720","parameters":[{"name":"id","in":"path","description":"The ID of a custom route for which to retrieve the information.","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"Success","content":{"application/json; api-version=1.0":{"schema":{"$ref":"#/components/schemas/CustomRoute"}}}},"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":{"CustomRoute":{"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"},"enabled":{"type":"boolean","description":"<para type=\"description\">Whether Custom Route is enabled or not.</para>"},"name":{"type":"string","description":"<para type=\"description\">Name of the Custom Route</para>","nullable":true},"siteId":{"type":"integer","description":"<para type=\"description\">Site ID</para>","format":"int32"},"description":{"type":"string","description":"<para type=\"description\">Description of the Custom Route</para>","nullable":true},"publicAddress":{"type":"string","description":"<para type=\"description\">Public Address of the Custom Route</para>","nullable":true},"port":{"type":"integer","description":"<para type=\"description\">Port of the Custom Route</para>","format":"int32"},"sslPort":{"type":"integer","description":"<para type=\"description\">SSL Port of the Custom Route</para>","format":"int32"}},"additionalProperties":false,"description":"<para type=\"synopsis\">Custom Route</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

> Modify properties of a custom route.

```json
{"openapi":"3.0.1","info":{"title":"Parallels RAS - REST API v1.0","version":"1.0"},"paths":{"/api/CustomRoutes/{id}":{"put":{"tags":["2-Site settings/Connection and Authentication//Addresses"],"summary":"Update","description":"Modify properties of a custom route.","operationId":"5c8680e4-1ebb-40a8-80df-049eb6ed25ea","parameters":[{"name":"id","in":"path","description":"The ID of the custom route to modify.","required":true,"schema":{"type":"integer","format":"int32"}}],"requestBody":{"description":"Custom route settings","content":{"application/json; api-version=1.0":{"schema":{"$ref":"#/components/schemas/SetCustomRoute"}}}},"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":{"SetCustomRoute":{"type":"object","properties":{"enabled":{"type":"boolean","description":"<para type=\"description\">Whether Custom Route is enabled or not</para>","nullable":true},"name":{"maxLength":255,"minLength":1,"type":"string","description":"<para type=\"description\">The new name of the Custom Route.</para>","nullable":true},"description":{"type":"string","description":"<para type=\"description\">A user-defined Custom Route description.</para>","nullable":true},"publicAddress":{"type":"string","description":"<para type=\"description\">Public Address of the Custom Route</para>","nullable":true},"port":{"type":"integer","description":"<para type=\"description\">Port of the Custom Route</para>","format":"int32","nullable":true},"sslPort":{"type":"integer","description":"<para type=\"description\">SSL Port of the Custom Route</para>","format":"int32","nullable":true}},"additionalProperties":false,"description":"<para type=\"synopsis\">Update a Custom Route settings</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":{}}}}}
```

## Delete

> Remove a custom route from a site.

```json
{"openapi":"3.0.1","info":{"title":"Parallels RAS - REST API v1.0","version":"1.0"},"paths":{"/api/CustomRoutes/{id}":{"delete":{"tags":["2-Site settings/Connection and Authentication//Addresses"],"summary":"Delete","description":"Remove a custom route from a site.","operationId":"426072dc-0167-4751-bfa1-b15ab03b82f4","parameters":[{"name":"id","in":"path","description":"The ID of a custom route to remove from the site.","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":{}}}}}
```
