Statistics
| Branch: | Tag: | Revision:

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

History | View | Annotate | Download (5 kB)

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

    
4
{% block headjs %}
5
        {{ block.super }}         
6
    <script>
7
      var CHANGE_TOKEN_URL = '{% url update_token %}';
8
    </script>        
9
{% endblock %}        
10

    
11
{% block page.body %}
12
<form>{% csrf_token %}</form>
13
<div class="api-access-view">
14
    <div class="subsection">
15
    {% block page.body.title %}
16
        <h2>API ACCESS</h2>
17
    {% endblock %}
18
    {% block page.body.description %}
19
        <div class="two-cols dotted clearfix">
20
            <div class="rt">
21
                <p>
22
                If
23
                you want to learn more about the specification of the REST API itself,
24
                please take a look at the <a href="https://www.synnefo.org/docs" 
25
                alt="Synnefo documentation">Synnefo documentation</a>. 
26
                </p>
27
            </div>
28
            <div class="lt">
29
                <p>{{ BRANDING_SERVICE_NAME }} provides a complete REST API that allows you to access and
30
    control your virtual resources programmatically. This means you can execute
31
    all the actions you do from the {{ BRANDING_SERVICE_NAME }} Web UI by using a command
32
    line client or importing the corresponding library inside your own code.</p>
33
            </div>
34

    
35
        </div>
36
    
37
    {% endblock %}
38
    </div>
39
    
40
    <div class="subsection dotted">
41
    {% block page.body.token %}
42
        <h2>API details</h2>
43
        <p>
44
        To use {{ BRANDING_SERVICE_NAME }} via its REST API you will need the following Authentication URL
45
        and API token:<br /><br />
46
        </p>
47
        <div class="token-view">
48
            <div class="detail small clearfix">
49
                <span class="title">Authentication URL</span>
50
                <input type="text" value="{{ token_url }}" disabled 
51
            </div
52
            <div ="detail ">
53
                <div class="facts clearfix">
54
                    <span class="title">API Token</span>
55
                    <input type="text" value="{{ request.user.auth_token }}" disabled 
56
                    <span ="expires">
57
                        <span class="date">
58
                            expires in {{ request.user.auth_token_expires|timeuntil }}
59
                            ({{ request.user.auth_token_expires|date }})
60
                        </span>
61
                    </span>
62
                </div>
63
                <div class="actions">
64
                    <div class="renew-token">
65
                        <a href="#" class="do">renew token</a>
66
                        <a href="#" class="confirm">confirm</a>
67
                        <a href="#" class="close">x</a>
68
                        <p class="sub">Every time you renew it, make sure to
69
                update the clients you use with the new token.</p>
70
                    </div>
71
                </div>
72
                
73
                
74
                <span class="extra-img" id="token-span">&nbsp;</span>
75
            </div>
76
            
77
        </div>
78
        {% endblock %}
79
    </div>
80

    
81
   
82
    
83
    <div class="two-cols dotted clearfix">
84
        <div class="rt">
85
            {% block page.body.api_advanced %}
86
            <h2>API Advanced Usage</h2>
87
            <p>
88
            Apart from using the kamaki command line client, you can also import the
89
            kamaki library inside your code and use it directly. More details on how
90
            to do that on the corresponding kamaki 
91
            <a href="{{ client_url }}">kamaki </a>page.</p> 
92
            <p>You can also implement the REST API calls by yourself, without
93
            using the official kamaki library if you feel confident with your
94
            programming skills. To do so, you first need to get a good grasp of the
95
            API itself; for more information take a look at the corresponding page
96
            inside the 
97
            <a href="https://synnefo.org/docs/">Synnefo documentation</a>.
98
            </p>
99
            {% endblock %}
100
        </div>
101
        <div class="lt">
102
            {% block page.body.clients %}
103
            <h2>Kamaki</h2>
104
            <p><a href="{{ client_url }}" alt="kamaki">Kamaki</a> is the official
105
    {{ BRANDING_SERVICE_NAME }} command line client. You can use it to control your virtual
106
    resources from the command line or use it inside your scripts.</p>
107
            <p>Kamaki allows you to execute all the operations you do from the Web UI. You can use kamaki to<br><br>
108
            - register images,<br>- spawn clusters of customized VMs,<br>- connect them to
109
    Private Virtual Networks,<br>- have them executing computations dynamically and
110
    many other neat things.</p>
111
            <p> Kamaki is available for most Linux distributions,
112
    Windows and Mac OS X. To use it you will need to set it up using your
113
    Authentication Token and the Identity Service's public URL, found above. To
114
    learn more about kamaki and how to install, configure and use, take a look
115
    at its <a href="http://www.synnefo.org/docs/kamaki/latest/index.html">corresponding page</a>
116
            </p>
117
             <p class="download">You can download kamaki 
118
    from the <a href="{{ client_url }}">project homepage</a></p>
119
    
120
        </div>
121
        {% endblock %}
122
    </div>
123
</div>
124
{% endblock %}