# Devices

## List

> Retrieve Criteria Device 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/Devices":{"get":{"tags":["3-Publishing/Filters/Criteria//Device"],"summary":"List","description":"Retrieve Criteria Device List of a session server with the specified ID.","operationId":"2f9083c0-09d6-4df5-916d-81d92f2b6675","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":{"type":"array","items":{"$ref":"#/components/schemas/ClientDeviceCriteriaEntry"}}}}},"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":{"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>"},"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 device to the Device 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/Devices":{"post":{"tags":["3-Publishing/Filters/Criteria//Device"],"summary":"Add","description":"Add a device to the Device List of the Criteria settings.","operationId":"2fd53f05-9ef4-4aac-9b28-356eaa6d935d","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":"Device configuration.","content":{"application/json; api-version=1.0":{"schema":{"$ref":"#/components/schemas/AddCriteriaDevice"}}}},"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":{"AddCriteriaDevice":{"required":["clientDeviceName"],"type":"object","properties":{"clientDeviceName":{"maxLength":255,"minLength":1,"type":"string","description":"<para type=\"description\">The name of the client device to add to the Criteria.</para>","nullable":true}},"additionalProperties":false,"description":"<para type=\"synopsis\">Add a client device to the Criteria Devices 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 device from the Device 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/Devices":{"delete":{"tags":["3-Publishing/Filters/Criteria//Device"],"summary":"Remove","description":"Remove a device from the Device List of the Criteria settings.","operationId":"5a3bebf0-d49d-48ba-9e64-474282119008","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":"Device configuration.","content":{"application/json; api-version=1.0":{"schema":{"$ref":"#/components/schemas/RemoveCriteriaDevice"}}}},"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":{"RemoveCriteriaDevice":{"required":["clientDeviceName"],"type":"object","properties":{"clientDeviceName":{"maxLength":255,"minLength":1,"type":"string","description":"<para type=\"description\">The name of the client device to remove from the Criteria.</para>","nullable":true}},"additionalProperties":false,"description":"<para type=\"synopsis\">Remove a client device from the Criteria Devices 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":{}}}}}
```
