Rules

Get

Retrieve a rule from the Rule List of a client policy with the specified ID.

GET/api/ClientPolicies/{id}/Rules/{ruleId}
Path parameters
id*integer (int32)

The ID of a client policy for which to retrieve the Rule settings.

ruleId*integer (int32)

The ID of the Rule to retrieve.

Response

Success

Body
idinteger (int32)

ID of the object.

priorityinteger (int32)

Priority of the object.

enabledboolean

Whether the Rule is enabled or not

namenullable string

Name of the Rule

descriptionnullable string

Description of the Rule

criteriaPubItemCriteria (object)

PubItem Criteria

Request
const response = await fetch('/api/ClientPolicies/{id}/Rules/{ruleId}', {
    method: 'GET',
    headers: {},
});
const data = await response.json();
Response
{
  "enabled": false,
  "name": "text",
  "description": "text",
  "criteria": {
    "securityPrincipals": {
      "enabled": false,
      "matchingMode": [
        "0 = IsNotOneOfTheFollowing",
        "1 = IsOneOfTheFollowing"
      ],
      "members": [
        {
          "account": "text",
          "type": [
            "1 = User",
            "2 = Group",
            "3 = ForeignSecurityPrincipal",
            "4 = Computer"
          ],
          "sid": "text"
        }
      ]
    },
    "gateways": {
      "enabled": false,
      "matchingMode": [
        "0 = IsNotOneOfTheFollowing",
        "1 = IsOneOfTheFollowing"
      ],
      "members": [
        {
          "gatewayIP": "text"
        }
      ]
    },
    "oSs": {
      "enabled": false,
      "matchingMode": [
        "0 = IsNotOneOfTheFollowing",
        "1 = IsOneOfTheFollowing"
      ],
      "allowedOSes": {
        "chrome": false,
        "android": false,
        "webClient": false,
        "iOS": false,
        "linux": false,
        "mac": false,
        "wyse": false,
        "windows": false
      }
    },
    "iPs": {
      "enabled": false,
      "matchingMode": [
        "0 = IsNotOneOfTheFollowing",
        "1 = IsOneOfTheFollowing"
      ],
      "allowedIPs": {
        "iPv4s": [
          {
            "from": "text",
            "to": "text"
          }
        ],
        "iPv6s": [
          {
            "from": "text",
            "to": "text"
          }
        ]
      }
    },
    "hardwareIDs": {
      "enabled": false,
      "matchingMode": [
        "0 = IsNotOneOfTheFollowing",
        "1 = IsOneOfTheFollowing"
      ],
      "members": [
        {
          "hardwareID": "text"
        }
      ]
    },
    "access": [
      "0 = DenyCriteriaWhen",
      "1 = AllowCriteriaWhen"
    ],
    "devices": {
      "enabled": false,
      "matchingMode": [
        "0 = IsNotOneOfTheFollowing",
        "1 = IsOneOfTheFollowing"
      ],
      "members": [
        {
          "client": "text"
        }
      ]
    },
    "themes": {
      "enabled": false,
      "matchingMode": [
        "0 = IsNotOneOfTheFollowing",
        "1 = IsOneOfTheFollowing"
      ],
      "ids": []
    }
  }
}

Update

Update a rule within the Rule List of a session server with the specified ID.

PUT/api/ClientPolicies/{id}/Rules/{ruleId}
Path parameters
id*integer (int32)

The ID of a session server for which to modify the Rule settings.

ruleId*integer (int32)

The ID of the Rule to retrieve.

Body

Rule settings.

enablednullable boolean

Whether the rule will be enabled or disabled.

ruleNamenullable string

The modified name of the rule.

descriptionnullable string

The modified description of the rule.

priorityMoveDirection (enum)

Move Direction.

0 = Up,1 = Down
Response

No Content

Request
const response = await fetch('/api/ClientPolicies/{id}/Rules/{ruleId}', {
    method: 'PUT',
    headers: {
      "Content-Type": "application/json; api-version=1.0"
    },
    body: JSON.stringify({}),
});
const data = await response.json();
Response
{
  "type": "text",
  "title": "text",
  "detail": "text",
  "instance": "text"
}

Remove

Remove a rule from the Rule List of a session server with the specified ID.

DELETE/api/ClientPolicies/{id}/Rules/{ruleId}
Path parameters
id*integer (int32)

The ID of a session server for which to modify the Rule settings.

ruleId*integer (int32)

The ID of the Rule to remove.

Response

No Content

Request
const response = await fetch('/api/ClientPolicies/{id}/Rules/{ruleId}', {
    method: 'DELETE',
    headers: {},
});
const data = await response.json();
Response
{
  "type": "text",
  "title": "text",
  "detail": "text",
  "instance": "text"
}

List

Retrieve the Rule List of a client policy with the specified ID.

GET/api/ClientPolicies/{id}/Rules
Path parameters
id*integer (int32)

The ID of a client policy for which to retrieve the Rule settings.

Response

Success

Body
idinteger (int32)

ID of the object.

priorityinteger (int32)

Priority of the object.

enabledboolean

Whether the Rule is enabled or not

namenullable string

Name of the Rule

descriptionnullable string

Description of the Rule

criteriaPubItemCriteria (object)

PubItem Criteria

Request
const response = await fetch('/api/ClientPolicies/{id}/Rules', {
    method: 'GET',
    headers: {},
});
const data = await response.json();
Response
[
  {
    "enabled": false,
    "name": "text",
    "description": "text",
    "criteria": {
      "securityPrincipals": {
        "enabled": false,
        "matchingMode": [
          "0 = IsNotOneOfTheFollowing",
          "1 = IsOneOfTheFollowing"
        ],
        "members": [
          {
            "account": "text",
            "type": [
              "1 = User",
              "2 = Group",
              "3 = ForeignSecurityPrincipal",
              "4 = Computer"
            ],
            "sid": "text"
          }
        ]
      },
      "gateways": {
        "enabled": false,
        "matchingMode": [
          "0 = IsNotOneOfTheFollowing",
          "1 = IsOneOfTheFollowing"
        ],
        "members": [
          {
            "gatewayIP": "text"
          }
        ]
      },
      "oSs": {
        "enabled": false,
        "matchingMode": [
          "0 = IsNotOneOfTheFollowing",
          "1 = IsOneOfTheFollowing"
        ],
        "allowedOSes": {
          "chrome": false,
          "android": false,
          "webClient": false,
          "iOS": false,
          "linux": false,
          "mac": false,
          "wyse": false,
          "windows": false
        }
      },
      "iPs": {
        "enabled": false,
        "matchingMode": [
          "0 = IsNotOneOfTheFollowing",
          "1 = IsOneOfTheFollowing"
        ],
        "allowedIPs": {
          "iPv4s": [
            {
              "from": "text",
              "to": "text"
            }
          ],
          "iPv6s": [
            {
              "from": "text",
              "to": "text"
            }
          ]
        }
      },
      "hardwareIDs": {
        "enabled": false,
        "matchingMode": [
          "0 = IsNotOneOfTheFollowing",
          "1 = IsOneOfTheFollowing"
        ],
        "members": [
          {
            "hardwareID": "text"
          }
        ]
      },
      "access": [
        "0 = DenyCriteriaWhen",
        "1 = AllowCriteriaWhen"
      ],
      "devices": {
        "enabled": false,
        "matchingMode": [
          "0 = IsNotOneOfTheFollowing",
          "1 = IsOneOfTheFollowing"
        ],
        "members": [
          {
            "client": "text"
          }
        ]
      },
      "themes": {
        "enabled": false,
        "matchingMode": [
          "0 = IsNotOneOfTheFollowing",
          "1 = IsOneOfTheFollowing"
        ],
        "ids": []
      }
    }
  }
]

Add

Add an Rule to the Rule List of a session server with the specified ID.

POST/api/ClientPolicies/{id}/Rules
Path parameters
id*integer (int32)

The ID of a session server for which to modify the Rule settings.

Body

Gateway IP configuration.

enabledboolean

Whether the new rule will be enabled or disabled.

ruleName*nullable string

The name of the rule to add to the Criteria.

descriptionnullable string

Description for the new rule.

Response

Created

Request
const response = await fetch('/api/ClientPolicies/{id}/Rules', {
    method: 'POST',
    headers: {
      "Content-Type": "application/json; api-version=1.0"
    },
    body: JSON.stringify({
      "ruleName": "text"
    }),
});
const data = await response.json();
Response
{
  "type": "text",
  "title": "text",
  "detail": "text",
  "instance": "text"
}

Other Resources

Feedback

© 2024 Parallels International GmbH. All rights reserved.