> For the complete documentation index, see [llms.txt](https://docs.paradime.io/app-help/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.paradime.io/app-help/developers/graphql-api/examples/workspace-management-api.md).

# Workspace Management API

## Overview

{% hint style="info" %}

* This feature is available with the [**Paradime Enterprise pack**](https://www.paradime.io/enterprise).
* Your API keys ***must*** have either [User Management Admin or User Metadata Viewer capabilities](/app-help/developers/generate-api-keys.md).
  {% endhint %}

The Workspace Management API enables you to view workspace metadata for your Paradime accounts.

## List Workspaces <a href="#list-workspaces" id="list-workspaces"></a>

This endpoint will return details on the current active workspaces in your Paradime Account.

**Example Request**

{% tabs %}
{% tab title="GraphQL" %}

```python
import requests
import os

# API credentials
api_endpoint = "<YOUR_API_ENDPOINT>"
api_key = "<YOUR_API_KEY>"
api_secret = "<YOUR_API_SECRET>"

graphql_query = """
query ListWorkspaces {
    listWorkspaces {
        ok
        workspaces {
            name
            uid
        }
    }
}
  """
  
response = requests.post(api_endpoint, json={"query": graphql_query}, headers={
      "Content-Type": "application/json",
      "X-API-KEY": api_key,
      "X-API-SECRET": api_secret,
  })

print(response.json())
```

{% endtab %}

{% tab title="cURL" %}

```bash
curl -X POST "<YOUR_API_ENDPOINT>" \
     -H "Content-Type: application/json" \
     -H "X-API-KEY: <YOUR_API_KEY>" \
     -H "X-API-SECRET: <YOUR_API_SECRET>" \
     -d '{
       "query": "query ListWorkspaces { listWorkspaces { ok workspaces { name uid } } }"
     }'
```

{% endtab %}
{% endtabs %}

<details>

<summary><strong>Example response</strong></summary>

```json
{
  "data": {
    "listWorkspaces": {
      "ok": true,
      "workspaces": [
        {
          "name": "data-platoform",
          "uid": "r233tak125coyphm"
        },
        {
          "name": "finance",
          "uid": "vxs6x31394cqk2vd"
        },
        {
          "name": "sales",
          "uid": "fuqge1jaj1122i5k"
        }
      ]
    }
  }
}
```

</details>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.paradime.io/app-help/developers/graphql-api/examples/workspace-management-api.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
