{% extends "layouts/content-bootstrap.html" %} {% load i18n %} {% block title %} {{ block.super }} | {% trans "XML-RPC" %} {% endblock %} {% block breadcrumbs %} {{ block.super }}
  • {% trans "LAVA" %}
  • {% trans "API" %}
  • {% trans "Available Methods" %}
  • {% endblock %} {% block navigation %}
    {% endblock %} {% block content %}

    About XML-RPC API

    LAVA Server offers API services as an XML-RPC server. You can interact with it using any XML-RPC client. For example, in python you can do this:

    import xmlrpclib
    server = xmlrpclib.ServerProxy("{{ site_url }}{% url 'lava.api_handler' %}")
    print server.system.listMethods()
    

    The following python code shows how to authenticate using an XML-RPC client, when a method requires authentication.

      import xmlrpclib
      username = "USERNAME"
      token = "TOKEN_STRING"
      hostname = "HOSTNAME"
      server = xmlrpclib.ServerProxy("http://%s:%s@%s{% url 'lava.api_handler' %}" % (username, token, hostname))
      print server.system.listMethods()
    

    NOTE: USERNAME is a valid username in this LAVA instance. TOKEN_STRING is a valid token associated with the above username in this LAVA instance. HOSTNAME is the fully qualified domain name or IP address of this LAVA instance.

    In the above code snippet the ServerProxy string is constructed from different components, with separators, which are clearly illustrated as follows:
    USERNAME:TOKEN_STRING@HOSTNAME/HANDLER

    WARNING: https:// scheme is preferred as some calls require authentication.

    Available functions

    Dashboard

    {% for method in methods.dashboard %} [ {{ method.name }} ] {% endfor %}

    Scheduler

    {% for method in methods.scheduler %} [ {{ method.name }} ] {% endfor %}

    Results

    {% for method in methods.results %} [ {{ method.name }} ] {% endfor %}

    System and Authentication

    {% for method in methods.system %} [ {{ method.name }} ] {% endfor %}
    {% for method in methods.dashboard %}

    {{ method.name }}

    {{ method.help }}
    Available functions
    {% endfor %} {% for method in methods.scheduler %}

    {{ method.name }}

    {{ method.help }}
    Available functions
    {% endfor %} {% for method in methods.results %}

    {{ method.name }}

    {{ method.help }}
    Available functions
    {% endfor %} {% for method in methods.system %}

    {{ method.name }}

    {{ method.help }}
    Available functions
    {% endfor %} {% endblock %}