{"id":20031375,"url":"https://github.com/ahmedrafat-sw/blog-posts-api","last_synced_at":"2026-05-06T09:39:35.288Z","repository":{"id":188926022,"uuid":"677429581","full_name":"ahmedrafat-SW/blog-posts-api","owner":"ahmedrafat-SW","description":"The Blog Post website is a platform for individuals and businesses to publish content on a variety of topics","archived":false,"fork":false,"pushed_at":"2024-07-27T13:32:24.000Z","size":106,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-12T17:47:53.026Z","etag":null,"topics":["jpa-hibernate","postgresql","restful-api","spring-boot","spring-data-jpa","spring-security","sql"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ahmedrafat-SW.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-08-11T14:52:11.000Z","updated_at":"2024-07-27T13:32:28.000Z","dependencies_parsed_at":null,"dependency_job_id":"e6a2f9b9-05c4-4424-a650-6f6cc9e23120","html_url":"https://github.com/ahmedrafat-SW/blog-posts-api","commit_stats":null,"previous_names":["ahmedrafat-sw/blog-posts-api"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ahmedrafat-SW%2Fblog-posts-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ahmedrafat-SW%2Fblog-posts-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ahmedrafat-SW%2Fblog-posts-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ahmedrafat-SW%2Fblog-posts-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ahmedrafat-SW","download_url":"https://codeload.github.com/ahmedrafat-SW/blog-posts-api/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241462148,"owners_count":19966822,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["jpa-hibernate","postgresql","restful-api","spring-boot","spring-data-jpa","spring-security","sql"],"created_at":"2024-11-13T09:32:42.472Z","updated_at":"2026-05-06T09:39:30.267Z","avatar_url":"https://github.com/ahmedrafat-SW.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# API Documentation\n\n## User API\n\n### Get All Users\n\n- **Endpoint**: `GET /api/v1/users`\n- **Description**: Retrieves a list of all users.\n- **Response**:\n  - **200 OK**: List of `UserDTO` objects.\n\n### Get User By ID\n\n- **Endpoint**: `GET /api/v1/users/{id}`\n- **Description**: Retrieves a user by their ID.\n- **Path Parameters**:\n  - `id` (Long): ID of the user.\n- **Response**:\n  - **200 OK**: `UserDTO` object.\n  - **404 Not Found**: If the user with the specified ID is not found.\n\n### Create User\n\n- **Endpoint**: `POST /api/v1/users/register`\n- **Description**: Registers a new user.\n- **Request Body**: `User` object\n  - **Fields**:\n    - `userId` (Long): Unique ID of the user.\n    - `firstName` (String): First name of the user.\n    - `lastName` (String): Last name of the user.\n    - `email` (String): Email address of the user.\n- **Response**:\n  - **201 Created**: User created successfully.\n  - **400 Bad Request**: If the email already exists.\n\n### Delete User\n\n- **Endpoint**: `DELETE /api/v1/users/delete/{id}`\n- **Description**: Deletes a user by their ID.\n- **Path Parameters**:\n  - `id` (Long): ID of the user.\n- **Response**:\n  - **200 OK**: User deleted successfully.\n  - **404 Not Found**: If the user with the specified ID is not found.\n\n## Blog API\n\n### Get All Blogs\n\n- **Endpoint**: `GET /api/v1/blogs`\n- **Description**: Retrieves a list of all blogs.\n- **Response**:\n  - **200 OK**: List of `BlogDTO` objects.\n\n### Get Blog By ID\n\n- **Endpoint**: `GET /api/v1/blogs/{id}`\n- **Description**: Retrieves a blog by its ID.\n- **Path Parameters**:\n  - `id` (int): ID of the blog.\n- **Response**:\n  - **200 OK**: `BlogDTO` object.\n  - **404 Not Found**: If the blog with the specified ID is not found.\n\n### Create Blog\n\n- **Endpoint**: `POST /api/v1/blogs`\n- **Description**: Creates a new blog.\n- **Request Body**: `BlogDTO` object\n  - **Fields**:\n    - `id` (int): Unique ID of the blog.\n    - `title` (String): Title of the blog.\n    - `content` (String): Content of the blog.\n- **Response**:\n  - **201 Created**: `BlogDTO` object with the created blog.\n\n### Update Blog Content\n\n- **Endpoint**: `PUT /api/v1/blogs/edit/{id}`\n- **Description**: Updates the content of a blog.\n- **Path Parameters**:\n  - `id` (int): ID of the blog.\n- **Request Body**: `BlogDTO` object\n  - **Fields**:\n    - `title` (String): Title of the blog.\n    - `content` (String): Content of the blog.\n- **Response**:\n  - **200 OK**: `BlogDTO` object with the updated blog.\n  - **404 Not Found**: If the blog with the specified ID is not found.\n\n### Delete Blog\n\n- **Endpoint**: `DELETE /api/v1/blogs/delete/{id}`\n- **Description**: Deletes a blog by its ID.\n- **Path Parameters**:\n  - `id` (int): ID of the blog.\n- **Response**:\n  - **200 OK**: Blog deleted successfully.\n  - **404 Not Found**: If the blog with the specified ID is not found.\n\n## Author API\n\n### Get All Authors\n\n- **Endpoint**: `GET /api/v1/authors`\n- **Description**: Retrieves a list of all authors.\n- **Response**:\n  - **200 OK**: List of `AuthorDTO` objects.\n\n### Get Author By First Name\n\n- **Endpoint**: `GET /api/v1/authors/name`\n- **Description**: Retrieves an author by their first name.\n- **Request Parameters**:\n  - `firstName` (String): First name of the author.\n- **Response**:\n  - **200 OK**: `AuthorDTO` object.\n  - **404 Not Found**: If the author with the specified first name is not found.\n\n### Get Author By ID\n\n- **Endpoint**: `GET /api/v1/authors/{id}`\n- **Description**: Retrieves an author by their ID.\n- **Path Parameters**:\n  - `id` (Long): ID of the author.\n- **Response**:\n  - **200 OK**: `AuthorDTO` object.\n  - **404 Not Found**: If the author with the specified ID is not found.\n\n### Save Author\n\n- **Endpoint**: `POST /api/v1/authors`\n- **Description**: Registers a new author.\n- **Request Body**: `AuthorDTO` object\n  - **Fields**:\n    - `id` (Long): Unique ID of the author.\n    - `name` (String): Name of the author.\n    - `email` (String): Email of the author.\n- **Response**:\n  - **201 Created**: `AuthorDTO` object with the created author.\n\n### Update Author Data\n\n- **Endpoint**: `PUT /api/v1/authors/edit/{id}`\n- **Description**: Updates an author's data.\n- **Path Parameters**:\n  - `id` (Long): ID of the author.\n- **Request Body**: `AuthorDTO` object\n  - **Fields**:\n    - `name` (String): Name of the author.\n    - `email` (String): Email of the author.\n- **Response**:\n  - **200 OK**: `AuthorDTO` object with the updated author.\n  - **404 Not Found**: If the author with the specified ID is not found.\n\n### Delete Author\n\n- **Endpoint**: `DELETE /api/v1/authors/delete/{id}`\n- **Description**: Deletes an author by their ID.\n- **Path Parameters**:\n  - `id` (Long): ID of the author.\n- **Response**:\n  - **200 OK**: Author deleted successfully.\n  - **404 Not Found**: If the author with the specified ID is not found.\n\n\n\n\n### Blog Post React.Js: https://github.com/ahmedrafat-SW/Personal-Blog\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fahmedrafat-sw%2Fblog-posts-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fahmedrafat-sw%2Fblog-posts-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fahmedrafat-sw%2Fblog-posts-api/lists"}