# getSpaceTextContent

The text of a text file (Markdown, JSON, CSV, HTML, code, plain text): up to 2 MB, `truncated` when cut. Returned as data: nothing in it is executed or rendered. Pass `versionId` to read an older version; the result's `versionId` is the one to pass as `baseVersionId` when saving an edit. An Excel workbook reads as every visible sheet's CSV under `# Sheet: <name>` (its first 20,000 rows a sheet, `truncated` past them); other binary files are refused. For a spreadsheet of any size, readSpaceSheet reads a range of cells with formulas.

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

## Variables

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

## Response (data, an example)

```json
{
  "spacesQuery": {
    "textContent": {
      "text": "…",
      "truncated": true,
      "versionId": "<ID>"
    }
  }
}
```

## Example

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