---
title: List workspaces
slug: mihai-tests/list-workspaces
createdAt: 2025-01-22T07:25:18.837Z
---

{
  "id": "yTpAhF_tmw6f3iQiKw3Np",
  "type": "api-oas-v2",
  "data": {
    "method": "GET",
    "url": "/v1/workspaces",
    "servers": [],
    "name": "List workspaces",
    "description": "",
    "contentType": "application/json",
    "request": {
      "pathParameters": [],
      "headerParameters": [],
      "queryParameters": [
        {
          "kind": "optional",
          "name": "organizationIds",
          "type": "array",
          "description": "",
          "schema": [],
          "itemType": "integer",
          "customType": "integer[]"
        },
        {
          "kind": "optional",
          "name": "anyRoleIn",
          "type": "array",
          "description": "",
          "customType": "WorkspaceRoleDto[]",
          "schema": [],
          "modelRef": "#/components/schemas/WorkspaceRoleDto"
        }
      ],
      "bodyDataParameters": [],
      "formDataParameters": [],
      "oAuthParameters": []
    },
    "responses": [
      {
        "statusCode": "200",
        "description": "",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "",
            "customType": "Enveloped_Seq_WorkspaceDto",
            "schema": [
              {
                "name": "data",
                "kind": "optional",
                "type": "array",
                "description": "",
                "modelRef": "#/components/schemas/WorkspaceDto",
                "customType": "WorkspaceDto[]",
                "schema": [
                  {
                    "name": "access",
                    "kind": "required",
                    "type": "object",
                    "description": "",
                    "modelRef": "#/components/schemas/MyWorkspaceAccessDto",
                    "customType": "MyWorkspaceAccessDto",
                    "schema": [
                      {
                        "name": "allowedToManageCollaborators",
                        "kind": "required",
                        "type": "boolean",
                        "example": ""
                      },
                      {
                        "name": "allowedToManageConfig",
                        "kind": "required",
                        "type": "boolean",
                        "example": ""
                      },
                      {
                        "name": "allowedToManageMembers",
                        "kind": "required",
                        "type": "boolean",
                        "example": ""
                      },
                      {
                        "name": "roles",
                        "kind": "optional",
                        "type": "array",
                        "description": "",
                        "modelRef": "#/components/schemas/WorkspaceRoleDto",
                        "customType": "WorkspaceRoleDto[]",
                        "schema": []
                      }
                    ]
                  },
                  {
                    "name": "color",
                    "kind": "required",
                    "type": "string",
                    "example": ""
                  },
                  {
                    "name": "created",
                    "kind": "required",
                    "type": "string<date-time>",
                    "example": ""
                  },
                  {
                    "name": "externalId",
                    "kind": "required",
                    "type": "string",
                    "example": ""
                  },
                  {
                    "name": "id",
                    "kind": "required",
                    "type": "string<uuid>",
                    "example": ""
                  },
                  {
                    "name": "name",
                    "kind": "required",
                    "type": "string",
                    "example": ""
                  },
                  {
                    "name": "organization",
                    "kind": "required",
                    "type": "object",
                    "description": "",
                    "modelRef": "#/components/schemas/OrganizationDto",
                    "customType": "OrganizationDto",
                    "schema": [
                      {
                        "name": "id",
                        "kind": "required",
                        "type": "integer<int64>",
                        "example": 0
                      },
                      {
                        "name": "name",
                        "kind": "required",
                        "type": "string",
                        "example": ""
                      }
                    ]
                  }
                ]
              }
            ],
            "modelRef": "#/components/schemas/Enveloped_Seq_WorkspaceDto",
            "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",
                "example": ""
              },
              {
                "name": "message",
                "kind": "required",
                "type": "string",
                "example": ""
              }
            ],
            "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",
                "example": ""
              }
            ],
            "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",
                "example": ""
              }
            ],
            "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",
                "example": ""
              }
            ],
            "modelRef": "#/components/schemas/NotFound",
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "413",
        "description": "Payload too large",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "",
            "customType": "PayloadTooLarge",
            "schema": [
              {
                "name": "message",
                "kind": "required",
                "type": "string",
                "example": ""
              }
            ],
            "modelRef": "#/components/schemas/PayloadTooLarge",
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "500",
        "description": "Internal server error",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "",
            "customType": "InternalServerError",
            "schema": [
              {
                "name": "message",
                "kind": "required",
                "type": "string",
                "example": ""
              }
            ],
            "modelRef": "#/components/schemas/InternalServerError",
            "isExpanded": true
          }
        ]
      }
    ],
    "hasXCodeSamples": false,
    "examples": {
      "languages": [
        {
          "id": "example-0-curl",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request GET \\\n     --url /v1/workspaces \\\n     --header 'accept: application/json'"
        },
        {
          "id": "example-1-javascript",
          "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(\"/v1/workspaces\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "example-2-ruby",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"/v1/workspaces\")\n\nhttp = Net::HTTP.new(url.host, url.port);\nrequest = Net::HTTP::Get.new(url)\nrequest[\"accept\"] = \"application/json\"\nrequest[\"content-type\"] = \"application/json\"\n\nresponse = http.request(request)\nputs response.read_body\n"
        },
        {
          "id": "example-3-python",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"/v1/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": "example-0-curl"
    },
    "results": {
      "languages": [
        {
          "id": "response-0-200",
          "language": "200",
          "code": "{\n  \"data\": [\n    {\n      \"access\": {\n        \"allowedToManageCollaborators\": false,\n        \"allowedToManageConfig\": false,\n        \"allowedToManageMembers\": false,\n        \"roles\": [\n          \"\"\n        ]\n      },\n      \"color\": \"\",\n      \"created\": \"\",\n      \"externalId\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"organization\": {\n        \"id\": \"\",\n        \"name\": \"\"\n      }\n    }\n  ]\n}"
        },
        {
          "id": "response-1-400",
          "language": "400",
          "code": "// Bad request\n{\n  \"errorCode\": \"\",\n  \"message\": \"\"\n}"
        },
        {
          "id": "response-2-401",
          "language": "401",
          "code": "// Unauthorized\n{\n  \"message\": \"\"\n}"
        },
        {
          "id": "response-3-403",
          "language": "403",
          "code": "// Forbidden\n{\n  \"message\": \"\"\n}"
        },
        {
          "id": "response-4-404",
          "language": "404",
          "code": "// Not found\n{\n  \"message\": \"\"\n}"
        },
        {
          "id": "response-5-413",
          "language": "413",
          "code": "// Payload too large\n{\n  \"message\": \"\"\n}"
        },
        {
          "id": "response-6-500",
          "language": "500",
          "code": "// Internal server error\n{\n  \"message\": \"\"\n}"
        }
      ],
      "selectedLanguageId": "response-0-200"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}