---
title: Get the client device policies
slug: docs/demo/get-the-client-device-policies
description: Learn how to make a GET request to a device policies API endpoint using curl language with this comprehensive code example. Includes essential headers for JSON data acceptance and transmission. Master efficient API communication techniques now.
docTags: 
createdAt: 2022-03-21T20:12:45.000Z
---

{
  "id": "eu46Dl_nYcRpbWtKCGbP5",
  "data": {
    "url": "https://api.fictive.com/REST/api/device-policies",
    "name": "Get the client device policies",
    "method": "GET",
    "request": {
      "pathParameters": [],
      "queryParameters": [],
      "headerParameters": [
        {
          "kind": "optional",
          "name": "X-TokenId",
          "type": "string",
          "description": "The eSuite Token Id"
        },
        {
          "kind": "optional",
          "name": "X-SessionId",
          "type": "string",
          "description": "The eSuite Session Id"
        },
        {
          "kind": "required",
          "name": "X-Version",
          "type": "string",
          "description": "The eSuite Version"
        },
        {
          "kind": "optional",
          "name": "Origin",
          "type": "string",
          "description": "The eSuite Origin"
        }
      ],
      "bodyDataParameters": [],
      "formDataParameters": []
    },
    "responses": [
      {
        "schema": [
          {
            "kind": "optional",
            "type": "array",
            "schema": [
              {
                "kind": "optional",
                "name": "devicePolicyReference",
                "type": "string",
                "example": "",
                "description": ""
              },
              {
                "kind": "optional",
                "name": "allowedDevices",
                "type": "integer<int32>",
                "example": 0,
                "description": "AllowedDevices"
              },
              {
                "kind": "optional",
                "name": "deviceChangesAllowed",
                "type": "integer<int32>",
                "example": 0,
                "description": "DeviceChangesAllowed"
              },
              {
                "kind": "optional",
                "name": "deviceChangesUnit",
                "type": "string<none | hours | days | months | years>",
                "example": "",
                "description": "DeviceChangesUnit"
              },
              {
                "kind": "optional",
                "name": "deviceChangesPeriod",
                "type": "integer<int32>",
                "example": 0,
                "description": "DeviceChangesPeriod"
              },
              {
                "kind": "optional",
                "name": "allowedPlayoutSlots",
                "type": "integer<int32>",
                "example": 0,
                "description": "AllowedPlayoutSlots"
              },
              {
                "kind": "optional",
                "name": "removeAllCustomPolicies",
                "type": "boolean",
                "example": "",
                "description": ""
              },
              {
                "kind": "optional",
                "name": "deviceChangesConsumed",
                "type": "integer<int32>",
                "example": 0,
                "description": "DeviceChangesConsumed"
              },
              {
                "kind": "optional",
                "name": "parentPolicyReference",
                "type": "string",
                "example": "",
                "description": "ParentPolicyReference"
              },
              {
                "kind": "optional",
                "name": "devices",
                "type": "array",
                "schema": [
                  {
                    "kind": "optional",
                    "name": "deviceReference",
                    "type": "string",
                    "example": "",
                    "description": ""
                  },
                  {
                    "kind": "optional",
                    "name": "deviceName",
                    "type": "string",
                    "example": "",
                    "description": ""
                  },
                  {
                    "kind": "optional",
                    "name": "deviceType",
                    "type": "string<none | mobile | tablet | console | tv | desktop>",
                    "example": "",
                    "description": ""
                  },
                  {
                    "kind": "optional",
                    "name": "status",
                    "type": "string<Active | AwaitingDeletion>",
                    "example": "",
                    "description": "The device status"
                  },
                  {
                    "kind": "optional",
                    "name": "identifier",
                    "type": "string",
                    "example": "",
                    "description": ""
                  },
                  {
                    "kind": "optional",
                    "name": "registeredDate",
                    "type": "string<date-time>",
                    "example": "2021-09-21T05:33:16.8228669",
                    "description": ""
                  },
                  {
                    "kind": "optional",
                    "name": "lastUpdateDate",
                    "type": "string<date-time>",
                    "example": "",
                    "description": ""
                  },
                  {
                    "kind": "optional",
                    "name": "registeredSlot",
                    "type": "object",
                    "schema": [
                      {
                        "kind": "optional",
                        "name": "slotReference",
                        "type": "string",
                        "example": "",
                        "description": ""
                      },
                      {
                        "kind": "optional",
                        "name": "lastUpdatedDate",
                        "type": "string<date-time>",
                        "example": "",
                        "description": ""
                      }
                    ],
                    "modelRef": "#/definitions/FictiveGlobal.Api.Rest.Dtos.v1.Devices.DeviceSlotDTO",
                    "customType": "FictiveGlobal.Api.Rest.Dtos.v1.Devices.DeviceSlotDTO"
                  }
                ],
                "modelRef": "#/definitions/FictiveGlobal.Api.Rest.Dtos.v1.Devices.DeviceDTO",
                "customType": "FictiveGlobal.Api.Rest.Dtos.v1.Devices.DeviceDTO[]",
                "description": "Devices"
              }
            ],
            "modelRef": "#/definitions/FictiveGlobal.Api.Rest.Dtos.v1.Devices.DevicePolicyDTO",
            "customType": "FictiveGlobal.Api.Rest.Dtos.v1.Devices.DevicePolicyDTO[]",
            "isExpanded": true
          }
        ],
        "isExpanded": true,
        "statusCode": "200",
        "description": "OK",
        "jsonExample": "[\n  {\n    \"devicePolicyReference\": \"0010SPG7K4O2A5UOOP\",\n    \"allowedDevices\": 1,\n    \"deviceChangesAllowed\": 1,\n    \"deviceChangesUnit\": \"days\",\n    \"deviceChangesPeriod\": 1,\n    \"allowedPlayoutSlots\": 1,\n    \"removeAllCustomPolicies\": false,\n    \"deviceChangesConsumed\": 0,\n    \"parentPolicyReference\": \"0010JP6UISY1ZR0OOP\",\n    \"devices\": [\n      {\n        \"deviceReference\": \"0010OFA69SIHZW8OOP\",\n        \"deviceName\": \"a device name\",\n        \"deviceType\": \"tv\",\n        \"status\": 0,\n        \"identifier\": \"an identifier\",\n        \"registeredDate\": \"2021-09-21T05:33:16.9478743Z\",\n        \"lastUpdateDate\": \"2021-09-21T05:33:16.9478743Z\",\n        \"registeredSlot\": {\n          \"slotReference\": \"0010B6G7K4O2A5UOOP\",\n          \"lastUpdatedDate\": \"2021-09-21T05:33:16.9478743Z\"\n        }\n      }\n    ]\n  }\n]"
      },
      {
        "isExpanded": true,
        "statusCode": "401",
        "description": "API Authentication Failure: Invalid Authentication Type/Credentials Provided",
        "jsonExample": ""
      },
      {
        "isExpanded": true,
        "statusCode": "403",
        "description": "• Missing privilege.\r\n            <br />• Disabled Device Management Feature.",
        "jsonExample": ""
      }
    ],
    "contentType": "application/json",
    "description": "Calling this endpoint will retrieve all the client device policies",
    "examples": {
      "languages": [
        {
          "id": "crVUfRxlywvNfReP3Bhsg",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request GET \\\n     --url https://api.fictive.com/REST/api/device-policies \\\n     --header 'accept: application/json' \\\n     --header 'x-version: string'"
        },
        {
          "id": "-1x5QRctxiRZZtiDSOnZh",
          "language": "javascript",
          "label": "javascript",
          "code": "var myHeaders = new Headers();\nmyHeaders.append(\"accept\", \"application/json\");\nmyHeaders.append(\"content-type\", \"application/json\");\nmyHeaders.append(\"x-version\", \"string\");\n\nvar requestOptions = {\n   method: 'GET',\n   headers: myHeaders,\n   redirect: 'follow'\n};\n\nfetch(\"https://api.fictive.com/REST/api/device-policies\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "5riswEEVQQwOuousW76-X",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"https://api.fictive.com/REST/api/device-policies\")\n\nhttps = Net::HTTP.new(url.host, url.port)\nhttps.use_ssl = true\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"accept\"] = \"application/json\"\nrequest[\"content-type\"] = \"application/json\"\nrequest[\"x-version\"] = \"string\"\n\nresponse = https.request(request)\nputs response.read_body\n"
        },
        {
          "id": "Wsxl-dGVCTNLW58tHdkoq",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"https://api.fictive.com/REST/api/device-policies\"\n\npayload = {}\nheaders = {\n   'accept': 'application/json',\n   'content-type': 'application/json',\n   'x-version': 'string'\n}\n\nresponse = requests.request(\"GET\", url, headers=headers, data=payload)\n\nprint(response.text)\n"
        }
      ],
      "selectedLanguageId": "crVUfRxlywvNfReP3Bhsg"
    },
    "results": {
      "languages": [
        {
          "id": "response-0-200",
          "language": "200",
          "code": "[\n  {\n    \"devicePolicyReference\": \"0010SPG7K4O2A5UOOP\",\n    \"allowedDevices\": 1,\n    \"deviceChangesAllowed\": 1,\n    \"deviceChangesUnit\": \"days\",\n    \"deviceChangesPeriod\": 1,\n    \"allowedPlayoutSlots\": 1,\n    \"removeAllCustomPolicies\": false,\n    \"deviceChangesConsumed\": 0,\n    \"parentPolicyReference\": \"0010JP6UISY1ZR0OOP\",\n    \"devices\": [\n      {\n        \"deviceReference\": \"0010OFA69SIHZW8OOP\",\n        \"deviceName\": \"a device name\",\n        \"deviceType\": \"tv\",\n        \"status\": 0,\n        \"identifier\": \"an identifier\",\n        \"registeredDate\": \"2021-09-21T05:33:16.9478743Z\",\n        \"lastUpdateDate\": \"2021-09-21T05:33:16.9478743Z\",\n        \"registeredSlot\": {\n          \"slotReference\": \"0010B6G7K4O2A5UOOP\",\n          \"lastUpdatedDate\": \"2021-09-21T05:33:16.9478743Z\"\n        }\n      }\n    ]\n  }\n]"
        },
        {
          "id": "response-1-401",
          "language": "401",
          "code": "// API Authentication Failure: Invalid Authentication Type/Credentials Provided\n"
        },
        {
          "id": "response-2-403",
          "language": "403",
          "code": "// • Missing privilege.\r\n            • Disabled Device Management Feature.\n"
        }
      ],
      "selectedLanguageId": "response-0-200"
    }
  },
  "type": "api-oas-v2",
  "children": [
    {
      "text": ""
    }
  ]
}