Skip to main content

Rest API

The backend functionalities are exposed to the client through a REST API, which provides endpoints for handling tables changes and query external services. The API structure is built following a three layers architecture:

  • Route: a route defines an API endpoint and it’s the highest layer in the architecture. The client side application interacts with routes to communicate with the backend.
  • Controller: a controller groups requests handlers of a common API resource. For example, a dataset controller provides handlers for requests that create, update, delete, search a dataset.
  • Service: a service contains the business logic of part of the application and it’s the lowest layer of the API architecture. Services are used throughout the whole application using composition. For example, a controller may use multiple services to handle the request from a client and return a response, e.g.: when the client sends a request to create a new table, a service might provide the function to parse the table to the internal format and then, another service is used to store the table on the file system.

Here is presented a list of all endpoints which are available at the moment of writing:

EndpointMethodReturn
/configGETConfiguration of dynamic services necessary for the setup of the UI
/extenders/listGETGet a list of all available extension services
/extenders/asia/geonamesPOSTExtend data with asia geonames
/extenders/asia/weatherPOSTExtend data with asia weather
/reconciliators/listGETGet a list of all available reconciliators services
/reconciliators/asia/geonamesPOSTReconciliate data with asia geonames
/reconciliators/asia/keywordsmatcherPOSTReconciliate data with asia keywords matcher
/reconciliators/asia/wikifierPOSTReconciliate data with asia wikifier
/reconciliators/wikidataPOSTReconciliate data with wikidata open refine
/full-annotation/mantis/dataset/:idDataset/table/:idTablePOSTAnnotation of a full table with Mantis service
/datasetGETList of all datasets
/dataset/:idDatasetGETReturn a dataset by its ID
/dataset/:idDataset/tableGETReturn all tables of a dataset
/dataset/:idDataset/table/:idTableGETReturn a table by its dataset ID and table ID
/dataset/:idDataset/table/:idTable/exportGETExport a table by a given format
/datasetPOSTCreate a new dataset
/:idDataset/table/:idTablePUTUpdate a table
/:idDatasetDELETEDelete a dataset
/:idDataset/table/:idTableDELETEDelete a table of a dataset