Appearance
Content-Hub / Web-Embed API Doc
- Authorization with Bearer token
- API Base Url: https://app.publishr.ch/ (or your self-hosted instance)
All Endpoints return ApiResponse<T>, with T being the type of the returned data. For example, the endpoint GET '/api/v2/contenthub-story/list' returns ApiResponse<StoryGet[]>.
Multiple Stories
typescript
GET '/api/v2/contenthub-story/list'
Example Query Params:
{
limit: 30, // optional, default 30, max 100
offset: 0, // optional, default 0
orderBy: 'id', // optional, default 'id'. Possible values: 'id' | 'timestamp' | 'uploadTimestamp'
direction: 'desc', // optional, default 'desc'
query: '', // optional, search query
fkMediahouse: 1, // optional Mediahouse ID from WebEmbedGet. If omitted, all stories of all contenthubs are returned!
social: false, // optional, all story types returned if not set
ids: [1, 2, 3], // optional, filter by story ids
languages: ['de'], // optional, all languages returned if not set. Possible values: 'de' | 'fr' | 'it' | 'en'
tags: ['tag1', 'tag2'], // optional
}Returns: StoryGet[]
Single Story
typescript
GET '/api/v2/contenthub-story/:id'
Query Params:
{
language: 'de', // optional, returns story in specified language, if available. Possible values: 'de' | 'fr' | 'it' | 'en'
}Returns: StoryGet
Web-Embed
typescript
GET '/api/v2/web-embed/:id'
GET '/api/v2/web-embed/slug/:slug'Returns: WebEmbedGet
Author Image
typescript
GET 'https://cdn.publishr.ch/public/author-pictures/{fkMediaSquare}.png'fkMediaSquare comes from StoryAuthorGet → ContactGet
If you have a self-hosted instance, use your custom CDN url.
Story Like
typescript
POST '/api/v2/contenthub-story/:storyId/increment-likes'
returns: numberImage Service
typescript
GET '/thumbor/:widthx:height/:imagePath'
returns: Image FileThumbor is connected to S3, so the image path should be the relative S3 path (e.g. /public/...).