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 7763f5c6 Kostas Papadimitriou
{% extends "im/account_base.html" %}
2 7763f5c6 Kostas Papadimitriou
{% load filters %}
3 7763f5c6 Kostas Papadimitriou
4 14c76abe Kostas Papadimitriou
{% block headjs %}
5 14c76abe Kostas Papadimitriou
        {{ block.super }}         
6 14c76abe Kostas Papadimitriou
    <script>
7 14c76abe Kostas Papadimitriou
      var CHANGE_TOKEN_URL = '{% url update_token %}';
8 14c76abe Kostas Papadimitriou
    </script>        
9 14c76abe Kostas Papadimitriou
{% endblock %}        
10 14c76abe Kostas Papadimitriou
11 7763f5c6 Kostas Papadimitriou
{% block page.body %}
12 14c76abe Kostas Papadimitriou
<form>{% csrf_token %}</form>
13 7763f5c6 Kostas Papadimitriou
<div class="api-access-view">
14 7763f5c6 Kostas Papadimitriou
    <div class="subsection">
15 7763f5c6 Kostas Papadimitriou
    {% block page.body.title %}
16 dc868498 Olga Brani
        <h2>API ACCESS</h2>
17 7763f5c6 Kostas Papadimitriou
    {% endblock %}
18 7763f5c6 Kostas Papadimitriou
    {% block page.body.description %}
19 dc868498 Olga Brani
        <div class="two-cols dotted clearfix">
20 dc868498 Olga Brani
            <div class="rt">
21 dc868498 Olga Brani
                <p>
22 dc868498 Olga Brani
                If
23 dc868498 Olga Brani
                you want to learn more about the specification of the REST API itself,
24 dc868498 Olga Brani
                please take a look at the <a href="https://www.synnefo.org/docs" 
25 dc868498 Olga Brani
                alt="Synnefo documentation">Synnefo documentation</a>. 
26 dc868498 Olga Brani
                </p>
27 dc868498 Olga Brani
            </div>
28 dc868498 Olga Brani
            <div class="lt">
29 dc868498 Olga Brani
                <p>{{ BRANDING_SERVICE_NAME }} provides a complete REST API that allows you to access and
30 469c4392 Kostas Papadimitriou
    control your virtual resources programmatically. This means you can execute
31 469c4392 Kostas Papadimitriou
    all the actions you do from the {{ BRANDING_SERVICE_NAME }} Web UI by using a command
32 dc868498 Olga Brani
    line client or importing the corresponding library inside your own code.</p>
33 dc868498 Olga Brani
            </div>
34 dc868498 Olga Brani
35 dc868498 Olga Brani
        </div>
36 dc868498 Olga Brani
    
37 7763f5c6 Kostas Papadimitriou
    {% endblock %}
38 7763f5c6 Kostas Papadimitriou
    </div>
39 7763f5c6 Kostas Papadimitriou
    
40 dc868498 Olga Brani
    <div class="subsection dotted">
41 7763f5c6 Kostas Papadimitriou
    {% block page.body.token %}
42 dc868498 Olga Brani
        <h2>API details</h2>
43 dc868498 Olga Brani
        <p>
44 c9556cfc Vangelis Koukis
        To use {{ BRANDING_SERVICE_NAME }} via its REST API you will need the following Authentication URL
45 c9556cfc Vangelis Koukis
        and API token:<br /><br />
46 dc868498 Olga Brani
        </p>
47 dc868498 Olga Brani
        <div class="token-view">
48 948dd719 Olga Brani
            <div class="detail small clearfix"> 
49 c9556cfc Vangelis Koukis
                <span class="title">Authentication URL</span>
50 948dd719 Olga Brani
                <span id="dummy_token_url" class="dummy-input">&nbsp;</span>
51 948dd719 Olga Brani
                <input value="{{ token_url }}" type="text" name="token_url" disabled 
52 dc868498 Olga Brani
            </div
53 dc868498 Olga Brani
            <div ="detail ">
54 15f056df Olga Brani
                <div class="facts clearfix">
55 dc868498 Olga Brani
                    <span class="title">API Token</span>
56 948dd719 Olga Brani
                    <span id="dummy_auth_token" class="dummy-input">&nbsp;</span>
57 948dd719 Olga Brani
                    <input value="{{ request.user.auth_token }}" type="text" name="auth_token" disabled
58 dc868498 Olga Brani
                    <span ="expires">
59 dc868498 Olga Brani
                        <span class="date">
60 dc868498 Olga Brani
                            expires in {{ request.user.auth_token_expires|timeuntil }}
61 dc868498 Olga Brani
                            ({{ request.user.auth_token_expires|date }})
62 dc868498 Olga Brani
                        </span>
63 dc868498 Olga Brani
                    </span>
64 dc868498 Olga Brani
                </div>
65 dc868498 Olga Brani
                <div class="actions">
66 dc868498 Olga Brani
                    <div class="renew-token">
67 dc868498 Olga Brani
                        <a href="#" class="do">renew token</a>
68 dc868498 Olga Brani
                        <a href="#" class="confirm">confirm</a>
69 dc868498 Olga Brani
                        <a href="#" class="close">x</a>
70 c9556cfc Vangelis Koukis
                        <p class="sub">Every time you renew it, make sure to
71 c9556cfc Vangelis Koukis
                update the clients you use with the new token.</p>
72 dc868498 Olga Brani
                    </div>
73 dc868498 Olga Brani
                </div>
74 dc868498 Olga Brani
                
75 dc868498 Olga Brani
                
76 dc868498 Olga Brani
                <span class="extra-img" id="token-span">&nbsp;</span>
77 dc868498 Olga Brani
            </div>
78 dc868498 Olga Brani
            
79 7763f5c6 Kostas Papadimitriou
        </div>
80 dc868498 Olga Brani
        {% endblock %}
81 7763f5c6 Kostas Papadimitriou
    </div>
82 7763f5c6 Kostas Papadimitriou
83 dc868498 Olga Brani
   
84 dc868498 Olga Brani
    
85 dc868498 Olga Brani
    <div class="two-cols dotted clearfix">
86 dc868498 Olga Brani
        <div class="rt">
87 dc868498 Olga Brani
            {% block page.body.api_advanced %}
88 dc868498 Olga Brani
            <h2>API Advanced Usage</h2>
89 dc868498 Olga Brani
            <p>
90 dc868498 Olga Brani
            Apart from using the kamaki command line client, you can also import the
91 dc868498 Olga Brani
            kamaki library inside your code and use it directly. More details on how
92 dc868498 Olga Brani
            to do that on the corresponding kamaki 
93 dc868498 Olga Brani
            <a href="{{ client_url }}">kamaki </a>page.</p> 
94 dc868498 Olga Brani
            <p>You can also implement the REST API calls by yourself, without
95 dc868498 Olga Brani
            using the official kamaki library if you feel confident with your
96 dc868498 Olga Brani
            programming skills. To do so, you first need to get a good grasp of the
97 dc868498 Olga Brani
            API itself; for more information take a look at the corresponding page
98 dc868498 Olga Brani
            inside the 
99 dc868498 Olga Brani
            <a href="https://synnefo.org/docs/">Synnefo documentation</a>.
100 dc868498 Olga Brani
            </p>
101 dc868498 Olga Brani
            {% endblock %}
102 dc868498 Olga Brani
        </div>
103 dc868498 Olga Brani
        <div class="lt">
104 dc868498 Olga Brani
            {% block page.body.clients %}
105 dc868498 Olga Brani
            <h2>Kamaki</h2>
106 dc868498 Olga Brani
            <p><a href="{{ client_url }}" alt="kamaki">Kamaki</a> is the official
107 469c4392 Kostas Papadimitriou
    {{ BRANDING_SERVICE_NAME }} command line client. You can use it to control your virtual
108 dc868498 Olga Brani
    resources from the command line or use it inside your scripts.</p>
109 dc868498 Olga Brani
            <p>Kamaki allows you to execute all the operations you do from the Web UI. You can use kamaki to<br><br>
110 dc868498 Olga Brani
            - register images,<br>- spawn clusters of customized VMs,<br>- connect them to
111 dc868498 Olga Brani
    Private Virtual Networks,<br>- have them executing computations dynamically and
112 dc868498 Olga Brani
    many other neat things.</p>
113 dc868498 Olga Brani
            <p> Kamaki is available for most Linux distributions,
114 469c4392 Kostas Papadimitriou
    Windows and Mac OS X. To use it you will need to set it up using your
115 469c4392 Kostas Papadimitriou
    Authentication Token and the Identity Service's public URL, found above. To
116 469c4392 Kostas Papadimitriou
    learn more about kamaki and how to install, configure and use, take a look
117 dc868498 Olga Brani
    at its <a href="http://www.synnefo.org/docs/kamaki/latest/index.html">corresponding page</a>
118 dc868498 Olga Brani
            </p>
119 dc868498 Olga Brani
             <p class="download">You can download kamaki 
120 7763f5c6 Kostas Papadimitriou
    from the <a href="{{ client_url }}">project homepage</a></p>
121 dc868498 Olga Brani
    
122 dc868498 Olga Brani
        </div>
123 dc868498 Olga Brani
        {% endblock %}
124 469c4392 Kostas Papadimitriou
    </div>
125 7763f5c6 Kostas Papadimitriou
</div>
126 7763f5c6 Kostas Papadimitriou
{% endblock %}