Statistics
| Branch: | Tag: | Revision:

root / snf-astakos-app / astakos / im / templates / im / api_access_base.html @ 469c4392

History | View | Annotate | Download (3.9 kB)

1
{% extends "im/account_base.html" %}
2
{% load filters %}
3

    
4
{% block page.body %}
5
<div class="api-access-view">
6
    <div class="subsection">
7
    {% block page.body.title %}
8
    <h2>API ACCESS</h2>
9
    {% endblock %}
10
    {% block page.body.description %}
11
    <p>
12
    {{ BRANDING_SERVICE_NAME }} provides a complete REST API that allows you to access and
13
    control your virtual resources programmatically. This means you can execute
14
    all the actions you do from the {{ BRANDING_SERVICE_NAME }} Web UI by using a command
15
    line client or importing the corresponding library inside your own code. If
16
    you want to learn more about the specification of the REST API itself,
17
    please take a look at the <a href="https://www.synnefo.org/docs" 
18
    alt="Synnefo documentation">Synnefo documentation</a>. 
19
    </p>
20
    {% endblock %}
21
    </div>
22
    
23
    <div class="subsection">
24
    {% block page.body.token %}
25
    <h2>API details</h2>
26
    <p>
27
    To use {{ BRANDING_SERVICE_NAME }} via its REST API the only things you will need is your
28
    Authentication Token and the Identity Service's public URL, which you can
29
    find right below.
30
    <br />
31
    <br />
32
    </p>
33
    <div class="token-view">
34
        <div class="detail small clearfix">
35
            <span class="title">Authentication url</span>
36
            <input type="text" value="{{ token_url }}" disabled 
37
        </div
38
        <div ="detail ">
39
            <span class="title">API Token</span>
40
            <input type="text" value="{{ request.user.auth_token }}" disabled 
41
            <span ="expires">
42
                <span class="date">
43
                    expires in {{ request.user.auth_token_expires|timeuntil }}
44
                    ({{ request.user.auth_token_expires|date }})
45
                </span>
46
            </span>
47
<span class="extra-img" id="token-span">&nbsp;</span>
48
        </div>
49
        <p class="sub">Make sure to set the new token in any client you may be using each
50
        time you renew your token.</p>
51
    </div>
52
    {% endblock %}
53
</div>
54

    
55
    <div class="subsection api-clients">
56
    {% block page.body.clients %}
57
    <h2>Kamaki</h2>
58
    <p>
59
    <a href="{{ client_url }}" alt="kamaki">Kamaki</a> is the official
60
    {{ BRANDING_SERVICE_NAME }} command line client. You can use it to control your virtual
61
    resources from the command line or use it inside your scripts. Kamaki allows
62
    you to execute all the operations you do from the Web UI. You can use kamaki
63
    to register images, spawn clusters of customized VMs, connect them to
64
    Private Virtual Networks, have them executing computations dynamically and
65
    many other neat things. Kamaki is available for most Linux distributions,
66
    Windows and Mac OS X. To use it you will need to set it up using your
67
    Authentication Token and the Identity Service's public URL, found above. To
68
    learn more about kamaki and how to install, configure and use, take a look
69
    at its <a href="http://www.synnefo.org/docs/kamaki/latest/index.html">corresponding page</a> </p>
70

    
71
    <p class="download">You can download kamaki 
72
    from the <a href="{{ client_url }}">project homepage</a></p>
73
    {% endblock %}
74
    </div>
75

    
76
    <div class="subsection api-advanced">
77
    {% block page.body.api_advanced %}
78
    <h2>API Advanced Usage</h2>
79
    <p>
80
    Apart from using the kamaki command line client, you can also import the
81
    kamaki library inside your code and use it directly. More details on how
82
    to do that on the corresponding kamaki 
83
    <a href="{{ client_url }}">kamaki </a>page. 
84
    You can also implement the REST API calls by yourself, without
85
    using the official kamaki library if you feel confident with your
86
    programming skills. To do so, you first need to get a good grasp of the
87
    API itself; for more information take a look at the corresponding page
88
    inside the 
89
    <a href="https://synnefo.org/docs/">Synnefo documentation</a>.
90
    </p>
91
    {% endblock %}
92
    </div>
93
</div>
94
</div>
95
{% endblock %}