AlmondTill/G3N API

createFeedSubscription

mutation · in the family System and integration setup

What it does

Register a scheduled BI feed — a file of one record kind (customers, products, vendors, orders, or the catalog) lands on your export shelf on a cadence.

Register a scheduled BI feed: owner-gated engine-side (the caller's Account must hold group ownership live); organizationId must be an in-group live Organization; dataset/cadence/format are canned vocabularies; at most 10 active feeds per group. Template class (integration config — hand-derived v74).

Before you call

A signed-in user’s session — the call refuses an API key (AUTHZ/FORBIDDEN).

Capability area: System and integration setup — Registers, connections and the settings your systems run on.

Roles that may call it:

What happens

Runs start within the hour and then follow the cadence; your BI tool pulls each file with a short-lived download link.

Careful

OWNER-gated — feeds move data OUT of the platform. One organization per feed; at most 10 active feeds per group; repeated failed runs auto-suspend the feed.

Arguments

NameTypeRequiredNotes
inputCreateFeedSubscriptionInput CreateFeedSubscriptionInput!yesCreate-input for createFeedSubscription.

Returns

FeedSubscription FeedSubscription! — Delivery is pull only v1: list runs via feedSubscriptionRuns, then mint a short-lived presigned download with mintFeedRunDownload — the BI tool authenticates as its OWN ApiKey session and there are zero stored credentials (the presigned ticket IS the custody; a push feed-ready event is a named growth). The per-org weld: organizationId names the ONE exported org (in-group live-gated); org-parented dataset rows filter to it, group-parented catalog masters (Style/Product) export whole — the shared catalog IS each org's catalog. Group-parented (parentId === rootId); born active with nextDueAt = the birth instant (the next hourly tick runs it); at most 10 active feeds per group (the webhook cap class); 5 consecutive failed runs fire the automatic active → suspended flip; reactivate serves both inactive → active and suspended → active (fix the feed via update, then reactivate; no catch-up runs — the next run is the next cadence step). Runs prune to the newest 8 per feed (bounded custody). Owner-gated end to end (the mintApiKey posture — data-OUT is exfiltration-adjacent); NOT searchable (integration config — reached via the owner-gated list).

Example request

graphql
mutation ExampleCreateFeedSubscription($input: CreateFeedSubscriptionInput!) {
  createFeedSubscription(input: $input) {
    id
    sysId
    type
    caption
    status
    parentId
    rootId
    createdAt
    updatedAt
    revisionNum
    revision
    organizationId
    dataset
    cadence
    format
    nextDueAt
    lastRunAt
    lastRunKey
    consecutiveFailures
    lastFailureAt
    lastFailureCode
    suspendedAt
  }
}

Variables:

json
{
  "input": {
    "caption": "Blue jeans",
    "organizationId": "01900000-0000-7000-8000-1971e30a0000",
    "dataset": "<dataset>",
    "cadence": "<cadence>",
    "format": "<format>"
  }
}

Send it with the envelope naming the version: "extensions": {"at": {"version": {"name":"genesis","number":0}}}.

Example response

json
{
  "data": {
    "createFeedSubscription": {
      "id": "01900000-0000-7000-8000-d955d7340000",
      "sysId": "FD-EXMP-0000-000F",
      "type": "FeedSubscription",
      "caption": "Blue jeans",
      "status": "active",
      "parentId": "01900000-0000-7000-8000-eacdfcfd0000",
      "rootId": "01900000-0000-7000-8000-a1295a650000",
      "createdAt": "2027-01-31T00:00:00.000Z",
      "updatedAt": "2027-01-31T00:00:00.000Z",
      "revisionNum": 0,
      "revision": "01900000-0000-7000-8000-53c6eea90000",
      "organizationId": "01900000-0000-7000-8000-1971e30a0000",
      "dataset": "<dataset>",
      "cadence": "<cadence>",
      "format": "<format>",
      "nextDueAt": "2027-01-31T00:00:00.000Z",
      "lastRunAt": "2027-01-31T00:00:00.000Z",
      "lastRunKey": "<last run key>",
      "consecutiveFailures": 1,
      "lastFailureAt": "2027-01-31T00:00:00.000Z",
      "lastFailureCode": "BJ-001",
      "suspendedAt": "2027-01-31T00:00:00.000Z"
    }
  },
  "extensions": {
    "at": {
      "callId": "01EXAMPLE-CALL-ID",
      "version": {
        "requested": {
          "name": "genesis",
          "number": 0
        },
        "serviced": {
          "name": "genesis",
          "number": 0
        }
      }
    }
  }
}

Errors this call can answer

Used in