# 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: 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:

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

The question should be specific, self-contained, and written in natural language.
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.
