Skip to content

Bogdan-Zinovij/open-data-manage-system

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GitHub issues GitHub forks GitHub stars GitHub license GitHub license

ODMS REST API

Explore the docs ⇒

About the project

ODMS REST API - it's Node.js application which is created to model a communication with a simple web server and open data management system's database prototype and to perfom basic CRUD operations.

Built with

Installation

  1. Clone the repo:

    git clone https://github.com/KhrapkoVasyl/open-data-manage-system.git
  2. Open src/js directory and install NPM packages:

    npm install
  3. Got to src/js directory.

  4. Create a local instance of the database by executing Model.sql SQL script which is in src/sql directory.

  5. Create .env file and fill it with your own configuration data as follows:

    MYSQL_HOST=MYSQL_HOST
    MYSQL_PORT=MYSQL_PORT
    MYSQL_USER=MYSQL_USER
    MYSQL_PASS=MYSQL_PASS
    MYSQL_DB=omds
    FASTIFY_PORT=FASTIFY_PORT
    
  6. Start the application:

    npm start
  7. Run the tests:

    npm test

Usage

All of the requests should be executed on http://localhost:FASTIFY_PORT/

Open endpoints

Open endpoints require no Authentication.

Dataset related

Endpoints for viewing and manipulating datasets:

  • Create new dataset: POST /api/v1/dataset/
  • Get all available datasets: GET /api/v1/dataset/
  • Get dataset by id: GET /api/v1/dataset/:id/
  • Update dataset by id: GET /api/v1/dataset/:id/
  • Delete dataset by id: DELETE /api/v1/dataset/:id/

Category related

Endpoints for viewing and manipulating categories:

  • Create new category: POST /api/v1/category/
  • Get all available categories: GET /api/v1/category/
  • Get category by id: GET /api/v1/category/:id/
  • Update category by id: GET /api/v1/category/:id/
  • Delete category by id: DELETE /api/v1/category/:id/

Datafile related

Endpoints for viewing and manipulating datafiles:

  • Create new datafile: POST /api/v1/datafile/
  • Get all available datafiles: GET /api/v1/datafile/
  • Get datafile by id: GET /api/v1/datafile/:id/
  • Update datafile by id: GET /api/v1/datafile/:id/
  • Delete datafile by id: DELETE /api/v1/datafile/:id/

MetadataKey related

Endpoints for viewing and manipulating metadatakeys:

  • Create new metadatakey: POST /api/v1/metadatakey/
  • Get all available metadatakeys: GET /api/v1/metadatakey/
  • Get metadatakey by id: GET /api/v1/metadatakey/:id/
  • Update metadatakey by id: GET /api/v1/metadatakey/:id/
  • Delete metadatakey by id: DELETE /api/v1/metadatakey/:id/

License

Distributed under the MIT License. See LICENSE.txt for more information.

Contributors

About

Open Data Management System REST API

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 99.3%
  • Shell 0.7%