---
title: List workspace roles by collaborator
slug: api-guide/list-workspace-roles-by-collaborator
docTags: 
createdAt: 2025-01-10T10:06:08.837Z
---

{
  "id": "eDqk5CkqlD5a2jfdXK1s8",
  "type": "api-oas-v2",
  "data": {
    "method": "GET",
    "url": "https://api.app.kognic.com/v1/workspace-collaborator-roles",
    "servers": [
      {
        "url": "https://api.app.kognic.com/v1/workspace-collaborator-roles"
      }
    ],
    "name": "List workspace roles by collaborator",
    "description": "",
    "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": [
        {
          "kind": "required",
          "name": "workspaceId",
          "type": "string<uuid>",
          "description": "",
          "format": "uuid"
        }
      ],
      "bodyDataParameters": [],
      "formDataParameters": [],
      "oAuthParameters": [],
      "cookieParameters": []
    },
    "responses": [
      {
        "statusCode": "200",
        "description": "",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "",
            "customType": "Enveloped_Seq_WorkspaceRolesForCollaborator",
            "schema": [
              {
                "name": "data",
                "kind": "optional",
                "type": "array",
                "description": "",
                "modelRef": "#/components/schemas/WorkspaceRolesForCollaborator",
                "customType": "WorkspaceRolesForCollaborator[]",
                "schema": [
                  {
                    "name": "organizationId",
                    "kind": "required",
                    "type": "integer<int64>",
                    "description": "",
                    "format": "int64"
                  },
                  {
                    "name": "roles",
                    "kind": "optional",
                    "type": "array",
                    "description": "",
                    "modelRef": "#/components/schemas/WorkspaceRole",
                    "customType": "WorkspaceRole[]",
                    "schema": []
                  }
                ]
              }
            ],
            "modelRef": "#/components/schemas/Enveloped_Seq_WorkspaceRolesForCollaborator",
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "400",
        "description": "Bad request",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "",
            "customType": "BadRequest",
            "schema": [
              {
                "name": "errorCode",
                "kind": "optional",
                "type": "string",
                "description": ""
              },
              {
                "name": "message",
                "kind": "required",
                "type": "string",
                "description": ""
              }
            ],
            "modelRef": "#/components/schemas/BadRequest",
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "401",
        "description": "Unauthorized",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "",
            "customType": "Unauthorized",
            "schema": [
              {
                "name": "message",
                "kind": "required",
                "type": "string",
                "description": ""
              }
            ],
            "modelRef": "#/components/schemas/Unauthorized",
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "403",
        "description": "Forbidden",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "",
            "customType": "Forbidden",
            "schema": [
              {
                "name": "message",
                "kind": "required",
                "type": "string",
                "description": ""
              }
            ],
            "modelRef": "#/components/schemas/Forbidden",
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "404",
        "description": "Not found",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "",
            "customType": "NotFound",
            "schema": [
              {
                "name": "message",
                "kind": "required",
                "type": "string",
                "description": ""
              }
            ],
            "modelRef": "#/components/schemas/NotFound",
            "isExpanded": true
          }
        ]
      }
    ],
    "hasXCodeSamples": false,
    "examples": {
      "languages": [
        {
          "id": "RxFfdKFzVmAcBMIo0sEA7",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"https://api.app.kognic.com/v1/workspace-collaborator-roles?workspaceId=string<uuid>\"\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": "RxFfdKFzVmAcBMIo0sEA7"
    },
    "results": {
      "languages": [
        {
          "id": "32RLH3hSSkNHYm3YUMWo3",
          "language": "200",
          "code": "{\n  \"data\": [\n    {\n      \"organizationId\": \"\",\n      \"roles\": [\n        \"\"\n      ]\n    }\n  ]\n}"
        },
        {
          "id": "Y2eJIcOzr52MsXez3TCk0",
          "language": "400",
          "code": "// Bad request\n{\n  \"errorCode\": \"\",\n  \"message\": \"\"\n}"
        },
        {
          "id": "u8Cm0h7JFTc6BUubKASZA",
          "language": "401",
          "code": "// Unauthorized\n{\n  \"message\": \"\"\n}"
        },
        {
          "id": "2kCsVhT_fzA5WjmH13qUX",
          "language": "403",
          "code": "// Forbidden\n{\n  \"message\": \"\"\n}"
        },
        {
          "id": "fni-Kjp4GNAnLlbTnYAWd",
          "language": "404",
          "code": "// Not found\n{\n  \"message\": \"\"\n}"
        }
      ],
      "selectedLanguageId": "32RLH3hSSkNHYm3YUMWo3"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}