Mediaflux API

Mediaflux can be accessed programmatically via various Application Programming Interfaces (APIs). Mediaflux is a service-oriented architecture - pretty much everything you do with it executes a service in the Mediaflux server. However, to access those services, you need a client, such as Desktop (Browser, HTTPS Protocol) (browser based client) or Mediaflux Explorer (HTTPS Protocol) (Java GUI client).

It's also possible to reach all of the service layer with clients via:

  • Java - the Java API is provided by Arcitecta through a .jar file. One can write and execute Java clients that use this directly.
  • Bash - a Java client is generally wrapped in a script for execution. It is very common to wrap them in a Unix script via a shell like Bash.
    • A specific Java client that is supplied with Mediaflux is aterm (Java command line client). It is also very common to wrap aterm commands in Bash scripts for convenience, or even just type them dynamically into a Bash shell terminal window.
  • Tcl - Tcl scripts can be executed via the aterm client. aterm has a built in Tcl interpreter so this is a powerful and easy way to script with the Mediaflux service layer.  Tcl scripts can be sourced from the aterm GUI or run using aterm in nogui mode.
  • Python - a Python module is provided by Research Computing Services. It allows native Python scripting to work with the Mediaflux API

Bash Scripting with aterm

Tcl Scripting with aterm

  • Run the aterm application
  • Write your Tcl script
  • Execute the script with aterm

    ATERM> source <path to script>/<name of script>.tcl