Overview
The Blog API uses consistent data models across all endpoints. Understanding these schemas will help you work effectively with the API.
BlogResponse
Complete blog post object returned by the API.
interface BlogResponse {
id : string ; // UUID
title : string ; // Blog title
content : string ; // Full markdown content
author : string | null ; // Author name
description : string | null ; // Short description/excerpt
tags : string [] | null ; // Array of tags
thumbnail : string | null ; // Thumbnail image URL
slug : string ; // URL-friendly slug
published : boolean ; // Publication status
created_at : string ; // ISO 8601 datetime
updated_at : string ; // ISO 8601 datetime
}
Field Details
Unique identifier (UUID v4 format) "ec94c8ac-44a2-4093-acce-548905684ddf"
Blog post title (1-500 characters) "ETABS Python API Tutorial"
Full blog content in markdown format # Introduction\n\nThis tutorial covers...
Short description or excerpt (auto-generated if not provided) "Learn how to automate ETABS with Python"
Array of tag strings for categorization [ "python" , "etabs" , "automation" ]
URL to thumbnail image "https://example.com/thumb.jpg"
URL-friendly identifier (auto-generated from title if not provided) "etabs-python-api-tutorial"
Publication status (true = published, false = draft)
ISO 8601 timestamp when blog was created "2025-10-11T01:48:25.067567"
ISO 8601 timestamp when blog was last updated "2025-10-11T01:48:25.067567"
BlogListResponse
Paginated list of blog posts returned by the list endpoint.
interface BlogListResponse {
blogs : BlogResponse []; // Array of blog posts
total : number ; // Total count of blogs
page : number ; // Current page number
limit : number ; // Items per page
pages : number ; // Total number of pages
}
Example
{
"blogs" : [
{
"id" : "ec94c8ac-44a2-4093-acce-548905684ddf" ,
"title" : "ETABS Python API Tutorial" ,
"content" : "# Full markdown content..." ,
"author" : "John Doe" ,
"description" : "Learn how to automate ETABS..." ,
"tags" : [ "python" , "etabs" , "automation" ],
"thumbnail" : "https://example.com/thumb.jpg" ,
"slug" : "etabs-python-api-tutorial" ,
"published" : true ,
"created_at" : "2025-10-11T01:48:25.067567" ,
"updated_at" : "2025-10-11T01:48:25.067567"
}
],
"total" : 42 ,
"page" : 1 ,
"limit" : 20 ,
"pages" : 3
}
Field Details
Array of BlogResponse objects for the current page
Total number of blogs matching the query/filters
Current page number (1-indexed)
Number of items per page (max 100)
Total number of pages available
BlogSearchResponse
Search results with query information.
interface BlogSearchResponse {
blogs : BlogResponse []; // Array of matching blog posts
total : number ; // Total count of matches
page : number ; // Current page number
limit : number ; // Items per page
pages : number ; // Total number of pages
query : string ; // The search query used
}
Example
{
"blogs" : [
{
"id" : "ec94c8ac-44a2-4093-acce-548905684ddf" ,
"title" : "ETABS Python API Tutorial" ,
"content" : "# Full markdown content..." ,
"author" : "John Doe" ,
"description" : "Learn how to automate ETABS..." ,
"tags" : [ "python" , "etabs" , "automation" ],
"thumbnail" : "https://example.com/thumb.jpg" ,
"slug" : "etabs-python-api-tutorial" ,
"published" : true ,
"created_at" : "2025-10-11T01:48:25.067567" ,
"updated_at" : "2025-10-11T01:48:25.067567"
}
],
"total" : 5 ,
"page" : 1 ,
"limit" : 20 ,
"pages" : 1 ,
"query" : "ETABS"
}
Field Details
Inherits all fields from BlogListResponse plus:
The search query that was executed
BlogCreate
Request body schema for creating a new blog post.
interface BlogCreate {
title : string ; // Required, 1-500 chars
content : string ; // Required, min 1 char, supports markdown
author ?: string | null ; // Optional
description ?: string | null ; // Optional, auto-generated if not provided
tags ?: string [] | null ; // Optional array of tags
thumbnail ?: string | null ; // Optional image URL
slug ?: string | null ; // Optional, auto-generated if not provided
published ?: boolean ; // Optional, default: true
}
Example
{
"title" : "Getting Started with SAP2000 API" ,
"content" : "# Introduction \n\n This tutorial covers..." ,
"author" : "Jane Smith" ,
"description" : "A comprehensive guide to SAP2000 automation" ,
"tags" : [ "sap2000" , "api" , "automation" ],
"thumbnail" : "https://example.com/sap2000-thumb.jpg" ,
"published" : true
}
Auto-generation Rules
Slug : If not provided, automatically generated from title (lowercase, hyphens, unique)Example: “Getting Started with SAP2000” → getting-started-with-sap2000
Description : If not provided, automatically extracted from first 200 characters of content (markdown stripped)
Slug Uniqueness : If a slug already exists, a number is appended (e.g., my-blog-2, my-blog-3)
BlogUpdate
Request body schema for updating an existing blog post.
interface BlogUpdate {
title ?: string | null ; // 1-500 chars
content ?: string | null ; // Min 1 char
author ?: string | null ;
description ?: string | null ;
tags ?: string [] | null ;
thumbnail ?: string | null ;
slug ?: string | null ;
published ?: boolean | null ;
}
All fields are optional. Only include fields you want to update (partial updates supported).
Example
{
"title" : "Advanced SAP2000 API Tutorial" ,
"tags" : [ "sap2000" , "api" , "automation" , "advanced" ],
"published" : true
}
Error Response
Standard error response format for all endpoints.
interface ErrorResponse {
detail : string ; // Error message
}
Example
{
"detail" : "Blog not found"
}
Common HTTP Status Codes
Status Code Description 200 OKRequest succeeded 201 CreatedBlog post created successfully 204 No ContentBlog post deleted successfully 400 Bad RequestInvalid request parameters 404 Not FoundBlog post not found 422 Unprocessable EntityValidation error 500 Internal Server ErrorServer error
Validation Rules
Required for creation
Length : 1-500 characters
Cannot be empty string
Required for creation
Minimum length : 1 character
Supports full markdown syntax
No maximum length limit
Must be URL-friendly (lowercase, hyphens only)
Auto-generated from title if not provided
Must be unique (duplicates get numbered suffix)
Must be a valid URL string
No file type validation (client responsibility)