Welcome to the Filament Blog API, a RESTful API for managing and retrieving blog content, authors, categories, and media. This API is built using Laravel and leverages the Filament blog package.
-
Get Published Posts
- Endpoint:
GET /api/posts
- Description: Retrieve a list of published blog posts.
- Response: Returns a JSON array of published blog posts.
- Endpoint:
-
Get Drafts
- Endpoint:
GET /api/drafts
- Description: Retrieve a list of draft blog posts.
- Response: Returns a JSON array of draft blog posts.
- Endpoint:
-
Get Post by ID
- Endpoint:
GET /api/posts/{id}
- Description: Retrieve a specific blog post by its ID.
- Response: Returns a JSON object with details of the specified blog post.
- Endpoint:
-
Get Authors
- Endpoint:
GET /api/authors
- Description: Retrieve a list of blog authors.
- Response: Returns a JSON array of blog authors.
- Endpoint:
-
Get Author by ID
- Endpoint:
GET /api/authors/{id}
- Description: Retrieve a specific blog author by their ID.
- Response: Returns a JSON object with details of the specified blog author.
- Endpoint:
-
Get Categories
- Endpoint:
GET /api/categories
- Description: Retrieve a list of blog categories.
- Response: Returns a JSON array of blog categories.
- Endpoint:
-
Get Category by ID
- Endpoint:
GET /api/categories/{id}
- Description: Retrieve a specific blog category by its ID.
- Response: Returns a JSON object with details of the specified blog category.
- Endpoint:
-
Get Media
- Endpoint:
GET /blog/{media}
- Description: Retrieve a specific media file by its filename.
- Example:
GET /blog/sample-banner.jpg
- Endpoint:
-
Search Posts
- Endpoint:
GET /api/search-posts
- Description: Search for posts based on a keyword.
- Parameters:
keyword
(required): The keyword to search for in post titles and content.
- Response: Returns a JSON array of posts matching the search criteria.
- Endpoint:
The Laravel framework is open-sourced software licensed under the MIT license.