# Custom Permission

## Get

> Retrieve the Custom Permissions of an Admin Account by ID.

```json
{"openapi":"3.0.1","info":{"title":"Parallels RAS - REST API v1.0","version":"1.0"},"paths":{"/api/AdminAccount/{adminId}/CustomPermission":{"get":{"tags":["1-Farm settings//Administrators"],"summary":"Get","description":"Retrieve the Custom Permissions of an Admin Account by ID.","operationId":"28c9b90c-b877-4847-a946-aac770deefbb","parameters":[{"name":"adminId","in":"path","description":"Admin Account ID","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"Success","content":{"application/json; api-version=1.0":{"schema":{"$ref":"#/components/schemas/CustomPermission"}}}},"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":{"CustomPermission":{"type":"object","properties":{"sitePermissions":{"type":"array","items":{"$ref":"#/components/schemas/SitePermission"},"description":"<para type=\"description\">List of the site permissions</para>","nullable":true},"globalPermissions":{"$ref":"#/components/schemas/GlobalPermissions"}},"additionalProperties":false,"description":"<para type=\"synopsis\">The custom permissions list</para>\r\n<para type=\"description\"></para>"},"SitePermission":{"type":"object","properties":{"siteId":{"type":"integer","description":"<para type=\"description\">Site ID</para>","format":"int32"},"rdsHosts":{"$ref":"#/components/schemas/SiteTypePermission"},"rdsHostPools":{"$ref":"#/components/schemas/SiteTypePermission"},"remotePCs":{"$ref":"#/components/schemas/SiteTypePermission"},"gateways":{"$ref":"#/components/schemas/SiteTypePermission"},"brokers":{"$ref":"#/components/schemas/SiteTypePermission"},"halb":{"$ref":"#/components/schemas/SiteTypePermission"},"themes":{"$ref":"#/components/schemas/SiteTypePermission"},"publishing":{"$ref":"#/components/schemas/SiteTypePermission"},"connection":{"$ref":"#/components/schemas/SiteTypePermission"},"certificate":{"$ref":"#/components/schemas/SiteTypePermission"},"winDevices":{"$ref":"#/components/schemas/SiteTypePermission"},"customRoutes":{"$ref":"#/components/schemas/SiteTypePermission"},"appPackages":{"$ref":"#/components/schemas/SiteTypePermission"},"manageSessionsByADGroups":{"$ref":"#/components/schemas/SiteTypePermission"}},"additionalProperties":false,"description":"<para type=\"synopsis\">Site Permissions</para>\r\n<para type=\"description\"></para>"},"SiteTypePermission":{"type":"object","properties":{"sitePermission":{"$ref":"#/components/schemas/GlobalPermission"},"objectPermissions":{"type":"array","items":{"$ref":"#/components/schemas/ObjectPermission"},"description":"<para type=\"description\">List of object permissions for this site</para>","nullable":true}},"additionalProperties":false,"description":"<para type=\"synopsis\">Site type permission</para>\r\n<para type=\"description\"></para>"},"GlobalPermission":{"type":"object","properties":{"permissions":{"$ref":"#/components/schemas/PermissionFlags"}},"additionalProperties":false,"description":"<para type=\"synopsis\">The global permission</para>\r\n<para type=\"description\"></para>"},"PermissionFlags":{"enum":[["0 = None","1 = View","2 = Modify","4 = ManageSessions","8 = Add","16 = Delete","32 = Control"]],"type":"string[Flag]","description":"<para type=\"synopsis\">Permission Flags</para>\r\n<para type=\"description\"></para>","format":"int32"},"ObjectPermission":{"type":"object","properties":{"permissions":{"$ref":"#/components/schemas/PermissionFlags"},"objId":{"type":"integer","format":"int32"}},"additionalProperties":false,"description":"<para type=\"synopsis\">The object permission</para>\r\n<para type=\"description\"></para>"},"GlobalPermissions":{"type":"object","properties":{"monitoring":{"$ref":"#/components/schemas/GlobalPermission"},"reporting":{"$ref":"#/components/schemas/GlobalPermission"},"license":{"$ref":"#/components/schemas/GlobalPermission"},"costInsights":{"$ref":"#/components/schemas/GlobalPermission"}},"additionalProperties":false,"description":"<para type=\"synopsis\">The global permissions</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 a Custom Permission of an Admin Account.> \
> Specifying a SiteId is mandatory except for Monitoring and Reporting.> \
> To set a Permission for a specific object, provide an ObjId within the body.> \
> To set a Global Permission, do not provide an ObjId within the body.

```json
{"openapi":"3.0.1","info":{"title":"Parallels RAS - REST API v1.0","version":"1.0"},"paths":{"/api/AdminAccount/{adminId}/CustomPermission":{"put":{"tags":["1-Farm settings//Administrators"],"summary":"Update","description":"Update a Custom Permission of an Admin Account.\r\nSpecifying a SiteId is mandatory except for Monitoring and Reporting.\r\nTo set a Permission for a specific object, provide an ObjId within the body.\r\nTo set a Global Permission, do not provide an ObjId within the body.","operationId":"12b3d699-967e-4314-b804-6d6d99832d50","parameters":[{"name":"adminId","in":"path","description":"Admin Account ID","required":true,"schema":{"type":"integer","format":"int32"}},{"name":"siteId","in":"query","description":"Site ID for the permission being set (optional)","schema":{"type":"integer","format":"int32"}}],"requestBody":{"description":"Custom Permission settings","content":{"application/json; api-version=1.0":{"schema":{"$ref":"#/components/schemas/SetCustomPermission"}}}},"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":{"SetCustomPermission":{"required":["objectType","permissions"],"type":"object","properties":{"objId":{"type":"integer","description":"<para type=\"description\">ID of a particular RAS Farm object to assign permissions for.</para>","format":"int32","nullable":true},"objectType":{"$ref":"#/components/schemas/PermissionObjectType"},"permissions":{"$ref":"#/components/schemas/PermissionFlags"}},"additionalProperties":false,"description":"<para type=\"synopsis\">Update custom administrator permissions</para>\r\n<para type=\"description\"></para>"},"PermissionObjectType":{"enum":[["3 = SecureGateways","5 = RemotePCs","7 = Brokers","16 = RDSHostPools","26 = WinDevices","31 = Themes","40 = Publishing","44 = Certificate","51 = HALB","83 = CustomRoutes","90 = AppPackages","2003 = Reporting","2004 = Monitoring","2012 = Connection","2023 = AVD","2032 = License","2033 = ManageSessionsByADGroups","2034 = CostInsights"]],"type":"string","description":"<para type=\"synopsis\">Permission Object Types</para>\r\n<para type=\"description\"></para>","format":"int32"},"PermissionFlags":{"enum":[["0 = None","1 = View","2 = Modify","4 = ManageSessions","8 = Add","16 = Delete","32 = Control"]],"type":"string[Flag]","description":"<para type=\"synopsis\">Permission Flags</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":{}}}}}
```


---

# Agent Instructions: 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:

```
GET https://docs.parallels.com/landing/ras-rest-api-guide/api-reference/farm-settings/administrators/custom-permission.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
