Topolo Docs Topolo Platform
Open workspace

List sharing links

Read a page of sharing records visible in the selected workspace. Only accessible stored records appear; the response redacts stored passwords.

Outcome

Read a page of sharing records visible in the selected workspace. Only accessible stored records appear; the response redacts stored passwords.

Before you start

  • Verify identity, pin environment and organization, and discover a granted Bytes workspace before choosing file keys.
  • The action requires sharing:read. Select a verified workspace resource separately from action input; a body field cannot supply a workspace grant.
  • Scope org uses the verified workspace shared root; private uses the caller’s private subtree. The accepted legacy all value resolves to org and does not grant cross-organization browsing. The bucket input cannot switch the configured R2 binding.

Discover the target

topolo whoami --json
topolo actions get app_topolo_bytes.shares.list --detail --json
topolo resources topolo-bytes --json
topolo workspaces list topolo-bytes --json
  • File keys are paths returned by files.list/search in the selected workspace and scope. Discover the granted workspace id; do not derive access from fixture ids.

Request

GET /api/shares

Save action input as payload.json. The reviewed plan separates path identifiers, query fields and the HTTP body. Set BYTES_WORKSPACE_ID from granted resource discovery.

Inspect and test this action in the signed action console. A test response still requires the verification below.

Input fields

FieldRequiredTypeConstraints
cursorOptionalstring{}
limitOptionalinteger{"minimum":1,"maximum":200}
scopeOptionalstring{"enum":["org","private","all"]}

Exact input schema:

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "cursor": {
      "type": "string"
    },
    "limit": {
      "type": "integer",
      "minimum": 1,
      "maximum": 200
    },
    "scope": {
      "type": "string",
      "enum": [
        "org",
        "private",
        "all"
      ]
    }
  },
  "additionalProperties": false
}

Effects

  • Reads sharing records and filters them to authorized storage scope.

Interpret the response

The response identifier path is $.shares[].id for share. An empty list does not discover a target.

Continue with nextCursor; an empty filtered page with a cursor is not the end of the namespace. Inspect permissions and expiration before using a link.

The schema describes supported success fields; optional metadata and integration-dependent values may vary. Errors have the exact shapes shown in refused examples.

Success schema:

{
  "type": "object",
  "required": [
    "success",
    "shares",
    "nextCursor"
  ],
  "properties": {
    "success": {
      "type": "boolean"
    },
    "shares": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "id",
          "url",
          "permissions",
          "views",
          "downloads",
          "createdAt",
          "fileKeys",
          "shareType",
          "createdBy",
          "organizationId",
          "workspaceId"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "url": {
            "type": "string"
          },
          "permissions": {
            "type": "string"
          },
          "views": {
            "type": "number"
          },
          "downloads": {
            "type": "number"
          },
          "createdAt": {
            "type": "string"
          },
          "fileKeys": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "shareType": {
            "type": "string"
          },
          "createdBy": {
            "type": "string"
          },
          "organizationId": {
            "type": "string"
          },
          "workspaceId": {
            "type": "string"
          }
        }
      }
    },
    "nextCursor": {
      "type": "null"
    }
  }
}

Worked examples

Actual exported Worker handlers with local Miniflare R2/KV. Auth, workspace grants, R2 multipart, notification, usage and semantic integrations are simulated at their configured test boundaries. Synthetic ids, timestamps and signed URLs confer no live access. No deployed provider outcome, external delivery or live grant is established. Upload-session credential values are explicitly redacted; binary responses use the tested SDK transport envelope. Replace synthetic identifiers through credential-scoped discovery. Refused scenarios document failure boundaries; they are not successful workflows.

Successful request

Actual worker response with local Miniflare R2/KV and simulated Auth, workspace grants and outbound integration boundaries. No authorization header is captured.

Input · payload.json:

{}

CLI:

topolo actions validate app_topolo_bytes.shares.list --data @payload.json --json
topolo actions plan app_topolo_bytes.shares.list --resource-type workspace --resource-id "$BYTES_WORKSPACE_ID" --data @payload.json --json
topolo actions call app_topolo_bytes.shares.list --resource-type workspace --resource-id "$BYTES_WORKSPACE_ID" --data @payload.json --json

MCP tool and arguments:

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

Captured local response · HTTP 200:

{
  "success": true,
  "shares": [],
  "nextCursor": null
}

HTTP 200. Continue with nextCursor; an empty filtered page with a cursor is not the end of the namespace. Inspect permissions and expiration before using a link.

Refused request · HTTP 401

Actual worker response with local Miniflare R2/KV and simulated Auth, workspace grants and outbound integration boundaries. No authorization header is captured.

Input · payload.json:

{}

CLI:

topolo actions validate app_topolo_bytes.shares.list --data @payload.json --json
topolo actions plan app_topolo_bytes.shares.list --resource-type workspace --resource-id "$BYTES_WORKSPACE_ID" --data @payload.json --json

Captured local response · HTTP 401:

{
  "error": "Unauthorized",
  "message": "No token"
}

HTTP 401. This request was refused; preserve the exact response and correct its cause before retrying.

Verify the result

  • Continue with nextCursor; an empty filtered page with a cursor is not the end of the namespace. Inspect permissions and expiration before using a link.

Errors and recovery

  • Unauthorized (HTTP 401): Refresh the authorized credential in the same environment and organization. A failed authentication is not a successful handler effect.

Authentication, the action-input validator or resource middleware can refuse a request before this handler. Preserve the exact request id, error and selected credential context. The fixtures establish no live credentials or configured provider.

Recovery boundary

No service state changes.

Evidence

Actual exported Worker handlers with local Miniflare R2/KV. Auth, workspace grants, R2 multipart, notification, usage and semantic integrations are simulated at their configured test boundaries. Synthetic ids, timestamps and signed URLs confer no live access. No deployed provider outcome, external delivery or live grant is established. Upload-session credential values are explicitly redacted; binary responses use the tested SDK transport envelope. Capture digests and test scenarios are retained in the source fixture records.