Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
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:
details
:ReactionDetails
- The details of the reaction to create.
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:
start
:MoleculeID
- The starting molecule identifier (Int
).end
:MoleculeID
- The ending molecule identifier (Int
).
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