chemist-preprocessor-0.1.0.0: Chemist Raw Data Preprocessor
Safe HaskellSafe-Inferred
LanguageHaskell2010

API.Endpoints

Description

Module defining the API endpoints for the application using the Servant library.

This module provides handlers for various endpoints that interact with the underlying domain services to perform operations related to reactions, mechanisms, paths, and health checks of the Neo4j database.

Reactions

GET /reaction/{id}

Fetches details of a reaction by its identifier.

Parameters:

  • id: ReactionID - The unique identifier (Int) of the reaction to retrieve.

Response Body: ReactionDetails

POST /reaction

Creates a new reaction with the provided details.

Body:

Response: Reaction

DELETE /reaction/{id}

Deletes a reaction by its identifier.

Parameters:

  • id: ReactionID - The unique identifier of the reaction to delete (Int).

Response: ReactionID

Paths

GET /path/{start}/{end}

Retrieves the shortest path between two molecules.

Parameters:

Response: PathMask

Mechanisms

GET /mechanism/{id}

Fetches details of a mechanism by its identifier.

Parameters:

  • id: MechanismID - The unique identifier (Int) of the mechanism to retrieve.

Response: MechanismDetails

Processes

GET /process/{id}

Retrieves complete information about a reaction, including its mechanism, if available.

Parameters:

  • id: ReactionID - The unique identifier (Int) of the reaction to retrieve complete information.

Response: ProcessDetails

Checks

GET /health

Returns the health status of the Neo4j database.

Response: HealthCheck

Documentation

api :: Proxy API #

server :: Server API #