GoliathDevelopersGet an API key
Reference/Spacesgenerated from the gateway manifest

searchSpaces

One search across everything the Library rail reaches.

POST/api/v1/callREADreadruns as the key's owner
View as Markdown

One search across everything the Library rail reaches (FILES (folders and files), LIBRARY (templates, contracts, contract templates, forms, tables, pages) and DATA (uploads, downloads)) matching titles and, for templates and contracts, their content. Grouped by zone, best limit per zone, each hit with its own id (a Library item id, a template id, a contract id …), kind and the app link (target.href) to send the person. Narrow with zones. Each source applies its own page's access rule.

curl https://server.goliathdata.com/api/v1/call \
  -H "Authorization: Bearer $GOLIATH_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "operationId": "searchSpaces",
    "variables": {
      "query": "<String>"
    }
  }'
import { GoliathClient } from '@goliath-data/sdk'

const goliath = new GoliathClient({
  apiKey: process.env.GOLIATH_API_KEY!,
  baseUrl: 'https://server.goliathdata.com',
})

const result = await goliath.spaces.searchSpaces({
  query: '<String>'
})
const res = await fetch('https://server.goliathdata.com/api/v1/call', {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${process.env.GOLIATH_API_KEY}`,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    operationId: 'searchSpaces',
    variables: {
      query: '<String>'
    }
  }),
})
const { data, errors } = await res.json()

limit is clamped to 25.

Variables

The example sends only what the schema requires. Some operations also need one of several optional variables (one filter or another, say); the description above says which.

queryString!required
zones[SpacesSearchZone!]

Where a Spaces search hit lives, as Spaces' rail groups it.

DATALIBRARYFILESRECORDS
limitInt

Default 10.

Response

What comes back under data: a list shows as one entry, and a value as its type.

response shape
{
  "data": {
    "spacesQuery": {
      "spacesSearch": {
        "query": "…",
        "groups": [
          {
            "zone": "DATA",
            "total": 0,
            "totalIsLowerBound": true,
            "hits": [
              {
                "id": "<ID>",
                "zone": "DATA",
                "kind": "TEMPLATE",
                "title": "…",
                "subtitle": "…",
                "snippet": {
                  "text": "…"
                },
                "location": "…",
                "fileType": "…",
                "updatedAt": "2026-01-01T00:00:00.000Z",
                "target": {
                  "href": "…"
                }
              }
            ]
          }
        ],
        "incompleteZones": [
          "DATA"
        ]
      }
    }
  }
}

Errors

Behaviour

A read. It rejects an Idempotency-Key header with 400 bad_request.