The Blog-thing-public API provides publicly available requests for connecting the blog thing CMS tool to any project. Developers can retrieve a list of blogs, including details such as author, title, summary, and publication date. The API also allows for customization through query parameters, such as filtering by language, category, or performing searches. Additionally, developers can retrieve a list of categories. All requests must include the blogthing-api-key header with the corresponding API key.

Publicly available API requests

For connecting the blog thing CMS tool to any project. First create your public API key in the project dashboard then continue to read the documentation page.

All request headers need to contain a custom header key blogthing-api-key with a value of your API key. We recommend saving that API key in a secret env file and in case you are using Next.js make sure to use server actions to fetch data as this will protect your api key, thus making blog-thing completely hidden.

Get public blogs

https://blogthing.starko.me/api/v1

This endpoint allows developers to retrieve a list of blogs.

Request Parameters

This endpoint does not require any request parameters. But it can include them, the full list of params can be found later in this documentation

Response Fields

In the event of a successful request, the response will contain a data object with the following...

ParameterTypeDescription
countIntegerThe total number of blogs
blogsArrayAn array of blog objects

Response Fields

In the event of a successful request, the response will contain a data object with the following...

ParameterTypeDescription
countIntegerThe total number of blogs
blogsArrayAn array of blog objects
_idStringThe unique identifier of the blog
authorStringThe author of the blog
titleStringThe title of the blog
meta_titleStringThe meta title of the blog
slugStringThe slug of the blog
summaryStringThe summary of the blog
project_idStringThe project ID of the blog
publishedDateThe publish date of the blog
created_atDateThe creation date of the blog
updated_atDateThe last updated date of the blog
published_atDateThe publish date of the blog
blog_contentTextHTML content of the blog
thumbnail_idStringThe thumbnail ID of the blog
user_idStringThe user ID of the blog
publicBooleanIndicates if the blog is public or not
editor_dataJSONThe editor data of the blog
langStringThe language of the blog
category_idStringThe category of the blog
custom_fieldJSONUser defined custom field
thumbnailurlStringThe URL of the thumbnail image
categorynameStringThe name of the category

In the event of an error, the response will contain an error object with a message field describing the error.

Request headers

Must contain a header field **blogthing-api-key** Example : blogthing-api-key:b77b3aaf-e1ec-4969-9df7-be92d5d73fee We use axios in our testing but header tags can be easily changed in almost any different way of fetching data

Query Params

Query parameters allow you to customize your API requests for retrieving specific data from the server. Heres a list of available query parameters:

ParameterTypeDescription
simpleModeBooleanDefault: false Setting simpleMode to true returns a simplified version of the response, suitable for listing all blogs.
slugStringQuery by exact slug match. Use this parameter to retrieve a blog with a specific slug.
langStringQuery by exact language match. Specify the desired language (e.g., sr-RS ) to filter the results based on the language of the blogs.
blog_idStringSpecify the blog_id to retrieve a specific blog with a unique ID.
category_idStringSpecify the category_id to retrieve blogs within a particular category.
limitIntegerDefault: 1 Set the limit parameter to control the number of results per page when paginating through the blog data.
pageIntegerDefault: 1 Set the page parameter to control the page number when paginating through the blog data.

Documentation

Get categories

https://blogthing.starko.me/api/v1/categories

This endpoint allows developers to retrieve a list of categories from the blog.

Request Parameters

This endpoint does not require any request parameters.

Response Fields

In the event of a successful request, the response will contain a data array with the list of categories. Each category object will contain the following fields:

With a query param of lang you can filter the categories by language the default language is en

ParameterTypeDescription
_idStringUnique identifier of the category
nameStringName of the category
project_idStringUnique identifier of the project the category belongs to
publicBooleanIndicates whether the category is public or not
langStringIndicates the language of the category

In the event of an error, the response will contain an error object with a message field describing the error.

Request Headers

Must contain a header field **blogthing-api-key** Example : blogthing-api-key:b77b3aaf-e1ec-5434-9df7-be92d5d73fee We use axios in our testing but header tags can be easily changed in almost any different way of fetching data

Starko © 2023All rights reserved
Privacy PolicyTerms of Service