NODE api with postgres modelled for Chronos
Note : This is a WIP [Work in Progress]
Welcome to the Changelog API documentation! This API, built using the Express framework in Node.js, is designed to manage and track changes and updates for products within an application. Explore the following endpoints for various operations related to products, updates, and update points.
- Endpoint:
GET /product
- Description: Retrieve a list of all products.
- Endpoint:
GET /product/:id
- Description: Retrieve details for a specific product identified by its unique ID.
- Endpoint:
PUT /product/:id
- Description: Update product details. Requires a valid request body with the
name
property.
- Endpoint:
POST /product
- Description: Create a new product. Requires a valid request body with the
name
property.
- Endpoint:
DELETE /product/:id
- Description: Delete a product identified by its unique ID.
- Endpoint:
GET /update
- Description: Retrieve a list of all updates.
- Endpoint:
GET /update/:id
- Description: Retrieve details for a specific update identified by its unique ID.
- Endpoint:
PUT /update/:id
- Description: Update update details. Supports optional fields like
title
,body
,status
, andversion
.
- Endpoint:
POST /update
- Description: Create a new update. Requires a valid request body with
title
,body
, andproductId
.
- Endpoint:
DELETE /update/:id
- Description: Delete an update identified by its unique ID.
- Endpoint:
GET /updatepoint
- Description: Retrieve a list of all update points.
- Endpoint:
GET /updatepoint/:id
- Description: Retrieve details for a specific update point identified by its unique ID.
- Endpoint:
PUT /updatepoint/:id
- Description: Update update point details. Supports optional fields like
name
anddescription
.
- Endpoint:
POST /updatepoint
- Description: Create a new update point. Requires a valid request body with
name
,description
, andupdateId
.
- Endpoint:
DELETE /updatepoint/:id
- Description: Delete an update point identified by its unique ID.
The API provides basic error handling for server errors. In case of an error, a JSON response with a generic error message is returned.
The API uses Express Validator for input validation and a custom middleware (handleInputErrors
) to handle input validation errors.
To get started with the Changelog API, clone the repository and follow the setup instructions in the project's README. Explore the codebase and use the provided endpoints to manage and track changes in your application.
The Changelog API simplifies the process of tracking and managing product updates. Use the provided endpoints to interact with the API and enhance the change management process in your application.