Get one published post
GET
/api/v1/content/posts/{slug}
const url = 'https://example.com/api/v1/content/posts/example?locale=th';const options = {method: 'GET'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'https://example.com/api/v1/content/posts/example?locale=th'Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters”slug
required
string
Published content slug.
Query Parameters
Section titled “Query Parameters”locale
required
string
Content locale.
Responses
Section titled “ Responses ”A published post.
Media typeapplication/json
object
data
required
object
contentHtml
required
string
contentJson
required
Native Tiptap document retained for re-editing.
object
type
required
string
content
Array<object>
A Tiptap node. Runtime input is limited to 100 nested levels.
object
type
required
string
attrs
object
key
additional properties
any
content
Array<object> recursive
marks
Array<object>
A Tiptap text mark.
object
type
required
string
attrs
object
key
additional properties
any
text
string
createdAt
required
string format: date-time
id
required
string format: uuid
locale
required
string
media
required
seo
required
slug
required
string
status
required
string
title
required
string
translationGroupId
required
string format: uuid
translations
required
Array<object>
object
href
required
string
locale
required
string
updatedAt
required
string format: date-time
categories
required
Array<object>
object
id
required
string format: uuid
name
required
string
Example
{ "data": { "contentJson": { "type": "doc" }, "locale": "th", "media": [ { "mimeType": "image/avif" } ], "status": "draft", "translations": [ { "locale": "th" } ], "coverImage": { "mimeType": "image/avif" } }}The cached representation is still current.
The request parameters are invalid.
Media typeapplication/problem+json
object
Example
{ "maintenance": { "locale": "th" }}The published resource does not exist.
Media typeapplication/problem+json
object
Example
{ "maintenance": { "locale": "th" }}The request could not be completed.
Media typeapplication/problem+json
object
Example
{ "maintenance": { "locale": "th" }}The content service is not ready, or the site is closed for maintenance; then maintenance carries what the owner wrote for visitors.
Media typeapplication/problem+json
object
Example
{ "maintenance": { "locale": "th" }}
