---
title: List Vault Groups
slug: kronpam-api-collection-350/list-vault-groups
docTags: 
createdAt: 2024-07-22T09:58:47.223Z
---

{
  "id": "J0kyDM8rUSbn0FvXKZQxf",
  "type": "api-oas-v2",
  "data": {
    "method": "GET",
    "url": "{{url}}/aioc-rest-web/rest/sc/sapm/listSapmGroups",
    "name": "",
    "description": "This method returns all Vault groups that authenticated user is allowed to see. ",
    "contentType": "application/json",
    "request": {
      "headerParameters": [
        {
          "name": "X-XSRF-TOKEN",
          "description": "",
          "default": "{{csrftoken}}",
          "value": "{{csrftoken}}",
          "type": "string"
        }
      ],
      "queryParameters": [],
      "pathParameters": [
        {
          "name": "url",
          "description": "",
          "default": "url",
          "value": "url",
          "type": "string"
        }
      ],
      "bodyDataParameters": [],
      "formDataParameters": [],
      "oAuthParameters": []
    },
    "responses": [
      {
        "statusCode": "200",
        "description": "Get Vault Groups",
        "jsonExample": "[\n    {\n        \"dbId\": 9257,\n        \"id\": \"9bcb8c02-ec4b-4ad4-8825-c071c9eac8d1\",\n        \"name\": \"test group\",\n        \"description\": null,\n        \"parentSapmGroupId\": null,\n        \"userCreate\": \"admin\",\n        \"userPermissionLevel\": 3,\n        \"approvalStatus\": null,\n        \"fullPath\": \"/test group\"\n    }\n]"
      }
    ],
    "examples": {
      "languages": [
        {
          "id": "Srt61uuqVFjOJWBqzwI5d",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request GET \\\n     --url {{url}}/aioc-rest-web/rest/sc/sapm/listSapmGroups \\\n     --header 'accept: application/json' \\\n     --header 'x-xsrf-token: {{csrftoken}}'"
        },
        {
          "id": "ahoGaEzPGcSWgH72Qn6hj",
          "language": "javascript",
          "label": "javascript",
          "code": "var myHeaders = new Headers();\nmyHeaders.append(\"accept\", \"application/json\");\nmyHeaders.append(\"content-type\", \"application/json\");\nmyHeaders.append(\"x-xsrf-token\", \"{{csrftoken}}\");\n\nvar requestOptions = {\n   method: 'GET',\n   headers: myHeaders,\n   redirect: 'follow'\n};\n\nfetch(\"{{url}}/aioc-rest-web/rest/sc/sapm/listSapmGroups\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "xKLLqfAvalQVSildX7j50",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"{{url}}/aioc-rest-web/rest/sc/sapm/listSapmGroups\")\n\nhttp = Net::HTTP.new(url.host, url.port);\nrequest = Net::HTTP::Get.new(url)\nrequest[\"accept\"] = \"application/json\"\nrequest[\"content-type\"] = \"application/json\"\nrequest[\"x-xsrf-token\"] = \"{{csrftoken}}\"\n\nresponse = http.request(request)\nputs response.read_body\n"
        },
        {
          "id": "hHIIFbR2QDAiehG7e4xwY",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"{{url}}/aioc-rest-web/rest/sc/sapm/listSapmGroups\"\n\npayload = {}\nheaders = {\n   'accept': 'application/json',\n   'content-type': 'application/json',\n   'x-xsrf-token': '{{csrftoken}}'\n}\n\nresponse = requests.request(\"GET\", url, headers=headers, data=payload)\n\nprint(response.text)\n"
        }
      ],
      "selectedLanguageId": "Srt61uuqVFjOJWBqzwI5d"
    },
    "results": {
      "languages": [
        {
          "id": "DY8RWMrhufgTPfcNjvNHd",
          "language": "200",
          "code": "[\n    {\n        \"dbId\": 9257,\n        \"id\": \"9bcb8c02-ec4b-4ad4-8825-c071c9eac8d1\",\n        \"name\": \"test group\",\n        \"description\": null,\n        \"parentSapmGroupId\": null,\n        \"userCreate\": \"admin\",\n        \"userPermissionLevel\": 3,\n        \"approvalStatus\": null,\n        \"fullPath\": \"/test group\"\n    }\n]"
        }
      ],
      "selectedLanguageId": "DY8RWMrhufgTPfcNjvNHd"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}