Documentation Data

One of Alambic's main goal is to provide easy access to all data both retrieved and computed by plugins. This section explains what can be exported, and how.

Generic information

API scheme

Definition files for metrics, attributes, and quality model can be found at the following static URLs:

  • /models/metrics.json
  • /models/attributes.json
  • /models/qm.json
  • /models/qm_full.json

Information for projects can be retrieved using the following URLs:

  • Information: /projects/<project_id>/info.json
  • Metrics: /projects/<project_id>/metrics.json
  • Attributes: /projects/<project_id>/attributes.json
  • Recommendations: /projects/<project_id>/recs.json
  • Quality model (with values): /projects/<project_id>/qm_full.json

Figures are generated along the following URL: /projects/<project_id>/<plugin_id>/<figure>

Download files are generated along the following URL: /projects/<project_id>/<plugin_id>/<data.json>

Exporting figures

Visualisation plugins usually produce figures which can easily be re-used and embedded in external web sites. There are two types of exports available here: simple image files and html snippets. For each project and plugin the set of images generated is available through a unified interface: /projects/<project_id>/<plugin_id>/image_to_export. These url are permanent and automatically updated when the project is analysed.

Simple images (like png or svg) can be shared by simply retrieving the graphic url and embedding it in a classic <img src="http://alambic_server/projects/<project_id>/<plugin_id>/image_to_export"> image tag.

More advanced visualisations like interactive and js-based plots are presented as a html snippet which can be embedded in a <iframe src="http://alambic_server/projects/<project_id>/<plugin_id>/snippet_to_export"> tag. End-users will still have the ability to interact with the graph on the external web site since the js data is stored right in the html. Cool eh?

The image will be regenerated at every analysis and will be always up-to-date. See the examples on the Alambic web site for more detailed information and examples.

Project data

Page generated by Alambic 3.3.2 on Tue Sep 19 21:55:45 2017.