# getAutomationMap

Your organization's Automations Map. When there is none, this read draws it from the organization's workflows and AI employees (no agent turn) and saves it; null when there is nothing to draw. `story` (a MapStory: journeys, steps, edges and each step's detail, as JSON), `refStates` (each workflow or AI employee a step stands for, with its state now: on, off or draft, and its setup as label/value `facts`), and `changedSince` (records saved after this version: the Map may be out of date until the Automations chat redraws it). `story` null means the current version cannot be read. `pageId` and `version` are what the version ops take.

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

## Variables

None.

## Response (data, an example)

```json
{
  "automationPagesQuery": {
    "map": {
      "pageId": "<ID>",
      "version": 0,
      "story": "…",
      "refStates": [
        {
          "kind": "…",
          "id": "<ID>",
          "name": "…",
          "state": "…",
          "editing": true,
          "domain": "…",
          "channels": [
            "…"
          ],
          "facts": [
            {
              "label": "…",
              "value": "…"
            }
          ]
        }
      ],
      "changedSince": [
        {
          "kind": "…",
          "id": "<ID>",
          "name": "…",
          "onMap": true,
          "change": "…"
        }
      ]
    }
  }
}
```

## Example

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