SynapDocs
Hub REST API

Public

The Public operations of the Hub REST API (5 operations).

For BuildersOpen-source podSynap Cloud

Generated from Synap-core/backend main at 24fabe7, which can be newer than the stable release self-hosters install.

GET
/public/projection

Query Parameters

workspace*string

Target workspace id (uuid).

q?string

Optional keyword filter (matched on title + preview).

role?string

Optional single facet role slug to narrow to. Ignored unless it is within the workspace's configured public role allowlist.

limit?string

Page size. Default 20, hard-capped at 50.

Response Body

Field-whitelisted projection items

application/json
  1. response
items*array<>
count*number
Example Request
curl -X GET 'https://pod.example.com/api/hub/public/projection?workspace=string'
Example Response
{  "items": [    {      "id": "string",      "title": "string",      "role": "string",      "properties": {        "property1": null,        "property2": null      }    }  ],  "count": 0}
GET
/public/shares/{token}

Path Parameters

token*string

The public share token (the capability). Stored hashed; every miss is the same 404.

Response Body

The published share

application/json
  1. response
resourceType*"entity"
Value in"entity"
title?string

Present only when the publisher allowlisted title.

properties*

The publish-time snapshot of allowlisted values (plain values only; internal ids removed).

body*|

The pinned published revision's text in its real format, or null (none pinned, or not a text body).

publishedOn*string

Publication day, YYYY-MM-DD.

Example Request
curl -X GET 'https://pod.example.com/api/hub/public/shares/string'
Example Response
{  "resourceType": "entity",  "title": "string",  "properties": {    "property1": "string",    "property2": "string"  },  "body": {    "format": "markdown",    "content": "string"  },  "publishedOn": "string"}
GET
/public/sites/{siteToken}

Path Parameters

siteToken*string

The site token (the capability). Stored hashed; every miss is the same 404.

Response Body

The site manifest

application/json
  1. response
title?string

Present only when the owner's policy publishes title.

description?string

Present only when the owner's policy publishes description.

publishedOn*string

Day the site went live, YYYY-MM-DD.

collections*array<>
Example Request
curl -X GET 'https://pod.example.com/api/hub/public/sites/string'
Example Response
{  "title": "string",  "description": "string",  "publishedOn": "string",  "collections": [    {      "key": "string",      "count": 0,      "sort": [        "string"      ],      "pageSize": 0,      "addressing": "slug"    }  ]}
GET
/public/sites/{siteToken}/collections/{key}

Path Parameters

siteToken*string

The site token (the capability).

key*string

A configured collection key.

Query Parameters

offset?string

0..10000 (default 0); beyond → 400 offset too large.

limit?string

Clamped to 1..100 (default: the collection's page size).

sort?string

≤ 3 comma-separated keys, - = descending, out of the collection's configured sort keys and publishedAt (default: the configured sort, else -publishedAt). Anything else → 400.

Response Body

A page

application/json
  1. response
items*array<>
total*integer

Live published records in the collection.

offset*integer
limit*integer
Example Request
curl -X GET 'https://pod.example.com/api/hub/public/sites/string/collections/string'
Example Response
{  "items": [    {      "collection": "string",      "publicId": "string",      "slug": "string",      "title": "string",      "properties": {        "property1": "string",        "property2": "string"      },      "publishedOn": "string"    }  ],  "total": 0,  "offset": 0,  "limit": 0}
GET
/public/sites/{siteToken}/collections/{key}/{slugOrPublicId}

Path Parameters

siteToken*string

The site token (the capability).

key*string

A configured collection key.

slugOrPublicId*string

A record's public id (p_ + 16 base62 chars) or its slug (lowercase words joined by -).

Response Body

The record

application/json
  1. response
collection*string

The collection key.

publicId*string

The stable public address: p_ + 16 random base62 chars.

slug*|

The record's slug in its collection, or null.

title?string

Present only when the owner's policy publishes title.

properties*

The publish-time snapshot of allowlisted values (plain values only; internal ids removed).

publishedOn*string

Publication day, YYYY-MM-DD.

body*|

The pinned published revision's text, or null.

Example Request
curl -X GET 'https://pod.example.com/api/hub/public/sites/string/collections/string/string'
Example Response
{  "collection": "string",  "publicId": "string",  "slug": "string",  "title": "string",  "properties": {    "property1": "string",    "property2": "string"  },  "publishedOn": "string",  "body": {    "format": "markdown",    "content": "string"  }}

On this page