# Criteria

## Get

> Retrieve the criteria settings of a logon hours setting 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":{"get":{"tags":["2-Site settings/Logon Hours/Criteria//0-Basic Operations"],"summary":"Get","description":"Retrieve the criteria settings of a logon hours setting with the specified ID.","operationId":"f7810cb2-7374-4bde-bc8d-7697f3ee18b1","parameters":[{"name":"id","in":"path","description":"The ID of a logon hours setting 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":{"$ref":"#/components/schemas/LogonHours"}}}},"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":{"LogonHours":{"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","description":"<para type=\"description\">Name of the logon hours rule</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 logon hours rule</para>","nullable":true},"enabled":{"type":"boolean","description":"<para type=\"description\">Whether the logon hours rule is enabled or not</para>"},"order":{"type":"integer","description":"<para type=\"description\">Order of the logon hours rule</para>","format":"int32"},"criteria":{"$ref":"#/components/schemas/LogonHoursCriteria"},"permittedHourPlan":{"$ref":"#/components/schemas/PermittedHourPlan"}},"additionalProperties":false,"description":"<para type=\"synopsis\">Logon Hours</para>\r\n<para type=\"description\"></para>"},"LogonHoursCriteria":{"type":"object","properties":{"securityPrincipals":{"$ref":"#/components/schemas/SecurityPrincipalsCriteria"},"gateways":{"$ref":"#/components/schemas/GatewaysCriteria"},"oSs":{"$ref":"#/components/schemas/OSsCriteria"},"iPs":{"$ref":"#/components/schemas/IPsCriteria"},"hardwareIDs":{"$ref":"#/components/schemas/HardwareIDsCriteria"},"devices":{"$ref":"#/components/schemas/DevicesCriteria"},"themes":{"$ref":"#/components/schemas/ThemesCriteria"}},"additionalProperties":false,"description":"<para type=\"synopsis\">Logon Hours Criteria</para>\r\n<para type=\"description\"></para>"},"SecurityPrincipalsCriteria":{"type":"object","properties":{"enabled":{"type":"boolean","description":"<para type=\"description\">Whether the Security Principals Criteria is enabled or not</para>"},"matchingMode":{"$ref":"#/components/schemas/MatchingModeType"},"members":{"type":"array","items":{"$ref":"#/components/schemas/SecurityPrincipalCriteriaEntry"},"description":"<para type=\"description\">User criteria list</para>","nullable":true}},"additionalProperties":false,"description":"<para type=\"synopsis\">Security Principals Criteria</para>\r\n<para type=\"description\"></para>"},"MatchingModeType":{"enum":[["0 = IsNotOneOfTheFollowing","1 = IsOneOfTheFollowing"]],"type":"string","description":"<para type=\"synopsis\">Matching mode type options</para>\r\n<para type=\"description\"></para>","format":"int32"},"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"},"GatewaysCriteria":{"type":"object","properties":{"enabled":{"type":"boolean","description":"<para type=\"description\">Whether the Gateways Criteria is enabled or not</para>"},"matchingMode":{"$ref":"#/components/schemas/MatchingModeType"},"members":{"type":"array","items":{"$ref":"#/components/schemas/GatewayCriteriaEntry"},"description":"<para type=\"description\">Gateway criteria list</para>","nullable":true}},"additionalProperties":false,"description":"<para type=\"synopsis\">Gateways Criteria</para>\r\n<para type=\"description\"></para>"},"GatewayCriteriaEntry":{"type":"object","properties":{"gatewayIP":{"type":"string","description":"<para type=\"description\">The gateway IP.</para>","nullable":true}},"additionalProperties":false,"description":"<para type=\"synopsis\">Gateway criteria entry</para>\r\n<para type=\"description\"></para>"},"OSsCriteria":{"type":"object","properties":{"enabled":{"type":"boolean","description":"<para type=\"description\">Whether the OSs Criteria is enabled or not</para>"},"matchingMode":{"$ref":"#/components/schemas/MatchingModeType"},"allowedOSes":{"$ref":"#/components/schemas/AllowedOperatingSystems"}},"additionalProperties":false,"description":"<para type=\"synopsis\">OS Criteria Settings</para>\r\n<para type=\"description\"></para>"},"AllowedOperatingSystems":{"type":"object","properties":{"chrome":{"type":"boolean","description":"<para type=\"description\">Whether Chrome is allowed or not.</para>"},"android":{"type":"boolean","description":"<para type=\"description\">Whether Android is allowed or not.</para>"},"webClient":{"type":"boolean","description":"<para type=\"description\">Whether Web Client is allowed or not.</para>"},"iOS":{"type":"boolean","description":"<para type=\"description\">Whether iOS is allowed or not.</para>"},"linux":{"type":"boolean","description":"<para type=\"description\">Whether Linux is allowed or not.</para>"},"mac":{"type":"boolean","description":"<para type=\"description\">Whether MAC OS is allowed or not.</para>"},"wyse":{"type":"boolean","description":"<para type=\"description\">Whether Wyse is allowed or not.</para>"},"windows":{"type":"boolean","description":"<para type=\"description\">Whether Windows is allowed or not.</para>"}},"additionalProperties":false,"description":"<para type=\"synopsis\">Allowed Operating Systems</para>\r\n<para type=\"description\"></para>"},"IPsCriteria":{"type":"object","properties":{"enabled":{"type":"boolean","description":"<para type=\"description\">Whether the IPs Criteria is enabled or not</para>"},"matchingMode":{"$ref":"#/components/schemas/MatchingModeType"},"allowedIPs":{"$ref":"#/components/schemas/AllowedIPsCriteria"}},"additionalProperties":false,"description":"<para type=\"synopsis\">IPs Criteria</para>\r\n<para type=\"description\"></para>"},"AllowedIPsCriteria":{"type":"object","properties":{"iPv4s":{"type":"array","items":{"$ref":"#/components/schemas/IPv4CriteriaEntry"},"description":"<para type=\"description\">IPv4 criteria list</para>","nullable":true},"iPv6s":{"type":"array","items":{"$ref":"#/components/schemas/IPv6CriteriaEntry"},"description":"<para type=\"description\">IPv6 criteria list</para>","nullable":true}},"additionalProperties":false,"description":"<para type=\"synopsis\">Allowed IPs Criteria</para>\r\n<para type=\"description\"></para>"},"IPv4CriteriaEntry":{"type":"object","properties":{"from":{"type":"string","nullable":true},"to":{"type":"string","nullable":true}},"additionalProperties":false,"description":"<para type=\"synopsis\">IPv4 Criteria Entry</para>\r\n<para type=\"description\"></para>"},"IPv6CriteriaEntry":{"type":"object","properties":{"from":{"type":"string","nullable":true},"to":{"type":"string","nullable":true}},"additionalProperties":false,"description":"<para type=\"synopsis\">IPv6 Criteria Entry</para>\r\n<para type=\"description\"></para>"},"HardwareIDsCriteria":{"type":"object","properties":{"enabled":{"type":"boolean","description":"<para type=\"description\">Whether the Hardware IDs Criteria is enabled or not</para>"},"matchingMode":{"$ref":"#/components/schemas/MatchingModeType"},"members":{"type":"array","items":{"$ref":"#/components/schemas/HardwareIDCriteriaEntry"},"description":"<para type=\"description\">Hardware IDs criteria list</para>","nullable":true}},"additionalProperties":false,"description":"<para type=\"synopsis\">Hardware IDs Criteria</para>\r\n<para type=\"description\"></para>"},"HardwareIDCriteriaEntry":{"type":"object","properties":{"hardwareID":{"type":"string","description":"<para type=\"description\">The hardware ID.</para>","nullable":true}},"additionalProperties":false,"description":"<para type=\"synopsis\">Hardware ID criteria entry</para>\r\n<para type=\"description\"></para>"},"DevicesCriteria":{"type":"object","properties":{"enabled":{"type":"boolean","description":"<para type=\"description\">Whether the Devices Criteria is enabled or not</para>"},"matchingMode":{"$ref":"#/components/schemas/MatchingModeType"},"members":{"type":"array","items":{"$ref":"#/components/schemas/ClientDeviceCriteriaEntry"},"description":"<para type=\"description\">Client criteria list</para>","nullable":true}},"additionalProperties":false,"description":"<para type=\"synopsis\">Devices Criteria</para>\r\n<para type=\"description\"></para>"},"ClientDeviceCriteriaEntry":{"type":"object","properties":{"client":{"type":"string","description":"<para type=\"description\">The name of the client device.</para>","nullable":true}},"additionalProperties":false,"description":"<para type=\"synopsis\">Client device criteria entry</para>\r\n<para type=\"description\"></para>"},"ThemesCriteria":{"type":"object","properties":{"enabled":{"type":"boolean","description":"<para type=\"description\">Whether the Themes Criteria is enabled or not</para>"},"matchingMode":{"$ref":"#/components/schemas/MatchingModeType"},"ids":{"type":"array","items":{"type":"integer","format":"int32"},"description":"<para type=\"description\">Theme criteria list</para>","nullable":true}},"additionalProperties":false,"description":"<para type=\"synopsis\">Themes Criteria</para>\r\n<para type=\"description\"></para>"},"PermittedHourPlan":{"type":"object","properties":{"sunday":{"$ref":"#/components/schemas/HourPlan"},"monday":{"$ref":"#/components/schemas/HourPlan"},"tuesday":{"$ref":"#/components/schemas/HourPlan"},"wednesday":{"$ref":"#/components/schemas/HourPlan"},"thursday":{"$ref":"#/components/schemas/HourPlan"},"friday":{"$ref":"#/components/schemas/HourPlan"},"saturday":{"$ref":"#/components/schemas/HourPlan"}},"additionalProperties":false,"description":"<para type=\"synopsis\">Permitted Hour Plan</para>\r\n<para type=\"description\"></para>"},"HourPlan":{"enum":[["1 = h00","2 = h01","4 = h02","8 = h03","16 = h04","32 = h05","64 = h06","128 = h07","256 = h08","512 = h09","1024 = h10","2048 = h11","4096 = h12","8192 = h13","16384 = h14","32768 = h15","65536 = h16","131072 = h17","262144 = h18","524288 = h19","1048576 = h20","2097152 = h21","4194304 = h22","8388608 = h23"]],"type":"string[Flag]","description":"<para type=\"synopsis\">Hour Plan</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":{}}}}}
```

## Update

> Update the criteria settings of a logon hours setting 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":{"put":{"tags":["2-Site settings/Logon Hours/Criteria//0-Basic Operations"],"summary":"Update","description":"Update the criteria settings of a logon hours setting with the specified ID.","operationId":"5c1c52e4-60a9-4c01-9abc-973ae2b6cf4e","parameters":[{"name":"id","in":"path","description":"The ID of a logon hours setting for which to modify the criteria settings.","required":true,"schema":{"type":"integer","format":"int32"}}],"requestBody":{"description":"Criteria settings.","content":{"application/json; api-version=1.0":{"schema":{"$ref":"#/components/schemas/SetLogonHoursCriteria"}}}},"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":{"SetLogonHoursCriteria":{"type":"object","properties":{"securityPrincipalsEnabled":{"type":"boolean","description":"<para type=\"description\">Whether the Security Principals criteria is enabled or not</para>","nullable":true},"securityPrincipalsMatchingMode":{"$ref":"#/components/schemas/MatchingModeType"},"gatewaysEnabled":{"type":"boolean","description":"<para type=\"description\">Whether the Gateways criteria is enabled or not</para>","nullable":true},"gatewaysMatchingMode":{"$ref":"#/components/schemas/MatchingModeType"},"themesEnabled":{"type":"boolean","description":"<para type=\"description\">Whether the Themes criteria is enabled or not</para>","nullable":true},"themesMatchingMode":{"$ref":"#/components/schemas/MatchingModeType"},"devicesEnabled":{"type":"boolean","description":"<para type=\"description\">Whether the Devices criteria is enabled or not</para>","nullable":true},"devicesMatchingMode":{"$ref":"#/components/schemas/MatchingModeType"},"oSsEnabled":{"type":"boolean","description":"<para type=\"description\">Whether the OSs criteria is enabled or not</para>","nullable":true},"oSsMatchingMode":{"$ref":"#/components/schemas/MatchingModeType"},"iPsEnabled":{"type":"boolean","description":"<para type=\"description\">Whether the IPs criteria is enabled or not</para>","nullable":true},"iPsMatchingMode":{"$ref":"#/components/schemas/MatchingModeType"},"hardwareIDsEnabled":{"type":"boolean","description":"<para type=\"description\">Whether the HardwareIDs criteria is enabled or not</para>","nullable":true},"hardwareIDsMatchingMode":{"$ref":"#/components/schemas/MatchingModeType"}},"additionalProperties":false},"MatchingModeType":{"enum":[["0 = IsNotOneOfTheFollowing","1 = IsOneOfTheFollowing"]],"type":"string","description":"<para type=\"synopsis\">Matching mode type options</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/site-settings/logon-hours/criteria.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.
