akb_publish
Create a public share URL for documents, table queries, or files. Add expiration, password, view limits, or section filters. Returns an accessible link.
Instructions
Create a public share URL for a document, table query, or file. For a document or file, pass the resource uri. For a table query, pass the SQL plus vault (queries can span multiple vaults — list them in query_vault_names). Supports expiration, password protection, view count limits, snapshots, and section filtering. Returns a shareable URL accessible without authentication. Prefer public_url_full (absolute URL) when sharing the link with a user; fall back to public_url (relative path) only if public_url_full is null.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| uri | No | Resource URI to publish (document or file). Omit for table_query. | |
| resource_type | No | Type of resource to share. For document/file, also pass uri. For table_query, pass query_sql + vault. | document |
| vault | No | Vault name (required for resource_type=table_query) | |
| query_sql | No | SELECT SQL with :param placeholders (for resource_type=table_query) | |
| query_vault_names | No | Vaults referenced by the query (defaults to [vault]) | |
| query_params | No | Parameter declarations: {name: {type, default, required}} | |
| password | No | Password to protect the share | |
| max_views | No | Auto-expire after N views | |
| expires_in | No | Expiration: '1h', '7d', '30d', or 'never' (default) | |
| title | No | Override display title | |
| mode | No | live=query each request, snapshot=cache result in S3 | live |
| section | No | (document) Filter to a specific heading section | |
| allow_embed | No | Whether the share can be embedded via iframe/oEmbed |