Introduction

Dédalo stores all data in a private PostgreSQL DB only accessible by the back-end.
When it is needed to publish some of the data stored, Dédalo is able to do that through a publication tool (Dédalo diffusion engine).
One of the most used publication services is the SQL publication format, and generally, these published data will be stored in a MySQL or MariaDB database. This database is accessible through Dédalo's Public API.

The purpose of this document is to guide you through the different available methods in the API, explaining every option and showing you how to use them with examples, code snippets and much more.

Dédalo diffusion engine

It manages Dédalo's diffusion schema and data.

Dédalo to publish data to other databases or files using an ontology map that defines what sections and fields will be exported.


Output could be targeted to another (or the same) database or to RDF files.
The most common scenario is to publish the data in a separate MySQL database.
All the published data is intentionally published by the administrators and therefore, the destination database can be used for consultation without compromising the original data stored in the Dédalo working database.
Dédalo has some configurations already prepared for use as Oral History, Bibliography or Web, but you can build others, following the already existing elements patterns.
Each element of the ontology has several parameters that define the characteristics and the output format of the field in the MySQL table.
For example, the column name, the column type (varchar, text, int, date, etc.) the output processing (diffusion methods to post process the data), etc.
This guide is not intended to be exhaustive on custom definitions and published data processing, because we need your help here ;-)

Dédalo Publication Server API

It manages the public server request using a REST interface.

The publication server API can be hosted in the same Dédalo server or in another server used to create a website.
Publication server files are placed by default in Dédalo file structure at:

../httpdocs/dedalo/lib/dedalo/publication/server_api

but, you can move or copy this folder to another location or server. The only requirement to function is to allow access to the public database and media files.

Requests must be made to:

http://mydomain.org/my_path/server_api/v1/json/

Example to get a list with all available tables in the database:

http://mydomain.org/my_path/server_api/v1/json/tables_info?code=XXXX

The manager receives http requests from the public site, processes them and returns the data in JSON format.
Requests could be made with javascript, php, perl or any language capable of managing REST using json headers.

Some examples of configuration and use:

Let's go!

Set up Dédalo Publication API configuration files

 

Dédalo Publication API configuration

 

Documentation interactive user interface

Dédalo provides developers with an interactive interface to create request calls and check different parameters.

It is based on Open API Swagger UI