---
title: List Device Group With Secrets Revealed
slug: single-connect-api-3-0-3/list-device-group-with-secrets-revealed
description: Learn how to use the CURL command in this document, which includes a code example for making a GET request to a designated URL. Discover how to structure your request with the appropriate headers to effectively accept and send JSON data. Master the art of
docTags: 
createdAt: 2022-11-10T14:21:49.000Z
---

{
  "id": "ApOmuzOMzLYsn50S10Mj-",
  "data": {
    "url": "{{url}}/aioc-rest-web/rest/discovery/getDeviceGroupWithSecretsRevealed/DBID",
    "method": "GET",
    "request": {
      "pathParameters": [],
      "queryParameters": [],
      "headerParameters": [
        {
          "name": "Content-Type",
          "type": "string",
          "example": "application/json",
          "description": ""
        },
        {
          "name": "X-XSRF-TOKEN",
          "type": "string",
          "example": "{{csrftoken}}",
          "description": ""
        }
      ],
      "bodyDataParameters": [],
      "formDataParameters": []
    },
    "responses": [
      {
        "statusCode": "200",
        "description": "getDeviceGroupWithSecretsRevealed",
        "jsonExample": "{\n    \"dbId\": 303880,\n    \"id\": \"7dad2aa5-414a-4b20-86c0-346876ea88b5\",\n    \"name\": \"SSH DG2\",\n    \"description\": null,\n    \"parentGroupId\": null,\n    \"ifaceOperationCheck\": false,\n    \"timeTolerance\": null,\n    \"realms\": [\n        304366,\n        3478516\n    ],\n    \"deviceIds\": [],\n    \"properties\": {\n        \"globalUsername\": \"root\",\n        \"globalSecretKey\": \"test\",\n        \"globalPassword\": \"123\"\n    },\n    \"children\": [],\n    \"devices\": null,\n    \"rootGroupId\": null,\n    \"globalUsername\": \"root\",\n    \"globalPassword\": \"123\",\n    \"showInDeviceTree\": true,\n    \"useAsRoleGroup\": true,\n    \"discoverySources\": null,\n    \"readOnly\": false\n}"
      }
    ],
    "contentType": "application/json",
    "description": "This method lists device group informations including revealed secret keys.",
    "examples": {
      "languages": [
        {
          "id": "dC1tVkxzP36SNWyzdgEtm",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request GET \\\n     --url {{url}}/aioc-rest-web/rest/discovery/getDeviceGroupWithSecretsRevealed/DBID \\\n     --header 'accept: application/json'"
        },
        {
          "id": "TdABc-YD5WoseCHG1L-Te",
          "language": "javascript",
          "label": "javascript",
          "code": "var myHeaders = new Headers();\nmyHeaders.append(\"accept\", \"application/json\");\nmyHeaders.append(\"content-type\", \"application/json\");\n\nvar requestOptions = {\n   method: 'GET',\n   headers: myHeaders,\n   redirect: 'follow'\n};\n\nfetch(\"{{url}}/aioc-rest-web/rest/discovery/getDeviceGroupWithSecretsRevealed/DBID\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "McTvMeYLEe95Wdg4Kh5lK",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"{{url}}/aioc-rest-web/rest/discovery/getDeviceGroupWithSecretsRevealed/DBID\")\n\nhttp = Net::HTTP.new(url.host, url.port);\nrequest = Net::HTTP::Get.new(url)\nrequest[\"accept\"] = \"application/json\"\nrequest[\"content-type\"] = \"application/json\"\n\nresponse = http.request(request)\nputs response.read_body\n"
        },
        {
          "id": "eav75tIZFgR0WL-ij_AIU",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"{{url}}/aioc-rest-web/rest/discovery/getDeviceGroupWithSecretsRevealed/DBID\"\n\npayload = {}\nheaders = {\n   'accept': 'application/json',\n   'content-type': 'application/json'\n}\n\nresponse = requests.request(\"GET\", url, headers=headers, data=payload)\n\nprint(response.text)\n"
        }
      ],
      "selectedLanguageId": "dC1tVkxzP36SNWyzdgEtm"
    },
    "results": {
      "languages": [
        {
          "id": "pd9DoVqLaRNI74xOtsquT",
          "language": "200",
          "code": "{\n    \"dbId\": 303880,\n    \"id\": \"7dad2aa5-414a-4b20-86c0-346876ea88b5\",\n    \"name\": \"SSH DG2\",\n    \"description\": null,\n    \"parentGroupId\": null,\n    \"ifaceOperationCheck\": false,\n    \"timeTolerance\": null,\n    \"realms\": [\n        304366,\n        3478516\n    ],\n    \"deviceIds\": [],\n    \"properties\": {\n        \"globalUsername\": \"root\",\n        \"globalSecretKey\": \"test\",\n        \"globalPassword\": \"123\"\n    },\n    \"children\": [],\n    \"devices\": null,\n    \"rootGroupId\": null,\n    \"globalUsername\": \"root\",\n    \"globalPassword\": \"123\",\n    \"showInDeviceTree\": true,\n    \"useAsRoleGroup\": true,\n    \"discoverySources\": null,\n    \"readOnly\": false\n}"
        }
      ],
      "selectedLanguageId": "pd9DoVqLaRNI74xOtsquT"
    }
  },
  "type": "api-oas-v2",
  "children": [
    {
      "text": ""
    }
  ]
}