Statistics
| Branch: | Tag: | Revision:

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

History | View | Annotate | Download (5.2 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
                <span id="dummy_token_url" class="dummy-input">&nbsp;</span>
51
                <input value="{{ token_url }}" type="text" name="token_url" disabled 
52
            </div
53
            <div ="detail ">
54
                <div class="facts clearfix">
55
                    <span class="title">API Token</span>
56
                    <span id="dummy_auth_token" class="dummy-input">&nbsp;</span>
57
                    <input value="{{ request.user.auth_token }}" type="text" name="auth_token" disabled
58
                    <span ="expires">
59
                        <span class="date">
60
                            expires in {{ request.user.auth_token_expires|timeuntil }}
61
                            ({{ request.user.auth_token_expires|date }})
62
                        </span>
63
                    </span>
64
                </div>
65
                <div class="actions">
66
                    <div class="renew-token">
67
                        <a href="#" class="do">renew token</a>
68
                        <a href="#" class="confirm">confirm</a>
69
                        <a href="#" class="close">x</a>
70
                        <p class="sub">Every time you renew it, make sure to
71
                update the clients you use with the new token.</p>
72
                    </div>
73
                </div>
74
                
75
                
76
                <span class="extra-img" id="token-span">&nbsp;</span>
77
            </div>
78
            
79
        </div>
80
        {% endblock %}
81
    </div>
82

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