# IPs

## List

> Retrieve Criteria IP 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/PubItems/{id}/Rules/{ruleId}/Criteria/IPs":{"get":{"tags":["3-Publishing/Filters/Criteria//IP"],"summary":"List","description":"Retrieve Criteria IP List of a session server with the specified ID.","operationId":"aeec8195-c837-4fa6-a699-3ee2ac975914","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"}},{"name":"ruleId","in":"path","description":"The ID of the Rule to retrieve.","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"Success","content":{"application/json; api-version=1.0":{"schema":{"$ref":"#/components/schemas/AllowedIPsCriteria"}}}},"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":{"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>"},"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 an IP to the IP List of the Criteria settings.

```json
{"openapi":"3.0.1","info":{"title":"Parallels RAS - REST API v1.0","version":"1.0"},"paths":{"/api/PubItems/{id}/Rules/{ruleId}/Criteria/IPs":{"post":{"tags":["3-Publishing/Filters/Criteria//IP"],"summary":"Add","description":"Add an IP to the IP List of the Criteria settings.","operationId":"9afea209-6bc0-4e41-8695-d5b6080f5592","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"}},{"name":"ruleId","in":"path","description":"The ID of the Rule to retrieve.","required":true,"schema":{"type":"integer","format":"int32"}}],"requestBody":{"description":"IP configuration.","content":{"application/json; api-version=1.0":{"schema":{"$ref":"#/components/schemas/AddCriteriaIP"}}}},"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":{"AddCriteriaIP":{"required":["ip","ipType"],"type":"object","properties":{"ip":{"maxLength":255,"minLength":1,"type":"string","description":"<para type=\"description\">Value that represents the IP</para>","nullable":true},"ipType":{"$ref":"#/components/schemas/IPVersion"}},"additionalProperties":false,"description":"<para type=\"synopsis\">Add an IP to the Criteria IP list</para>\r\n<para type=\"description\"></para>"},"IPVersion":{"enum":[["0 = Version4","1 = Version6","2 = BothVersions"]],"type":"string","description":"<para type=\"synopsis\">IP Version</para>\r\n<para type=\"description\"></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":{}}}}}
```

## Remove

> Remove an IP from the IP List of the Criteria settings.

```json
{"openapi":"3.0.1","info":{"title":"Parallels RAS - REST API v1.0","version":"1.0"},"paths":{"/api/PubItems/{id}/Rules/{ruleId}/Criteria/IPs":{"delete":{"tags":["3-Publishing/Filters/Criteria//IP"],"summary":"Remove","description":"Remove an IP from the IP List of the Criteria settings.","operationId":"2d172299-f7c6-4834-8950-b82b3ed688c9","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"}},{"name":"ruleId","in":"path","description":"The ID of the Rule to retrieve.","required":true,"schema":{"type":"integer","format":"int32"}}],"requestBody":{"description":"IP configuration.","content":{"application/json; api-version=1.0":{"schema":{"$ref":"#/components/schemas/RemoveCriteriaIP"}}}},"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":{"RemoveCriteriaIP":{"required":["ip","ipType"],"type":"object","properties":{"ip":{"maxLength":255,"minLength":1,"type":"string","description":"<para type=\"description\">Value that represents the IP</para>","nullable":true},"ipType":{"$ref":"#/components/schemas/IPVersion"}},"additionalProperties":false,"description":"<para type=\"synopsis\">Remove an IP from the Criteria IP list</para>\r\n<para type=\"description\"></para>"},"IPVersion":{"enum":[["0 = Version4","1 = Version6","2 = BothVersions"]],"type":"string","description":"<para type=\"synopsis\">IP Version</para>\r\n<para type=\"description\"></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/publishing/rules/criteria/ips.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.
