# getSpaceAccessList

A folder or file's `audience` (ORGANIZATION = everyone in the org, OWNER = the owner of My files, RESTRICTED = only people granted access, here or on a parent folder, SYSTEM = everyone, read-only) and the people shared on THIS item directly, with their role. Grants on a parent folder also reach it and are NOT listed: for a full audit, read each ancestor folder's access list too. Needs view access.

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

## Variables

- `itemId`: `ID!` (required)

## Response (data, an example)

```json
{
  "spacesQuery": {
    "accessList": {
      "item": {
        "id": "<ID>",
        "name": "…",
        "accessMode": "INHERIT"
      },
      "audience": "ORGANIZATION",
      "entries": [
        {
          "person": {
            "id": "<ID>",
            "name": "…",
            "email": "…"
          },
          "role": "VIEWER",
          "isOwner": true
        }
      ]
    }
  }
}
```

## Example

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