Topolo Docs Topolo Platform
Open workspace

Get campaign dashboard — Campaigns

Reads stored batch, code, placement and redemption counts plus counts for each journey event type. Resource identity is the request id; the dashboard response contains counts. Stored events do not establish a live provider outcome.

Retained immutable local-fixture guide, refreshed against current production catalog metadata. No examples were rerun by this author; no production action was invoked.

Get campaign dashboard

Outcome

Reads stored batch, code, placement and redemption counts plus counts for each journey event type. Resource identity is the request id; the dashboard response contains counts. Stored events do not establish a live provider outcome.

After authentication and the canonical workspace grant succeed, a first workspace request may initialize the app-local identity mirror and recipient setting before the application permission check. These reads do not modify campaign-domain records or execute notifications.

Before you start

  • Verify the intended environment, authenticated identity and organization before discovery.
  • Discover the published analytics:read application permission and inspect the credential-scoped action contract.
  • Discover and bind the granted canonical Campaigns workspace separately from the action input.
  • Fixture identifiers and simulated responses confer no live access. Replace identifiers through granted resource discovery.

Discover the target

topolo whoami --json
topolo workspaces list topolo-campaigns --json
topolo actions get app_topolo_campaigns.campaigns.dashboard.get --json
  • Read app_topolo_campaigns.campaigns.list in this same authorized context and select campaigns[].id. Do not derive ids from display names.
  • Inspect app_topolo_campaigns.campaigns.get in the same credential and resource context before reading it.
  • Inspect app_topolo_campaigns.batches.list in the same credential and resource context before reading it.
  • Inspect app_topolo_campaigns.placements.list in the same credential and resource context before reading it.
  • Inspect app_topolo_campaigns.journey_events.list in the same credential and resource context before reading it.
  • Inspect app_topolo_campaigns.redemptions.list in the same credential and resource context before reading it.

Request

GET /api/campaigns/{id}/dashboard

Input fields

FieldRequiredMeaning and constraints
idYesCampaign identifier returned by campaigns.list in the same authorized organization and workspace. Type: string. minLength: 1

Worked examples

populated resource · HTTP 200

Input · payload.json:

{
  "id": "campaign_docs_fixture"
}

CLI:

topolo actions validate app_topolo_campaigns.campaigns.dashboard.get --data @payload.json --json
topolo actions plan app_topolo_campaigns.campaigns.dashboard.get --resource-type workspace --resource-id "$CAMPAIGNS_WORKSPACE_ID" --data @payload.json --json
topolo actions call app_topolo_campaigns.campaigns.dashboard.get --resource-type workspace --resource-id "$CAMPAIGNS_WORKSPACE_ID" --data @payload.json --json

MCP tool and arguments:

{
  "tool": "topolo_read_action",
  "arguments": {
    "actionId": "app_topolo_campaigns.campaigns.dashboard.get",
    "input": {
      "id": "campaign_docs_fixture"
    },
    "resourceType": "workspace",
    "resourceId": "<identifier returned by granted resource discovery>"
  }
}

Captured local response · HTTP 200:

{
  "dashboard": {
    "batches": 1,
    "codes": 1,
    "placements": 1,
    "redemptions": 1,
    "journey": {
      "discovered": 0,
      "scanned": 1,
      "engaged": 0,
      "claimed": 0,
      "qualified": 0,
      "booked": 0,
      "redeemed": 0
    }
  }
}

populated resource: HTTP 200.

empty workspace · HTTP 404

Input · payload.json:

{
  "id": "campaign_docs_fixture"
}

CLI:

topolo actions validate app_topolo_campaigns.campaigns.dashboard.get --data @payload.json --json
topolo actions plan app_topolo_campaigns.campaigns.dashboard.get --resource-type workspace --resource-id "$CAMPAIGNS_WORKSPACE_ID" --data @payload.json --json

MCP tool and arguments:

{
  "tool": "topolo_prepare_action",
  "arguments": {
    "actionId": "app_topolo_campaigns.campaigns.dashboard.get",
    "input": {
      "id": "campaign_docs_fixture"
    },
    "resourceType": "workspace",
    "resourceId": "<identifier returned by granted resource discovery>"
  }
}

Captured local response · HTTP 404:

{
  "error": "campaign_not_found"
}

empty workspace: HTTP 404; SDK code http_error.

campaign absent · HTTP 404

Input · payload.json:

{
  "id": "campaign_unknown_fixture"
}

CLI:

topolo actions validate app_topolo_campaigns.campaigns.dashboard.get --data @payload.json --json
topolo actions plan app_topolo_campaigns.campaigns.dashboard.get --resource-type workspace --resource-id "$CAMPAIGNS_WORKSPACE_ID" --data @payload.json --json

MCP tool and arguments:

{
  "tool": "topolo_prepare_action",
  "arguments": {
    "actionId": "app_topolo_campaigns.campaigns.dashboard.get",
    "input": {
      "id": "campaign_unknown_fixture"
    },
    "resourceType": "workspace",
    "resourceId": "<identifier returned by granted resource discovery>"
  }
}

Captured local response · HTTP 404:

{
  "error": "campaign_not_found"
}

campaign absent: HTTP 404; SDK code http_error.

workspace grant denied · HTTP 403

Input · payload.json:

{
  "id": "campaign_docs_fixture"
}

CLI:

topolo actions validate app_topolo_campaigns.campaigns.dashboard.get --data @payload.json --json
topolo actions plan app_topolo_campaigns.campaigns.dashboard.get --resource-type workspace --resource-id "$CAMPAIGNS_WORKSPACE_ID" --data @payload.json --json

MCP tool and arguments:

{
  "tool": "topolo_prepare_action",
  "arguments": {
    "actionId": "app_topolo_campaigns.campaigns.dashboard.get",
    "input": {
      "id": "campaign_docs_fixture"
    },
    "resourceType": "workspace",
    "resourceId": "<identifier returned by granted resource discovery>"
  }
}

Captured local response · HTTP 403:

{
  "error": "workspace_forbidden"
}

workspace grant denied: HTTP 403; SDK code permission_denied.

permission denied · HTTP 403

Input · payload.json:

{
  "id": "campaign_docs_fixture"
}

CLI:

topolo actions validate app_topolo_campaigns.campaigns.dashboard.get --data @payload.json --json
topolo actions plan app_topolo_campaigns.campaigns.dashboard.get --resource-type workspace --resource-id "$CAMPAIGNS_WORKSPACE_ID" --data @payload.json --json

MCP tool and arguments:

{
  "tool": "topolo_prepare_action",
  "arguments": {
    "actionId": "app_topolo_campaigns.campaigns.dashboard.get",
    "input": {
      "id": "campaign_docs_fixture"
    },
    "resourceType": "workspace",
    "resourceId": "<identifier returned by granted resource discovery>"
  }
}

Captured local response · HTTP 403:

{
  "error": "forbidden"
}

permission denied: HTTP 403; SDK code permission_denied.

authentication missing · HTTP 401

Input · payload.json:

{
  "id": "campaign_docs_fixture"
}

CLI:

topolo actions validate app_topolo_campaigns.campaigns.dashboard.get --data @payload.json --json
topolo actions plan app_topolo_campaigns.campaigns.dashboard.get --resource-type workspace --resource-id "$CAMPAIGNS_WORKSPACE_ID" --data @payload.json --json

MCP tool and arguments:

{
  "tool": "topolo_prepare_action",
  "arguments": {
    "actionId": "app_topolo_campaigns.campaigns.dashboard.get",
    "input": {
      "id": "campaign_docs_fixture"
    },
    "resourceType": "workspace",
    "resourceId": "<identifier returned by granted resource discovery>"
  }
}

Captured local response · HTTP 401:

{
  "error": "Authentication required"
}

authentication missing: HTTP 401; SDK code auth_error.

Verify the result

  • Retain the selected campaign id and workspace. Compare dashboard counts with their corresponding list actions; journey.redeemed counts recorded journey events, which are separate from the redemption ledger count.

Errors and recovery

  • http_error (HTTP 404): For HTTP 404 campaign_not_found, repeat campaigns.list and campaigns.get in the same authorized workspace. Do not guess another identifier. Preserve the actual response and request id.
  • permission_denied (HTTP 403): Preserve the refusal. Verify the exact application permission and canonical workspace grant, or the organization boundary for export. Do not widen context or retry with a different resource to evade a denial.
  • auth_error (HTTP 401): Authenticate again in the intended environment and pinned organization, then repeat identity and resource discovery.

Authentication, input validation or resource middleware can refuse a request before these handlers. Preserve the actual refusal and request id.

Recovery boundary

These reads do not change campaign-domain records and require no domain rollback. A permission or privacy refusal is authoritative; preserve its context and request id.

  • Get campaign — Campaigns: Reads one non-deleted campaign in the bound organization and workspace. An absent or differently scoped campaign returns HTTP 404 campaign_not_found.
  • List campaign batches — Campaigns: Lists batch metadata for the selected campaign, newest updates first. An empty array can also mean that the campaign id is absent or outside the bound workspace; this read does not verify campaign existence.
  • List campaign placements — Campaigns: Lists stored physical-code placement metadata. Recorded status and timestamps do not establish the current physical location of an asset. An absent campaign can return an empty list.
  • List campaign journey events — Campaigns: Lists stored journey events for the campaign, newest occurrence first. Subject and external references are stored attribution, not executed follow-ups. An absent campaign can return an empty list.
  • List campaign redemptions — Campaigns: Reads the campaign redemption ledger and sums stored value and commissionAccrued. It does not redeem a code, charge a payment, pay commission or send a notification. A missing campaign returns HTTP 404 campaign_not_found.

Evidence

Actual Campaigns handleRequest, permission checks, store queries and replayed SQLite migrations. Credential verification and canonical workspace grants are simulated at the Auth package boundary; egress is sealed. No deployed/provider outcome, live redemption, outbound communication or live access is demonstrated.

Current field meanings and contract

FieldRequiredMeaning and validation
idYesCampaign identifier from campaigns[].id; scoped to the selected organization/workspace. It is not a batch/code/placement id. string; minLength=1

Exact schemas and provenance

Input schema:

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "minLength": 1
    }
  },
  "required": [
    "id"
  ],
  "additionalProperties": false
}

Output schema:

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "dashboard": {
      "type": "object",
      "properties": {
        "batches": {
          "type": "integer",
          "minimum": -9007199254740991,
          "maximum": 9007199254740991
        },
        "codes": {
          "type": "integer",
          "minimum": -9007199254740991,
          "maximum": 9007199254740991
        },
        "placements": {
          "type": "integer",
          "minimum": -9007199254740991,
          "maximum": 9007199254740991
        },
        "redemptions": {
          "type": "integer",
          "minimum": -9007199254740991,
          "maximum": 9007199254740991
        },
        "journey": {
          "type": "object",
          "propertyNames": {
            "type": "string"
          },
          "additionalProperties": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          }
        }
      },
      "required": [
        "batches",
        "codes",
        "placements",
        "redemptions",
        "journey"
      ],
      "additionalProperties": false
    }
  },
  "required": [
    "dashboard"
  ],
  "additionalProperties": false
}

Reviewed immutable source: TopoloCampaigns@cacbb8b12b4e19a662cf82d03a927aef3c3a35e8, docs/action-read-records.json. Fresh production catalog was read on 2026-10-20. Its publication metadata is not proof that this source is loaded. Output examples are not widened or rewritten to force schema success; the accompanying validation record classifies exact success, refusal, no-body and structural-schema limits.

  • app_topolo_campaigns.campaigns.get: Read one campaign with its offer, codes, status and redemption totals.
  • app_topolo_campaigns.batches.list: List a campaign's code batches and their state.
  • app_topolo_campaigns.placements.list: List a campaign's placements, the surfaces its codes are distributed through.
  • app_topolo_campaigns.journey_events.list: List the journey events recorded against a campaign, the trail of what a recipient did.
  • app_topolo_campaigns.redemptions.list: List a campaign's redemptions with their total value.

Local input rejection example

This deliberately invalid input belongs to a pure schema check; it is never a planned or executed request. The closed action input schema must reject the extra field. It has no HTTP status or server response.

{
  "id": "campaign_docs_fixture",
  "__unsupported_field": true
}

The hidden companion labels this as ILLUSTRATIVE_LOCAL_SCHEMA_CHECK; its validation representation is not an action output.

Published output validation limits

Current published output qualification: the output schema rejects the empty-object, partial-success-marker, partial-data-object and refusal-body probes. A schema-valid success body still does not establish execution, live permission, selected context or a provider outcome.

These observations come from pure checks of the exact published schema; they are not server responses or production captures.