Topolo Docs Topolo Platform
Open workspace

Record Feed source fetch attempt

Fetch a registered workspace HTTPS source without redirects, consume at most 1,048,576 response bytes, discard the body and persist its terminal attempt. HTTP 200 may contain a failed sync; no content is imported.

Outcome

Fetch a registered workspace HTTPS source without redirects, consume at most 1,048,576 response bytes, discard the body and persist its terminal attempt. HTTP 200 may contain a failed sync; no content is imported.

Before you start

  • Verify the authenticated identity, exact environment and pinned approved organization context before preparing an action.
  • Development stores content without encryption and uses scoped SHA-256 identifier hashes. Staging and production require envelope encryption and a provisioned application root; missing custody does not permit plaintext.
  • The published application permission is feed:write. Discover a granted Feed workspace and bind that exact resource. Supplied identifiers and query selectors do not grant access.
  • Authorize the documented mirror, security, external-fetch, reporting, privacy or archival effects before CLI --confirm or MCP confirm:true. A GET request can initialize a local mirror.

Discover the target

topolo whoami --json
topolo actions get app_topolo_feed.sources.sync --detail --json
topolo resources topolo-feed --json
topolo workspaces list topolo-feed --json
  • Select the exact granted workspace id as FEED_WORKSPACE_ID. Fixture ids authorize no live operation.
  • Read sources.list in that granted workspace and select its source id.

Request

POST /api/analytics/sources/{sourceId}/sync

Save action input as payload.json. Inspect the plan for the exact path, query and body. Set FEED_WORKSPACE_ID from granted resource discovery.

Inspect and test this action in the signed action console, then perform the verification below.

Input fields

FieldRequiredTypeConstraints
sourceIdRequiredstringExact source identifier returned by sources.list or sources.create in the same granted workspace.; {"minLength":1}

Exact input schema:

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "sourceId": {
      "type": "string",
      "minLength": 1,
      "description": "Exact source identifier returned by sources.list or sources.create in the same granted workspace."
    }
  },
  "required": [
    "sourceId"
  ],
  "additionalProperties": false
}

Effects

  • Resolves the workspace through platform grants and can insert its identity-only local mirror before the route permission check. GET is therefore a mutation for action planning; it does not create a canonical workspace or change its name.
  • Requires a source in the granted workspace. Each call creates a new terminal source-sync run.
  • A successful bounded fetch updates last_synced_at and clears last_error. HTTP failure, oversize body or fetch error records a failed run and last_error; failed attempts still return HTTP 200.
  • Consumes and discards the body; adds no feed media, device rows or playback configuration. Configured notification transport is attempted without a response delivery receipt.

Interpret the response

Use response path $.sync.sourceId for feed_source. An empty list does not discover a target.

Inspect sync.status. completed confirms only a bounded fetch; failed requires inspection of reason such as source_http_503, source_response_too_large or source_fetch_failed. Read sources.list for the current last_synced_at and last_error in the same workspace. Retain the terminal attempt before explicitly authorizing another fetch.

The success schema below was checked against captured handler responses. Polymorphic configuration and protected device assignment fields vary; exact envelope and SQL row fields are source-reviewed. Error examples retain their actual refusal shapes.

Success schema:

{
  "type": "object",
  "properties": {
    "sync": {
      "oneOf": [
        {
          "type": "object",
          "properties": {
            "sourceId": {
              "type": "string"
            },
            "status": {
              "type": "string",
              "const": "completed"
            },
            "completedAt": {
              "type": "string"
            }
          },
          "required": [
            "sourceId",
            "status",
            "completedAt"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "sourceId": {
              "type": "string"
            },
            "status": {
              "type": "string",
              "const": "failed"
            },
            "reason": {
              "type": "string"
            },
            "completedAt": {
              "type": "string"
            }
          },
          "required": [
            "sourceId",
            "status",
            "reason",
            "completedAt"
          ],
          "additionalProperties": false
        }
      ]
    }
  },
  "required": [
    "sync"
  ],
  "additionalProperties": false
}

Worked examples

Actual Feed Worker response using synthetic Auth, workspace grants, in-memory D1/KV and simulated source/notification transport. No live provider, encryption audit, device enrollment or external delivery is established. Credentials are excluded or explicitly redacted. SQL result shapes are also reviewed against migrations and handlers; empty captures do not exercise every populated export store. Live publication and read-back are separate environment evidence. Refused examples demonstrate boundaries and must not be executed as successful workflows.

Successful request

Actual Feed Worker response using synthetic Auth, workspace grants, in-memory D1/KV and simulated source/notification transport. No live provider, encryption audit, device enrollment or external delivery is established. Credentials are excluded or explicitly redacted. Captured scenario: source registry is discoverable, workspace-scoped, SSRF-safe, and records failed syncs.

Input · payload.json:

{
  "sourceId": "source_0f815beb-1299-409a-a199-4372e699da4c"
}

CLI:

topolo actions validate app_topolo_feed.sources.sync --data @payload.json --json
topolo actions plan app_topolo_feed.sources.sync --resource-type workspace --resource-id "$FEED_WORKSPACE_ID" --data @payload.json --json
topolo actions call app_topolo_feed.sources.sync --resource-type workspace --resource-id "$FEED_WORKSPACE_ID" --data @payload.json --confirm --json

MCP tool and arguments:

{
  "tool": "topolo_call_action",
  "arguments": {
    "actionId": "app_topolo_feed.sources.sync",
    "input": {
      "sourceId": "source_0f815beb-1299-409a-a199-4372e699da4c"
    },
    "resourceType": "workspace",
    "resourceId": "<identifier returned by granted resource discovery>",
    "confirm": true
  }
}

Captured local response · HTTP 200:

{
  "sync": {
    "sourceId": "source_0f815beb-1299-409a-a199-4372e699da4c",
    "status": "failed",
    "reason": "source_http_503",
    "completedAt": "2026-10-04T04:12:42.928Z"
  }
}

HTTP 200. Inspect sync.status. completed confirms only a bounded fetch; failed requires inspection of reason such as source_http_503, source_response_too_large or source_fetch_failed. Read sources.list for the current last_synced_at and last_error in the same workspace. Retain the terminal attempt before explicitly authorizing another fetch.

Another supported request

Actual Feed Worker response using synthetic Auth, workspace grants, in-memory D1/KV and simulated source/notification transport. No live provider, encryption audit, device enrollment or external delivery is established. Credentials are excluded or explicitly redacted. Captured scenario: successful source sync consumes content and persists only terminal sync state.

Input · payload.json:

{
  "sourceId": "source_0b15b4ee-87ae-4cbb-abcd-a47e1aebe379"
}

CLI:

topolo actions validate app_topolo_feed.sources.sync --data @payload.json --json
topolo actions plan app_topolo_feed.sources.sync --resource-type workspace --resource-id "$FEED_WORKSPACE_ID" --data @payload.json --json
topolo actions call app_topolo_feed.sources.sync --resource-type workspace --resource-id "$FEED_WORKSPACE_ID" --data @payload.json --confirm --json

MCP tool and arguments:

{
  "tool": "topolo_call_action",
  "arguments": {
    "actionId": "app_topolo_feed.sources.sync",
    "input": {
      "sourceId": "source_0b15b4ee-87ae-4cbb-abcd-a47e1aebe379"
    },
    "resourceType": "workspace",
    "resourceId": "<identifier returned by granted resource discovery>",
    "confirm": true
  }
}

Captured local response · HTTP 200:

{
  "sync": {
    "sourceId": "source_0b15b4ee-87ae-4cbb-abcd-a47e1aebe379",
    "status": "completed",
    "completedAt": "2026-10-04T04:12:42.932Z"
  }
}

HTTP 200. Inspect sync.status. completed confirms only a bounded fetch; failed requires inspection of reason such as source_http_503, source_response_too_large or source_fetch_failed. Read sources.list for the current last_synced_at and last_error in the same workspace. Retain the terminal attempt before explicitly authorizing another fetch.

Verify the result

  • Inspect sync.status. completed confirms only a bounded fetch; failed requires inspection of reason such as source_http_503, source_response_too_large or source_fetch_failed.
  • Read sources.list for the current last_synced_at and last_error in the same workspace. Retain the terminal attempt before explicitly authorizing another fetch.

Errors and recovery

  • forbidden (HTTP 403): Use the published permission in the approved credential scope. Do not switch contexts to bypass a denial.

Auth, action-input validation and platform resource resolution can refuse a request before its handler. Retain the exact error, request id and context; requesting another context is not a legitimate way to bypass a refusal.

Recovery boundary

No attempt-history rollback or idempotency key is published. Another authorized sync performs another external request and creates another run; do not blindly retry an uncertain call or treat completed as a content import.

  • List registered Feed sources: Read registered sources in the granted workspace, decrypting name and endpoint URL with snake_case status fields. The unpaginated list is ordered by creation and id; the local mirror can be initialized.

Evidence

Actual Feed Worker response using synthetic Auth, workspace grants, in-memory D1/KV and simulated source/notification transport. No live provider, encryption audit, device enrollment or external delivery is established. Credentials are excluded or explicitly redacted. SQL result shapes are also reviewed against migrations and handlers; empty captures do not exercise every populated export store. Live publication and read-back are separate environment evidence. Capture digests and test scenarios are retained in the source fixture records.