# List mounts

List your workspace's mounts, one page at a time, optionally only those of one scope, group, or user.

`GET https://api.smallworld.sh/api/v1/mounts`

## Parameters

| Name | Location | Type | Required | Description |
| --- | --- | --- | --- | --- |
| scope | query | string | No | Only mounts with this scope: global, group, or user. |
| groupId | query | string | No | Only the mounts of this group, by your application's group ID. |
| userId | query | string | No | Only the user mounts of this user, by your application's user ID. To see every mount a user gets, including global and group mounts, use GET /users/:userId/mounts. |
| cursor | query | string | No | The opaque nextCursor from a previous page of this same resource and workspace. Omit for the first page. |
| limit | query | integer | No | Number of items to return, from 1 to 100. Defaults to 50. |

## Request examples

### curl

```curl
curl --fail-with-body -X GET 'https://api.smallworld.sh/api/v1/mounts?scope=group&groupId=team_42&limit=50' \
  -H "Authorization: Bearer $SMALLWORLD_API_KEY"
```

### typescript

```typescript
const response = await fetch("https://api.smallworld.sh/api/v1/mounts?scope=group&groupId=team_42&limit=50", {
  method: "GET",
  headers: { Authorization: `Bearer ${apiKey}` },
});
if (!response.ok) throw new Error(`HTTP ${response.status}: ${await response.text()}`);
const result = await response.json();
```

### python

```python
response = requests.get(
    "https://api.smallworld.sh/api/v1/mounts?scope=group&groupId=team_42&limit=50",
    headers={"Authorization": f"Bearer {api_key}"},
    timeout=30,
)
response.raise_for_status()
result = response.json()
```

## Responses

Returns items and nextCursor. Returns id, path, scope (global, group, or user), groupId (your group ID, for a group mount), userId (your user ID, for a user mount), nullable description, settings with create, update, delete, move, and rename (each allow, ask, or deny), fileCount (files, not folders), totalBytes, and ISO 8601 createdAt and updatedAt timestamps. groupId and userId are null when they don't apply. nextCursor is null on the final page.

### 200

Returns items and nextCursor. Returns id, path, scope (global, group, or user), groupId (your group ID, for a group mount), userId (your user ID, for a user mount), nullable description, settings with create, update, delete, move, and rename (each allow, ask, or deny), fileCount (files, not folders), totalBytes, and ISO 8601 createdAt and updatedAt timestamps. groupId and userId are null when they don't apply. nextCursor is null on the final page.

```json
{
  "items": [
    {
      "id": "0199a1c4-5b6e-7a10-9c2d-3e4f5a6b7c8d",
      "path": "/workspace/docs",
      "scope": "group",
      "groupId": "team_42",
      "userId": null,
      "description": "Product documentation. Answers to customer questions go in faq.md.",
      "settings": {
        "create": "allow",
        "update": "ask",
        "delete": "ask",
        "move": "ask",
        "rename": "ask"
      },
      "fileCount": 2,
      "totalBytes": 91,
      "createdAt": "2026-10-10T12:00:00.000Z",
      "updatedAt": "2026-10-10T12:00:00.000Z"
    }
  ],
  "nextCursor": null
}
```

### 400

invalid_request: A query parameter is invalid, such as an unknown scope, a limit above 100, or a cursor from another list; the message names the problem. Unknown query parameters are rejected.

#### invalid_request

A query parameter is invalid, such as an unknown scope, a limit above 100, or a cursor from another list; the message names the problem. Unknown query parameters are rejected.

```json
{
  "statusCode": 400,
  "code": "invalid_request",
  "message": "scope must be global, group, or user"
}
```

### 401

authentication_required: The Authorization header is missing or empty. invalid_api_key: The API key is invalid or revoked, or the header doesn't use the Bearer scheme.

#### authentication_required

The Authorization header is missing or empty.

```json
{
  "statusCode": 401,
  "code": "authentication_required",
  "message": "Authentication is required"
}
```

#### invalid_api_key

The API key is invalid or revoked, or the header doesn't use the Bearer scheme.

```json
{
  "statusCode": 401,
  "code": "invalid_api_key",
  "message": "The API key is invalid or revoked"
}
```

### 403

ip_not_allowed: The request came from an address outside the workspace's IP allowlist.

#### ip_not_allowed

The request came from an address outside the workspace's IP allowlist.

```json
{
  "statusCode": 403,
  "code": "ip_not_allowed",
  "message": "The source IP address is not allowed by this account's security settings"
}
```

### 404

group_not_found: No group in your workspace has this groupId. user_not_found: No user in your workspace has this userId.

#### group_not_found

No group in your workspace has this groupId.

```json
{
  "statusCode": 404,
  "code": "group_not_found",
  "message": "Group not found"
}
```

#### user_not_found

No user in your workspace has this userId.

```json
{
  "statusCode": 404,
  "code": "user_not_found",
  "message": "User not found"
}
```

### 500

internal_error: An unexpected server error.

#### internal_error

An unexpected server error.

```json
{
  "statusCode": 500,
  "code": "internal_error",
  "message": "Internal server error"
}
```

## Notes

- A cursor works only for the list and workspace that returned it.

- An unknown groupId or userId returns 404 instead of an empty list.
