# Blogs
# Get Blogs List
Retrieve a list of all blogs.
- URL:
blogs/blogs/ - Method:
GET - Response Example:
[ { "unique_id": "456", "title": "First Blog", "main_image": "http://example.com/image.jpg", "content": "This is the content of the first blog.", "seo_description": "SEO description", "seo_keywords": "SEO, blog", "author": "Author Name", "category_id": "123", "category": { "unique_id": "123", "name": "Tech", "description": "Technology related blogs and news", "date_created": "2021-01-01T00:00:00Z", "last_updated": "2021-01-01T00:00:00Z" }, "date_created": "2021-01-01T00:00:00Z", "last_updated": "2021-01-01T00:00:00Z" }, ... ]
# Create a Blog
Create a new blog.
URL:
blogs/blogs/Method:
POSTRequest Example:
{ "title": "First Blog", "main_image": "http://example.com/image.jpg", "content": "This is the content of the first blog.", "seo_description": "SEO description", "seo_keywords": "SEO, blog", "author": "Author Name", "category_id": "123" }Create a blog option 2 - you can also send the category as a nested object for defining a new category
{ "title": "First Blog", "main_image": "http://example.com/image.jpg", "content": "This is the content of the first blog.", "seo_description": "SEO description", "seo_keywords": "SEO, blog", "author": "Author Name", "category": { "name": "Tech", "description": "Technology related blogs and news" } }Response Example:
{ "unique_id": "456", "title": "First Blog", "main_image": "http://example.com/image.jpg", "content": "This is the content of the first blog.", "seo_description": "SEO description", "seo_keywords": "SEO, blog", "author": "Author Name", "category_id": "123", "category": { "unique_id": "123", "name": "Tech", "description": "Technology related blogs and news", "date_created": "2021-01-01T00:00:00Z", "last_updated": "2021-01-01T00:00:00Z" }, "date_created": "2021-01-01T00:00:00Z", "last_updated": "2021-01-01T00:00:00Z" }
# Get a Blog
Retrieve details of a specific blog by unique ID.
- URL:
blogs/blogs/<str:unique_id>/ - Method:
GET - Response Example:
{ "unique_id": "456", "title": "First Blog", "main_image": "http://example.com/image.jpg", "content": "This is the content of the first blog.", "seo_description": "SEO description", "seo_keywords": "SEO, blog", "author": "Author Name", "category_id": "123", "category": { "unique_id": "123", "name": "Tech", "description": "Technology related blogs and news", "date_created": "2021-01-01T00:00:00Z", "last_updated": "2021-01-01T00:00:00Z" }, "date_created": "2021-01-01T00:00:00Z", "last_updated": "2021-01-01T00:00:00Z" }
# Update a Blog
Update an existing blog by unique ID.
- URL:
blogs/blogs/<str:unique_id>/ - Method:
PUT - Request Example:
{ "title": "Updated Blog", "main_image": "http://example.com/image.jpg", "content": "This is the updated content of the blog.", "seo_description": "Updated SEO description", "seo_keywords": "SEO, blog, updated", "author": "Author Name", "category_id": "123" } - Response Example:
{ "unique_id": "456", "title": "Updated Blog", "main_image": "http://example.com/image.jpg", "content": "This is the updated content of the blog.", "seo_description": "Updated SEO description", "seo_keywords": "SEO, blog, updated", "author": "Author Name", "category_id": "123", "category": { "unique_id": "123", "name": "Tech", "description": "Technology related blogs and news", "date_created": "2021-01-01T00:00:00Z", "last_updated": "2021-01-01T00:00:00Z" }, "date_created": "2021-01-01T00:00:00Z", "last_updated": "2021-01-02T00:00:00Z" }
# Delete a Blog
Delete a blog by unique ID.
- URL:
blogs/blogs/<str:unique_id>/ - Method:
DELETE - Response:
204 No Content
← Categories News →