# Security Principals

## List

> Retrieve Criteria Security Principal List of a session server with the specified ID.

```json
{"openapi":"3.0.1","info":{"title":"Parallels RAS - REST API v1.0","version":"1.0"},"paths":{"/api/LogonHours/{id}/Criteria/SecurityPrincipals":{"get":{"tags":["2-Site settings/Logon Hours/Criteria//Security Principal"],"summary":"List","description":"Retrieve Criteria Security Principal List of a session server with the specified ID.","operationId":"a56847bb-5de9-4ad9-acdd-d23c5ce69a7b","parameters":[{"name":"id","in":"path","description":"The ID of a session server for which to retrieve the Criteria settings.","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/SecurityPrincipalCriteriaEntry"}}}}},"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":{"SecurityPrincipalCriteriaEntry":{"type":"object","properties":{"account":{"type":"string","description":"<para type=\"description\">The name of the user/group account the filter is added to.</para>","nullable":true},"type":{"$ref":"#/components/schemas/UserType"},"sid":{"type":"string","description":"<para type=\"description\">The SID of the user/group account the filter is added to.</para>","nullable":true}},"additionalProperties":false,"description":"<para type=\"synopsis\">Security Principal Criteria Entry</para>\r\n<para type=\"description\"></para>"},"UserType":{"enum":[["1 = User","2 = Group","3 = ForeignSecurityPrincipal","4 = Computer"]],"type":"string","description":"<para type=\"synopsis\">User 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

> Add a user, group or machine to the Security Principal List of the Criteria settings.

```json
{"openapi":"3.0.1","info":{"title":"Parallels RAS - REST API v1.0","version":"1.0"},"paths":{"/api/LogonHours/{id}/Criteria/SecurityPrincipals":{"post":{"tags":["2-Site settings/Logon Hours/Criteria//Security Principal"],"summary":"Add","description":"Add a user, group or machine to the Security Principal List of the Criteria settings.","operationId":"03934ac2-29a4-45f8-8ee2-cef01827e180","parameters":[{"name":"id","in":"path","description":"The ID of a session server for which to modify the Criteria settings.","required":true,"schema":{"type":"integer","format":"int32"}}],"requestBody":{"description":"SecurityPrincipal configuration.","content":{"application/json; api-version=1.0":{"schema":{"$ref":"#/components/schemas/AddCriteriaSecurityPrincipal"}}}},"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":{"AddCriteriaSecurityPrincipal":{"type":"object","properties":{"account":{"maxLength":255,"minLength":1,"type":"string","description":"<para type=\"description\">The name of the account to add to the Criteria.</para>","nullable":true},"sid":{"maxLength":255,"minLength":1,"type":"string","description":"<para type=\"description\">The SID of the account to add to the Criteria.</para>","nullable":true}},"additionalProperties":false,"description":"<para type=\"synopsis\">Add a user, group or machine account to the Criteria security principal list</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":{}}}}}
```

## Remove

> Remove a user, group or machine from the Security Principal List of the Criteria settings.

```json
{"openapi":"3.0.1","info":{"title":"Parallels RAS - REST API v1.0","version":"1.0"},"paths":{"/api/LogonHours/{id}/Criteria/SecurityPrincipals":{"delete":{"tags":["2-Site settings/Logon Hours/Criteria//Security Principal"],"summary":"Remove","description":"Remove a user, group or machine from the Security Principal List of the Criteria settings.","operationId":"a1d1a2ac-ca0d-4d32-8c17-06f82ccebfe7","parameters":[{"name":"id","in":"path","description":"The ID of a session server for which to modify the Criteria settings.","required":true,"schema":{"type":"integer","format":"int32"}}],"requestBody":{"description":"SecurityPrincipal configuration.","content":{"application/json; api-version=1.0":{"schema":{"$ref":"#/components/schemas/RemoveCriteriaSecurityPrincipal"}}}},"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":{"RemoveCriteriaSecurityPrincipal":{"type":"object","properties":{"account":{"maxLength":255,"minLength":1,"type":"string","description":"<para type=\"description\">The name of the account to remove from the Criteria.</para>","nullable":true},"sid":{"maxLength":255,"minLength":1,"type":"string","description":"<para type=\"description\">The SID of the account to remove from the Criteria.</para>","nullable":true}},"additionalProperties":false,"description":"<para type=\"synopsis\">Remove a user, group or machine from the Criteria security principal list</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":{}}}}}
```
