---
title: Retrieve a Role
slug: retrieve-a-role
docTags: 
createdAt: 2026-04-21T15:22:49.957Z
---

{
  "id": "X8Uh-mLlU1_mFKrVvjc1y",
  "type": "api-oas-v2",
  "data": {
    "method": "GET",
    "url": "https://developer.digitail.io/api/v1/roles/{id}",
    "servers": [
      {
        "url": "https://developer.digitail.io/api/v1/roles/{id}",
        "description": "Sandbox server (uses test data)"
      },
      {
        "url": "https://vet.digitail.io/api/v1/roles/{id}",
        "description": "Production server (uses live data)"
      }
    ],
    "name": "Retrieve a Role",
    "description": "<p>Permissions needed: ACCESS_ADMINISTRATION_SETTINGS\nReturns a Role entity</p>",
    "contentType": "application/json",
    "request": {
      "pathParameters": [],
      "headerParameters": [
        {
          "name": "accept",
          "type": "string",
          "kind": "optional",
          "description": "Generated from available response content types",
          "enum": [
            "application/json"
          ],
          "default": "application/json"
        }
      ],
      "queryParameters": [],
      "bodyDataParameters": [],
      "formDataParameters": [],
      "oAuthParameters": [
        {
          "id": "passport",
          "name": "passport",
          "kind": "optional",
          "type": "oauth2",
          "description": "Laravel passport oauth2 security.",
          "oauth2Flows": {
            "authorizationCode": {
              "authorizationUrl": "https://digitail.test/oauth/authorize",
              "tokenUrl": "https://digitail.test/oauth/token",
              "refreshUrl": "https://digitail.test/oauth/token"
            }
          }
        },
        {
          "id": "Bearer",
          "name": "Bearer",
          "kind": "optional",
          "type": "http",
          "scheme": "bearer"
        }
      ],
      "cookieParameters": []
    },
    "responses": [
      {
        "statusCode": "200",
        "description": "successful operation",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "",
            "schema": [
              {
                "name": "data",
                "kind": "optional",
                "type": "object",
                "description": "",
                "example": "",
                "schema": [
                  {
                    "name": "id",
                    "kind": "optional",
                    "type": "integer",
                    "description": "",
                    "example": 1
                  },
                  {
                    "name": "clinic_id",
                    "kind": "optional",
                    "type": "integer",
                    "nullable": true,
                    "description": "<p>The clinic this role belongs to. Null for enterprise (group-level) roles.</p>",
                    "example": 1
                  },
                  {
                    "name": "group_id",
                    "kind": "optional",
                    "type": "integer",
                    "nullable": true,
                    "description": "<p>The enterprise group this role belongs to. Null for clinic-local roles.</p>",
                    "example": ""
                  },
                  {
                    "name": "title",
                    "kind": "optional",
                    "type": "string",
                    "description": "",
                    "example": "Doctor"
                  },
                  {
                    "name": "immutable",
                    "kind": "optional",
                    "type": "boolean",
                    "description": "",
                    "example": false
                  },
                  {
                    "name": "permissions_categories",
                    "kind": "optional",
                    "type": "map",
                    "description": "Keys are permissions groups ids.",
                    "example": "",
                    "customType": "map<string, object[]>",
                    "schema": []
                  }
                ]
              }
            ],
            "isExpanded": true
          }
        ]
      }
    ],
    "hasXCodeSamples": false,
    "examples": {
      "languages": [
        {
          "id": "5GE6q3F_H1IQ5SiyUdm6h",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request GET \\\n     --url https://developer.digitail.io/api/v1/roles/{id} \\\n     --header 'accept: application/json'"
        },
        {
          "id": "AICIVcrInDLAWRSU-Tcyz",
          "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(\"https://developer.digitail.io/api/v1/roles/{id}\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "5IaA4cXi13ep-POabkGUd",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"https://developer.digitail.io/api/v1/roles/{id}\")\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\"\n\nresponse = https.request(request)\nputs response.read_body\n"
        },
        {
          "id": "aTYaE9P5qsxUbM42TXWh9",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"https://developer.digitail.io/api/v1/roles/{id}\"\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": "5GE6q3F_H1IQ5SiyUdm6h"
    },
    "results": {
      "languages": [
        {
          "id": "kE4EoM0XkaPDIntLeB61i",
          "language": "200",
          "code": "// successful operation\n{\n  \"data\": {\n    \"id\": 1,\n    \"clinic_id\": 1,\n    \"group_id\": 0,\n    \"title\": \"Doctor\",\n    \"immutable\": false,\n    \"permissions_categories\": \"\"\n  }\n}"
        }
      ],
      "selectedLanguageId": "kE4EoM0XkaPDIntLeB61i"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}