---
title: List workspaces
slug: api-guide/list-workspaces
docTags: 
createdAt: 2025-01-09T16:51:16.286Z
---

{
  "id": "TMhpzXLyHM4fIciuSIe4Z",
  "type": "api-oas-v2",
  "data": {
    "method": "GET",
    "url": "https://api.app.kognic.com/v2/workspaces",
    "servers": [
      {
        "url": "https://api.app.kognic.com/v2/workspaces"
      }
    ],
    "name": "List workspaces",
    "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": "optional",
          "name": "organizationIds",
          "type": "array",
          "description": "",
          "schema": [],
          "itemType": "integer",
          "customType": "integer[]"
        },
        {
          "kind": "optional",
          "name": "workspaceIds",
          "type": "array",
          "description": "",
          "schema": [],
          "itemType": "string",
          "customType": "string[]"
        },
        {
          "kind": "optional",
          "name": "anyRoleIn",
          "type": "array",
          "description": "",
          "customType": "WorkspaceRole[]",
          "schema": [],
          "modelRef": "#/components/schemas/WorkspaceRole"
        }
      ],
      "bodyDataParameters": [],
      "formDataParameters": [],
      "oAuthParameters": [],
      "cookieParameters": []
    },
    "responses": [
      {
        "statusCode": "200",
        "description": "",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "",
            "customType": "Enveloped_Seq_Workspace",
            "schema": [
              {
                "name": "data",
                "kind": "optional",
                "type": "array",
                "description": "",
                "modelRef": "#/components/schemas/Workspace",
                "customType": "Workspace[]",
                "schema": [
                  {
                    "name": "access",
                    "kind": "required",
                    "type": "object",
                    "description": "",
                    "modelRef": "#/components/schemas/MyWorkspaceAccess",
                    "customType": "MyWorkspaceAccess",
                    "schema": [
                      {
                        "name": "allowedToExploreDatasets",
                        "kind": "required",
                        "type": "boolean",
                        "description": ""
                      },
                      {
                        "name": "allowedToManageCollaborators",
                        "kind": "required",
                        "type": "boolean",
                        "description": ""
                      },
                      {
                        "name": "allowedToManageConfig",
                        "kind": "required",
                        "type": "boolean",
                        "description": ""
                      },
                      {
                        "name": "allowedToManageMembers",
                        "kind": "required",
                        "type": "boolean",
                        "description": ""
                      },
                      {
                        "name": "allowedToManageProjects",
                        "kind": "required",
                        "type": "boolean",
                        "description": ""
                      },
                      {
                        "name": "allowedToOrchestrateData",
                        "kind": "required",
                        "type": "boolean",
                        "description": ""
                      },
                      {
                        "name": "roles",
                        "kind": "optional",
                        "type": "array",
                        "description": "",
                        "modelRef": "#/components/schemas/WorkspaceRole",
                        "customType": "WorkspaceRole[]",
                        "schema": []
                      }
                    ]
                  },
                  {
                    "name": "color",
                    "kind": "required",
                    "type": "string",
                    "description": ""
                  },
                  {
                    "name": "createdAt",
                    "kind": "required",
                    "type": "string<date-time>",
                    "description": "",
                    "format": "date-time"
                  },
                  {
                    "name": "externalId",
                    "kind": "required",
                    "type": "string",
                    "description": ""
                  },
                  {
                    "name": "id",
                    "kind": "required",
                    "type": "string<uuid>",
                    "description": "",
                    "format": "uuid"
                  },
                  {
                    "name": "name",
                    "kind": "required",
                    "type": "string",
                    "description": ""
                  },
                  {
                    "name": "organization",
                    "kind": "required",
                    "type": "object",
                    "description": "",
                    "modelRef": "#/components/schemas/LightOrganization",
                    "customType": "LightOrganization",
                    "schema": [
                      {
                        "name": "id",
                        "kind": "required",
                        "type": "integer<int64>",
                        "description": "",
                        "format": "int64"
                      },
                      {
                        "name": "name",
                        "kind": "required",
                        "type": "string",
                        "description": ""
                      }
                    ]
                  }
                ]
              }
            ],
            "modelRef": "#/components/schemas/Enveloped_Seq_Workspace",
            "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
          }
        ]
      }
    ],
    "hasXCodeSamples": false,
    "examples": {
      "languages": [
        {
          "id": "K4hLz_AeEVY9j9aYOOe5P",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"https://api.app.kognic.com/v2/workspaces\"\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": "K4hLz_AeEVY9j9aYOOe5P"
    },
    "results": {
      "languages": [
        {
          "id": "j8bixR1ebc0oombohtyQY",
          "language": "200",
          "code": "{\n  \"data\": [\n    {\n      \"access\": {\n        \"allowedToExploreDatasets\": false,\n        \"allowedToManageCollaborators\": false,\n        \"allowedToManageConfig\": false,\n        \"allowedToManageMembers\": false,\n        \"allowedToManageProjects\": false,\n        \"allowedToOrchestrateData\": false,\n        \"roles\": [\n          \"\"\n        ]\n      },\n      \"color\": \"\",\n      \"createdAt\": \"\",\n      \"externalId\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"organization\": {\n        \"id\": \"\",\n        \"name\": \"\"\n      }\n    }\n  ]\n}"
        },
        {
          "id": "al8Vs_7Vm7viylwPKUPNX",
          "language": "400",
          "code": "// Bad request\n{\n  \"errorCode\": \"\",\n  \"message\": \"\"\n}"
        },
        {
          "id": "w9F39oi-MReSAX31XTeBN",
          "language": "401",
          "code": "// Unauthorized\n{\n  \"message\": \"\"\n}"
        }
      ],
      "selectedLanguageId": "j8bixR1ebc0oombohtyQY"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}