Topolo Docs Topolo Platform
Open workspace

List Inventory CSV import jobs

Read up to 100 newest CSV import jobs in the granted workspace with terminal status, row count, failure reason and timestamps. It returns job metadata rather than CSV data or imported item mappings.

Outcome

Read up to 100 newest CSV import jobs in the granted workspace with terminal status, row count, failure reason and timestamps. It returns job metadata rather than CSV data or imported item mappings.

Before you start

  • Verify the authenticated identity, exact environment and pinned approved organization context before preparing an action.
  • The published application permission is workspace:read. Discover a granted Inventory workspace and bind that exact resource. Supplied identifiers do not grant access.

Discover the target

topolo whoami --json
topolo actions get app_topolo_inventory.imports.list --detail --json
topolo resources topolo-inventory --json
topolo workspaces list topolo-inventory --json
  • Select the exact granted workspace id as INVENTORY_WORKSPACE_ID. Fixture ids authorize no live operation.

Request

GET /api/imports

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

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

Input fields

Supply an empty input object; credential and resource context are separate.

View the complete input schema in the action console. The same schema is available through CLI and MCP action discovery.

Effects

  • Reads scoped core import-job metadata in createdAt descending order with limit 100; no mirror or job is initialized.

Interpret the response

Use response path $.imports[].id for inventory_import. An empty list does not discover a target.

Inspect status completed/failed/processing and failureReason. rowCount describes processed CSV rows, not necessarily newly created items. No cursor, individual import read, job deletion or retry-by-id action is published.

The success schema was checked against captured handler responses. Delegated Auth profile and canonical widget context fields can vary; exact Inventory projections and all six raw SQL export stores are source-reviewed. Error examples retain their actual refusal shapes.

View the complete success schema in the action console. The worked examples below retain complete captured responses; action discovery supplies the exact schema.

Worked examples

Captured exported Worker responses use both real local SQLite D1 databases with all six committed migrations, synthetic Auth/workspace grants and simulated Notify/Nexus/archive transport. They prove local handler shapes and scoped behavior, not live authorization, notification delivery, metering acceptance or environment deployment. Large 100-row list/capped-dashboard captures are retained in local evidence; committed tests verify those limits while worked guides use smaller complete responses. Refused examples demonstrate boundaries and must not be executed as successful workflows.

Successful request

Actual exported Worker response with both local SQLite D1 databases and all committed migrations; synthetic Auth/grants and simulated Notify/Nexus/archive transport. No live delivery, billing or environment deployment proof. Captured scenario: completed and failed import jobs.

Input · payload.json:

{}

CLI:

topolo actions validate app_topolo_inventory.imports.list --data @payload.json --json
topolo actions plan app_topolo_inventory.imports.list --resource-type workspace --resource-id "$INVENTORY_WORKSPACE_ID" --data @payload.json --json
topolo actions call app_topolo_inventory.imports.list --resource-type workspace --resource-id "$INVENTORY_WORKSPACE_ID" --data @payload.json --json

MCP tool and arguments:

{
  "tool": "topolo_read_action",
  "arguments": {
    "actionId": "app_topolo_inventory.imports.list",
    "input": {},
    "resourceType": "workspace",
    "resourceId": "<identifier returned by granted resource discovery>"
  }
}

Captured local response · HTTP 200:

{
  "imports": [
    {
      "id": "invimport_c8fdbb46-8bf6-463f-b5a5-0d4ccb36d827",
      "filename": "inventory.csv",
      "status": "failed",
      "rowCount": 0,
      "failureReason": "CSV headers must include sku and name.",
      "createdAt": "2026-10-04T05:46:37.795Z",
      "completedAt": "2026-10-04T05:46:37.803Z"
    },
    {
      "id": "invimport_3e648b38-70c8-47ff-b196-5b23ba41c914",
      "filename": "inventory.csv",
      "status": "failed",
      "rowCount": 0,
      "failureReason": "CSV contains duplicate sku DUP.",
      "createdAt": "2026-10-04T05:46:37.779Z",
      "completedAt": "2026-10-04T05:46:37.791Z"
    },
    {
      "id": "invimport_d158af2c-22ef-4712-b556-160744fa2ff5",
      "filename": "items.csv",
      "status": "completed",
      "rowCount": 2,
      "failureReason": null,
      "createdAt": "2026-10-04T05:46:37.743Z",
      "completedAt": "2026-10-04T05:46:37.755Z"
    }
  ]
}

HTTP 200. Inspect status completed/failed/processing and failureReason. rowCount describes processed CSV rows, not necessarily newly created items. No cursor, individual import read, job deletion or retry-by-id action is published.

Another supported request

Actual exported Worker response with both local SQLite D1 databases and all committed migrations; synthetic Auth/grants and simulated Notify/Nexus/archive transport. No live delivery, billing or environment deployment proof. Captured scenario: empty imports.

Input · payload.json:

{}

CLI:

topolo actions validate app_topolo_inventory.imports.list --data @payload.json --json
topolo actions plan app_topolo_inventory.imports.list --resource-type workspace --resource-id "$INVENTORY_WORKSPACE_ID" --data @payload.json --json
topolo actions call app_topolo_inventory.imports.list --resource-type workspace --resource-id "$INVENTORY_WORKSPACE_ID" --data @payload.json --json

MCP tool and arguments:

{
  "tool": "topolo_read_action",
  "arguments": {
    "actionId": "app_topolo_inventory.imports.list",
    "input": {},
    "resourceType": "workspace",
    "resourceId": "<identifier returned by granted resource discovery>"
  }
}

Captured local response · HTTP 200:

{
  "imports": []
}

HTTP 200. Inspect status completed/failed/processing and failureReason. rowCount describes processed CSV rows, not necessarily newly created items. No cursor, individual import read, job deletion or retry-by-id action is published.

Verify the result

  • Inspect status completed/failed/processing and failureReason. rowCount describes processed CSV rows, not necessarily newly created items.
  • No cursor, individual import read, job deletion or retry-by-id action is published.

Errors and recovery

  • invalid_action_input (HTTP 400): Correct only the exact fields reported by the published schema validator. An invalid input can be refused before its handler.
  • action_permission_required (HTTP 403): Stop when the verified credential lacks the published action permission. Resource identifiers and organization ownership do not grant that permission.
  • organization_required (HTTP 403): Use the specifically authorized organization context; personal scope cannot act on organization-owned Inventory data.
  • workspace_required (HTTP 400): Discover an authorized Inventory workspace and pass its exact separate resource binding; bootstrap does not select a workspace.
  • workspaces_unavailable (HTTP 503): Retain the request id and report unavailable canonical workspace discovery; do not invent a default workspace.

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

The read does not change local inventory records. No local rollback is needed; do not perform a mutation merely to reverse a read.

  • Import Inventory items from CSV: Create a CSV import job and upsert items by workspace/SKU. Successful import preserves existing item IDs and reactivates matching archived rows; parsing or batch failure returns HTTP 422 with a retained failed job.
  • List Inventory items: List all workspace items, including archived records, newest update first. Every quantityOnHand sums all signed ledger deltas across locations and review states; there is no pagination.

Evidence

Captured exported Worker responses use both real local SQLite D1 databases with all six committed migrations, synthetic Auth/workspace grants and simulated Notify/Nexus/archive transport. They prove local handler shapes and scoped behavior, not live authorization, notification delivery, metering acceptance or environment deployment. Large 100-row list/capped-dashboard captures are retained in local evidence; committed tests verify those limits while worked guides use smaller complete responses. Capture digests and test scenarios are retained in the source fixture records.