Skip to content

Lightweight API for storing, retrieving, and managing data along with automated versioning.

Notifications You must be signed in to change notification settings

vixhnuchandran/Versix

Repository files navigation

Versix API

Lightweight API for storing, retrieving, and managing data along with automated versioning.

Installation

  1. Clone the repository:
 git clone https://github.com/vixhnuchandran/Versix 
 cd Versix 

delete my project 2. Install dependencies:

 pnpm install
  1. Set up environment variables:
 PORT=8484
  1. Build:
 pnpm run build
  1. Start the server:
 pnpm start

Auth Header

  X-Api-Key: <apiKey>

Endpoints

Set Data

  • URL: /api/set-data

  • Method: POST

  • Description: Create and store data.

  • Request Body:

    • id: Identifier for the record.
    • name: The name of the data source.
    • data: The data in JSON format.
    {
      "id" : <str: id>,
      "name" : <str: name>
      "data" : <obj: data>
    }
    
  • Response: Returns the Data added successfully, or an error message if unsuccessful.

Get Data

  • URL: /api/get-data

  • Method: POST

  • Description: Retrieves data.

  • Request Body:

    • id: Identifier for the record.
    • name: The name of the data source.
    • version (optional): The data in JSON format.
    {
      "id" : <str: id>,
      "name" : <str: name>
      "version" : <int: version>
    }
    
  • Response: Returns the requested data if found, or an error message if not found.

Has Data

  • URL: /api/has-data

  • Method: POST

  • Description: Check if data exist.

  • Request Body:

    • id: Identifier for the record.
    • name: The name of the data source.
    {
      "id" : <str: id>,
      "name" : <str: name>
    }
    
  • Response: Returns the requested data if found, or an error message if not found.

About

Lightweight API for storing, retrieving, and managing data along with automated versioning.

Resources

Stars

Watchers

Forks