---
title: Get Entity Permissions
slug: feature-experimentation/api/get-entity-permissions
docTags: 
createdAt: 2026-08-28T15:54:06.731Z
---

{
  "id": "VQNwtzuVTBHp8vFUWze0y",
  "type": "api-oas-v2",
  "data": {
    "method": "GET",
    "url": "https://api.optimizely.com/permissions/projects/{project_id}/{entity_type}/{entity_id}",
    "servers": [
      {
        "url": "https://api.optimizely.com/permissions/projects/{project_id}/{entity_type}/{entity_id}"
      }
    ],
    "name": "Get Entity Permissions",
    "description": "",
    "contentType": "application/json",
    "request": {
      "pathParameters": [
        {
          "kind": "required",
          "name": "project_id",
          "type": "integer",
          "description": ""
        },
        {
          "kind": "required",
          "name": "entity_type",
          "type": "object",
          "description": "",
          "customType": "EntityTypeInPath",
          "schema": [],
          "modelRef": "#/components/schemas/EntityTypeInPath"
        },
        {
          "kind": "required",
          "name": "entity_id",
          "type": "string",
          "description": ""
        }
      ],
      "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": "BearerAuth",
          "name": "BearerAuth",
          "kind": "optional",
          "type": "http",
          "description": "<p>To get an API token, see <a href=\"https://docs.developers.optimizely.com/web/docs/personal-token\" target=\"_blank\">https://docs.developers.optimizely.com/web/docs/personal-token</a></p>",
          "scheme": "bearer"
        }
      ],
      "cookieParameters": []
    },
    "responses": [
      {
        "statusCode": "200",
        "description": "Successful Response",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "",
            "customType": "EntityPermissionsResponse",
            "schema": [
              {
                "name": "users",
                "kind": "required",
                "type": "array",
                "description": "",
                "modelRef": "#/components/schemas/UserPermission",
                "customType": "UserPermission[]",
                "schema": [
                  {
                    "name": "role",
                    "kind": "required",
                    "type": "string",
                    "description": "",
                    "modelRef": "#/components/schemas/EntityPermission",
                    "customType": "EntityPermission",
                    "schema": []
                  },
                  {
                    "name": "role_inherited",
                    "kind": "required",
                    "type": "string",
                    "description": "",
                    "modelRef": "#/components/schemas/EntityPermission",
                    "customType": "EntityPermission",
                    "schema": []
                  },
                  {
                    "name": "first_name",
                    "kind": "required",
                    "type": "object",
                    "description": "",
                    "complexType": "anyOf",
                    "complexItems": [],
                    "schema": []
                  },
                  {
                    "name": "last_name",
                    "kind": "required",
                    "type": "object",
                    "description": "",
                    "complexType": "anyOf",
                    "complexItems": [],
                    "schema": []
                  },
                  {
                    "name": "user_id",
                    "kind": "required",
                    "type": "string",
                    "description": ""
                  },
                  {
                    "name": "email",
                    "kind": "required",
                    "type": "string<email>",
                    "description": "",
                    "format": "email"
                  }
                ]
              },
              {
                "name": "teams",
                "kind": "required",
                "type": "array",
                "description": "",
                "modelRef": "#/components/schemas/TeamPermission",
                "customType": "TeamPermission[]",
                "schema": [
                  {
                    "name": "team_id",
                    "kind": "required",
                    "type": "string",
                    "description": ""
                  },
                  {
                    "name": "name",
                    "kind": "required",
                    "type": "string",
                    "description": ""
                  },
                  {
                    "name": "role",
                    "kind": "required",
                    "type": "string",
                    "description": ""
                  },
                  {
                    "name": "external_ref",
                    "kind": "required",
                    "type": "object",
                    "description": "",
                    "complexType": "anyOf",
                    "complexItems": [],
                    "schema": []
                  }
                ]
              }
            ],
            "modelRef": "#/components/schemas/EntityPermissionsResponse",
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "422",
        "description": "Validation Error",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "",
            "customType": "HTTPValidationError",
            "schema": [
              {
                "name": "detail",
                "kind": "optional",
                "type": "array",
                "description": "",
                "modelRef": "#/components/schemas/ValidationError",
                "customType": "ValidationError[]",
                "schema": [
                  {
                    "name": "loc",
                    "kind": "required",
                    "type": "array",
                    "description": "",
                    "example": "",
                    "itemType": "object",
                    "customType": "object[]",
                    "itemExample": "",
                    "itemDefault": ""
                  },
                  {
                    "name": "msg",
                    "kind": "required",
                    "type": "string",
                    "description": ""
                  },
                  {
                    "name": "type",
                    "kind": "required",
                    "type": "string",
                    "description": ""
                  }
                ]
              }
            ],
            "modelRef": "#/components/schemas/HTTPValidationError",
            "isExpanded": true
          }
        ]
      }
    ],
    "hasXCodeSamples": false,
    "examples": {
      "languages": [
        {
          "id": "pmwiaS3OE5mSHWqtf1Tz4",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request GET \\\n     --url https://api.optimizely.com/permissions/projects/{project_id}/{entity_type}/{entity_id} \\\n     --header 'accept: application/json'"
        },
        {
          "id": "aIs0iFh60q-bKPBm7zHsz",
          "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://api.optimizely.com/permissions/projects/{project_id}/{entity_type}/{entity_id}\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "m9HdIsO5N7BVgSGsSKkdc",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"https://api.optimizely.com/permissions/projects/{project_id}/{entity_type}/{entity_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": "e4xc1iP2lvMiTVjvM_OiJ",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"https://api.optimizely.com/permissions/projects/{project_id}/{entity_type}/{entity_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": "pmwiaS3OE5mSHWqtf1Tz4"
    },
    "results": {
      "languages": [
        {
          "id": "response-0-200",
          "language": "200",
          "code": "// Successful Response\n{\n  \"users\": [\n    {\n      \"role\": \"\",\n      \"role_inherited\": \"\",\n      \"first_name\": {},\n      \"last_name\": {},\n      \"user_id\": \"\",\n      \"email\": \"\"\n    }\n  ],\n  \"teams\": [\n    {\n      \"team_id\": \"\",\n      \"name\": \"\",\n      \"role\": \"\",\n      \"external_ref\": {}\n    }\n  ]\n}"
        },
        {
          "id": "response-1-422",
          "language": "422",
          "code": "// Validation Error\n{\n  \"detail\": [\n    {\n      \"loc\": [\n        {}\n      ],\n      \"msg\": \"\",\n      \"type\": \"\"\n    }\n  ]\n}"
        }
      ],
      "selectedLanguageId": "response-0-200"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}