# listSpaceRoots

Library's roots (files and folders only; Team's templates, forms, contracts and tables: listContentTemplates, listForms, listContractTemplates, listWorkflowTables). The organization's file-system roots you can open: Team (everyone in the org), your own My files (`isMine`, private), and the read-only system folders Goliath writes (Uploads, Downloads, Records). Each `id` is the `spaceId` (the root: My files, Team or a system folder) every other Library operation takes; a root's folder id is null. Start here.

- Call: `POST https://server.goliathdata.com/api/v1/call` with `{ "operationId": "listSpaceRoots", "variables": {...} }`
- Scope: `READ`
- Type: query
- Idempotency: a read; rejects `Idempotency-Key`
- Rate-limited: no

## Variables

None.

## Response (data, an example)

```json
{
  "spacesQuery": {
    "roots": [
      {
        "id": "<ID>",
        "kind": "TEAM",
        "name": "…",
        "isMine": true,
        "viewerRole": "VIEWER",
        "abilities": {
          "addChildren": true
        }
      }
    ]
  }
}
```

## Example

```bash
curl https://server.goliathdata.com/api/v1/call \
  -H "Authorization: Bearer $GOLIATH_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "operationId": "listSpaceRoots",
    "variables": {}
  }'
```
