Statistics
| Branch: | Tag: | Revision:

root / docs / astakos-api-guide.rst @ 9e20fcee

History | View | Annotate | Download (14.1 kB)

1 5d2e61ec Sofia Papagiannaki
Astakos API
2 8f9976c6 Constantinos Venetsanopoulos
===========
3 8f9976c6 Constantinos Venetsanopoulos
4 8f9976c6 Constantinos Venetsanopoulos
This is Astakos API guide.
5 8f9976c6 Constantinos Venetsanopoulos
6 8f9976c6 Constantinos Venetsanopoulos
Overview
7 8f9976c6 Constantinos Venetsanopoulos
--------
8 8f9976c6 Constantinos Venetsanopoulos
9 8f9976c6 Constantinos Venetsanopoulos
10 53d6886e Sofia Papagiannaki
Astakos service co-ordinates the access to resources (and the subsequent
11 53d6886e Sofia Papagiannaki
permission model) and acts as the single point of registry and entry to the
12 53d6886e Sofia Papagiannaki
GRNET cloud services.
13 8f9976c6 Constantinos Venetsanopoulos
14 8f9976c6 Constantinos Venetsanopoulos
This document's goals is to describe the APIs to the outer world.
15 8f9976c6 Constantinos Venetsanopoulos
Make sure you have read the :ref:`astakos` general architecture first.
16 8f9976c6 Constantinos Venetsanopoulos
17 8f9976c6 Constantinos Venetsanopoulos
Document Revisions
18 8f9976c6 Constantinos Venetsanopoulos
^^^^^^^^^^^^^^^^^^
19 8f9976c6 Constantinos Venetsanopoulos
20 8f9976c6 Constantinos Venetsanopoulos
=========================  ================================
21 8f9976c6 Constantinos Venetsanopoulos
Revision                   Description
22 8f9976c6 Constantinos Venetsanopoulos
=========================  ================================
23 890c2065 Sofia Papagiannaki
0.13 (January 21, 2013)    Extend api to export user presentation & quota information.
24 949f8393 Sofia Papagiannaki
0.6 (June 06, 2012)        Split service and admin API.
25 8f9976c6 Constantinos Venetsanopoulos
0.1 (Feb 10, 2012)         Initial release.
26 8f9976c6 Constantinos Venetsanopoulos
=========================  ================================
27 8f9976c6 Constantinos Venetsanopoulos
28 890c2065 Sofia Papagiannaki
Get Services
29 890c2065 Sofia Papagiannaki
^^^^^^^^^^^^
30 949f8393 Sofia Papagiannaki
31 890c2065 Sofia Papagiannaki
Returns a json formatted list containing information about the supported cloud services.
32 949f8393 Sofia Papagiannaki
33 890c2065 Sofia Papagiannaki
==================== =========  ==================
34 890c2065 Sofia Papagiannaki
Uri                  Method     Description
35 890c2065 Sofia Papagiannaki
==================== =========  ==================
36 890c2065 Sofia Papagiannaki
``/im/get_services`` GET        Get cloud services
37 890c2065 Sofia Papagiannaki
==================== =========  ==================
38 8f9976c6 Constantinos Venetsanopoulos
39 890c2065 Sofia Papagiannaki
Example reply:
40 8f9976c6 Constantinos Venetsanopoulos
41 890c2065 Sofia Papagiannaki
::
42 8f9976c6 Constantinos Venetsanopoulos
43 890c2065 Sofia Papagiannaki
    [{"url": "/", "icon": "home-icon.png", "name": "grnet cloud", "id": "1"},
44 890c2065 Sofia Papagiannaki
    {"url": "/okeanos.html", "name": "~okeanos", "id": "2"},
45 890c2065 Sofia Papagiannaki
    {"url": "/ui/", "name": "pithos+", "id": "3"}]
46 890c2065 Sofia Papagiannaki
47 890c2065 Sofia Papagiannaki
48 890c2065 Sofia Papagiannaki
Get Menu
49 890c2065 Sofia Papagiannaki
^^^^^^^^
50 890c2065 Sofia Papagiannaki
51 890c2065 Sofia Papagiannaki
Returns a json formatted list containing the cloud bar links.
52 8f9976c6 Constantinos Venetsanopoulos
53 8f9976c6 Constantinos Venetsanopoulos
==================== =========  ==================
54 8f9976c6 Constantinos Venetsanopoulos
Uri                  Method     Description
55 8f9976c6 Constantinos Venetsanopoulos
==================== =========  ==================
56 890c2065 Sofia Papagiannaki
``/im/get_menu``     GET        Get cloud bar menu
57 8f9976c6 Constantinos Venetsanopoulos
==================== =========  ==================
58 8f9976c6 Constantinos Venetsanopoulos
59 890c2065 Sofia Papagiannaki
Example reply if request user is not authenticated:
60 8f9976c6 Constantinos Venetsanopoulos
61 890c2065 Sofia Papagiannaki
::
62 8f9976c6 Constantinos Venetsanopoulos
63 890c2065 Sofia Papagiannaki
    [{"url": "/im/", "name": "Sign in"}]
64 8f9976c6 Constantinos Venetsanopoulos
65 890c2065 Sofia Papagiannaki
Example reply if request user is authenticated:
66 8f9976c6 Constantinos Venetsanopoulos
67 8f9976c6 Constantinos Venetsanopoulos
::
68 8f9976c6 Constantinos Venetsanopoulos
69 890c2065 Sofia Papagiannaki
    [{"url": "/im/login", "name": "user@example.com"},
70 890c2065 Sofia Papagiannaki
    {"url": "/im/profile", "name": "My account"},
71 890c2065 Sofia Papagiannaki
    {"url": "/im/logout", "name": "Sign out"}]
72 8f9976c6 Constantinos Venetsanopoulos
73 890c2065 Sofia Papagiannaki
Admin API Operations
74 890c2065 Sofia Papagiannaki
--------------------
75 8f9976c6 Constantinos Venetsanopoulos
76 5d2e61ec Sofia Papagiannaki
The operations described in this chapter allow users to authenticate themselves, send feedback and get user uuid/displayname mappings.
77 8f9976c6 Constantinos Venetsanopoulos
78 5d2e61ec Sofia Papagiannaki
All the operations require a valid user token.
79 949f8393 Sofia Papagiannaki
80 890c2065 Sofia Papagiannaki
.. _authenticate-api-label:
81 890c2065 Sofia Papagiannaki
82 890c2065 Sofia Papagiannaki
Authenticate
83 890c2065 Sofia Papagiannaki
^^^^^^^^^^^^
84 949f8393 Sofia Papagiannaki
85 890c2065 Sofia Papagiannaki
Authenticate API requests require a token. An application that wishes to connect to Astakos, but does not have a token, should redirect the user to ``/login``. (see :ref:`authentication-label`)
86 890c2065 Sofia Papagiannaki
87 890c2065 Sofia Papagiannaki
==================== =========  ==================
88 890c2065 Sofia Papagiannaki
Uri                  Method     Description
89 890c2065 Sofia Papagiannaki
==================== =========  ==================
90 890c2065 Sofia Papagiannaki
``/im/authenticate`` GET        Authenticate user using token
91 890c2065 Sofia Papagiannaki
==================== =========  ==================
92 949f8393 Sofia Papagiannaki
93 949f8393 Sofia Papagiannaki
|
94 949f8393 Sofia Papagiannaki
95 949f8393 Sofia Papagiannaki
====================  ===========================
96 949f8393 Sofia Papagiannaki
Request Header Name   Value
97 949f8393 Sofia Papagiannaki
====================  ===========================
98 890c2065 Sofia Papagiannaki
X-Auth-Token          User authentication token
99 949f8393 Sofia Papagiannaki
====================  ===========================
100 949f8393 Sofia Papagiannaki
101 949f8393 Sofia Papagiannaki
|
102 949f8393 Sofia Papagiannaki
103 949f8393 Sofia Papagiannaki
======================  =========================
104 949f8393 Sofia Papagiannaki
Request Parameter Name  Value
105 949f8393 Sofia Papagiannaki
======================  =========================
106 890c2065 Sofia Papagiannaki
usage                    (optional)
107 949f8393 Sofia Papagiannaki
======================  =========================
108 949f8393 Sofia Papagiannaki
109 890c2065 Sofia Papagiannaki
Extended information on the user serialized in the json format will be returned:
110 949f8393 Sofia Papagiannaki
111 890c2065 Sofia Papagiannaki
===========================  ============================
112 890c2065 Sofia Papagiannaki
Name                         Description
113 890c2065 Sofia Papagiannaki
===========================  ============================
114 890c2065 Sofia Papagiannaki
displayname                     User displayname
115 890c2065 Sofia Papagiannaki
uuid                         User unique identifier
116 890c2065 Sofia Papagiannaki
email                        List with user emails
117 890c2065 Sofia Papagiannaki
name                         User full name
118 890c2065 Sofia Papagiannaki
auth_token_created           Token creation date
119 890c2065 Sofia Papagiannaki
auth_token_expires           Token expiration date
120 890c2065 Sofia Papagiannaki
usage                        List of user resource usage (if usage request parameter is present)
121 890c2065 Sofia Papagiannaki
===========================  ============================
122 949f8393 Sofia Papagiannaki
123 890c2065 Sofia Papagiannaki
Example reply without `usage` request parameter:
124 949f8393 Sofia Papagiannaki
125 949f8393 Sofia Papagiannaki
::
126 949f8393 Sofia Papagiannaki
127 890c2065 Sofia Papagiannaki
  {"id": "12",
128 890c2065 Sofia Papagiannaki
  "displayname": "user@example.com",
129 890c2065 Sofia Papagiannaki
  "uuid": "a9dc21d2-bcb2-4104-9a9e-402b7c70d6d8",
130 890c2065 Sofia Papagiannaki
  "email": "[user@example.com]",
131 890c2065 Sofia Papagiannaki
  "name": "Firstname Lastname",
132 890c2065 Sofia Papagiannaki
  "auth_token_created": "Wed, 30 May 2012 10:03:37 GMT",
133 890c2065 Sofia Papagiannaki
  "auth_token_expires": "Fri, 29 Jun 2012 10:03:37 GMT"}
134 949f8393 Sofia Papagiannaki
135 890c2065 Sofia Papagiannaki
Example reply with `usage` request parameter:
136 949f8393 Sofia Papagiannaki
137 890c2065 Sofia Papagiannaki
::
138 949f8393 Sofia Papagiannaki
139 890c2065 Sofia Papagiannaki
  {"id": "12",
140 890c2065 Sofia Papagiannaki
  "displayname": "user@example.com",
141 890c2065 Sofia Papagiannaki
  "uuid": "a9dc21d2-bcb2-4104-9a9e-402b7c70d6d8",
142 890c2065 Sofia Papagiannaki
  "email": "[user@example.com]",
143 890c2065 Sofia Papagiannaki
  "name": "Firstname Lastname",
144 890c2065 Sofia Papagiannaki
  "auth_token_created": "Wed, 30 May 2012 10:03:37 GMT",
145 890c2065 Sofia Papagiannaki
  "auth_token_expires": "Fri, 29 Jun 2012 10:03:37 GMT",
146 890c2065 Sofia Papagiannaki
  "usage": [{"currValue": 4536392,
147 890c2065 Sofia Papagiannaki
             "display_name": "Storage Space",
148 890c2065 Sofia Papagiannaki
             "description": "Pithos account diskspace",
149 890c2065 Sofia Papagiannaki
             "verbose_name": "Storage Space",
150 890c2065 Sofia Papagiannaki
             "help_text_input_each": "This is the total amount of space on Pithos that will be granted to each user of this Project ", "maxValue": 5368710653,
151 890c2065 Sofia Papagiannaki
             "pluralized_display_name": "Storage Space",
152 890c2065 Sofia Papagiannaki
             "report_desc": "Storage Space",
153 890c2065 Sofia Papagiannaki
             "help_text": "This is the space on Pithos for storing files and VM Images. ",
154 890c2065 Sofia Papagiannaki
             "is_abbreviation": false,
155 890c2065 Sofia Papagiannaki
             "placeholder": "eg. 10GB",
156 890c2065 Sofia Papagiannaki
             "unit": "bytes",
157 890c2065 Sofia Papagiannaki
             "name": "pithos+.diskspace"},
158 890c2065 Sofia Papagiannaki
            {"currValue": 0,
159 890c2065 Sofia Papagiannaki
             "display_name": "System Disk",
160 890c2065 Sofia Papagiannaki
             "description": "Virtual machine disk size",
161 890c2065 Sofia Papagiannaki
             "verbose_name": "System Disk",
162 890c2065 Sofia Papagiannaki
             "help_text_input_each": "This is the total amount of System Disk that will be granted to each user of this Project (this refers to the total System Disk of all VMs, not each VM's System Disk)  ",
163 890c2065 Sofia Papagiannaki
             "maxValue": 53687091200,
164 890c2065 Sofia Papagiannaki
             "pluralized_display_name": "System Disk",
165 890c2065 Sofia Papagiannaki
             "report_desc": "System Disk",
166 890c2065 Sofia Papagiannaki
             "help_text": "This is the System Disk that the VMs have that run the OS ",
167 890c2065 Sofia Papagiannaki
             "is_abbreviation": false,
168 890c2065 Sofia Papagiannaki
             "placeholder": "eg. 5GB, 2GB etc",
169 890c2065 Sofia Papagiannaki
             "unit": "bytes",
170 890c2065 Sofia Papagiannaki
             "name": "cyclades.disk"},
171 890c2065 Sofia Papagiannaki
            {"currValue": 0,
172 890c2065 Sofia Papagiannaki
             "display_name": "CPU",
173 890c2065 Sofia Papagiannaki
             "description": "Number of virtual machine processors",
174 890c2065 Sofia Papagiannaki
             "verbose_name": "cpu",
175 890c2065 Sofia Papagiannaki
             "help_text_input_each": "This is the total number of CPUs that will be granted to each user of this Project (on all VMs)  ", "maxValue": 6, "pluralized_display_name": "CPUs",
176 890c2065 Sofia Papagiannaki
             "report_desc": "CPUs",
177 890c2065 Sofia Papagiannaki
             "help_text": "CPUs used by VMs ",
178 890c2065 Sofia Papagiannaki
             "is_abbreviation": true,
179 890c2065 Sofia Papagiannaki
             "placeholder": "eg. 1",
180 890c2065 Sofia Papagiannaki
             "unit": "",
181 890c2065 Sofia Papagiannaki
             "name": "cyclades.cpu"},
182 890c2065 Sofia Papagiannaki
            {"currValue": 0,
183 890c2065 Sofia Papagiannaki
             "display_name": "RAM",
184 890c2065 Sofia Papagiannaki
             "description": "Virtual machines",
185 890c2065 Sofia Papagiannaki
             "verbose_name": "ram",
186 890c2065 Sofia Papagiannaki
             "help_text_input_each": "This is the total amount of RAM that will be granted to each user of this Project (on all VMs)  ", "maxValue": 6442450944,
187 890c2065 Sofia Papagiannaki
             "pluralized_display_name": "RAM",
188 890c2065 Sofia Papagiannaki
             "report_desc": "RAM",
189 890c2065 Sofia Papagiannaki
             "help_text": "RAM used by VMs ",
190 890c2065 Sofia Papagiannaki
             "is_abbreviation": true,
191 890c2065 Sofia Papagiannaki
             "placeholder": "eg. 4GB",
192 890c2065 Sofia Papagiannaki
             "unit": "bytes", "name": "cyclades.ram"},
193 890c2065 Sofia Papagiannaki
            {"currValue": 0, "display_name": "VM",
194 890c2065 Sofia Papagiannaki
             "description": "Number of virtual machines",
195 890c2065 Sofia Papagiannaki
             "verbose_name": "vm", "help_text_input_each": "This is the total number of VMs that will be granted to each user of this Project ", "maxValue": 2,
196 890c2065 Sofia Papagiannaki
             "pluralized_display_name": "VMs",
197 890c2065 Sofia Papagiannaki
             "report_desc": "Virtual Machines",
198 890c2065 Sofia Papagiannaki
             "help_text": "These are the VMs one can create on the Cyclades UI ",
199 890c2065 Sofia Papagiannaki
             "is_abbreviation": true, "placeholder": "eg. 2",
200 890c2065 Sofia Papagiannaki
             "unit": "",
201 890c2065 Sofia Papagiannaki
             "name": "cyclades.vm"},
202 890c2065 Sofia Papagiannaki
            {"currValue": 0,
203 890c2065 Sofia Papagiannaki
             "display_name": "private network",
204 890c2065 Sofia Papagiannaki
             "description": "Private networks",
205 890c2065 Sofia Papagiannaki
             "verbose_name": "private network",
206 890c2065 Sofia Papagiannaki
             "help_text_input_each": "This is the total number of Private Networks that will be granted to each user of this Project ",
207 890c2065 Sofia Papagiannaki
             "maxValue": 1,
208 890c2065 Sofia Papagiannaki
             "pluralized_display_name": "private networks",
209 890c2065 Sofia Papagiannaki
             "report_desc": "Private Networks",
210 890c2065 Sofia Papagiannaki
             "help_text": "These are the Private Networks one can create on the Cyclades UI. ",
211 890c2065 Sofia Papagiannaki
             "is_abbreviation": false,
212 890c2065 Sofia Papagiannaki
             "placeholder": "eg. 1",
213 890c2065 Sofia Papagiannaki
             "unit": "",
214 890c2065 Sofia Papagiannaki
             "name": "cyclades.network.private"}]}
215 949f8393 Sofia Papagiannaki
216 949f8393 Sofia Papagiannaki
217 949f8393 Sofia Papagiannaki
|
218 949f8393 Sofia Papagiannaki
219 949f8393 Sofia Papagiannaki
=========================== =====================
220 949f8393 Sofia Papagiannaki
Return Code                 Description
221 949f8393 Sofia Papagiannaki
=========================== =====================
222 890c2065 Sofia Papagiannaki
204 (No Content)            The request succeeded
223 890c2065 Sofia Papagiannaki
400 (Bad Request)           Method not allowed or no user found
224 890c2065 Sofia Papagiannaki
401 (Unauthorized)          Missing token or inactive user or penging approval terms
225 949f8393 Sofia Papagiannaki
500 (Internal Server Error) The request cannot be completed because of an internal error
226 949f8393 Sofia Papagiannaki
=========================== =====================
227 949f8393 Sofia Papagiannaki
228 949f8393 Sofia Papagiannaki
229 949f8393 Sofia Papagiannaki
Send feedback
230 949f8393 Sofia Papagiannaki
^^^^^^^^^^^^^
231 949f8393 Sofia Papagiannaki
232 5d2e61ec Sofia Papagiannaki
Post user feedback.
233 949f8393 Sofia Papagiannaki
234 949f8393 Sofia Papagiannaki
========================= =========  ==================
235 949f8393 Sofia Papagiannaki
Uri                       Method     Description
236 949f8393 Sofia Papagiannaki
========================= =========  ==================
237 890c2065 Sofia Papagiannaki
``/feedback``             POST       Send feedback
238 949f8393 Sofia Papagiannaki
========================= =========  ==================
239 949f8393 Sofia Papagiannaki
240 949f8393 Sofia Papagiannaki
|
241 949f8393 Sofia Papagiannaki
242 949f8393 Sofia Papagiannaki
====================  ============================
243 949f8393 Sofia Papagiannaki
Request Header Name   Value
244 949f8393 Sofia Papagiannaki
====================  ============================
245 890c2065 Sofia Papagiannaki
X-Auth-Token          User authentication token
246 949f8393 Sofia Papagiannaki
====================  ============================
247 949f8393 Sofia Papagiannaki
248 8f9976c6 Constantinos Venetsanopoulos
|
249 8f9976c6 Constantinos Venetsanopoulos
250 8f9976c6 Constantinos Venetsanopoulos
======================  =========================
251 8f9976c6 Constantinos Venetsanopoulos
Request Parameter Name  Value
252 8f9976c6 Constantinos Venetsanopoulos
======================  =========================
253 949f8393 Sofia Papagiannaki
feedback_msg            Feedback message
254 949f8393 Sofia Papagiannaki
feedback_data           Additional information about service client status
255 8f9976c6 Constantinos Venetsanopoulos
======================  =========================
256 8f9976c6 Constantinos Venetsanopoulos
257 949f8393 Sofia Papagiannaki
|
258 949f8393 Sofia Papagiannaki
259 949f8393 Sofia Papagiannaki
=========================== =====================
260 949f8393 Sofia Papagiannaki
Return Code                 Description
261 949f8393 Sofia Papagiannaki
=========================== =====================
262 949f8393 Sofia Papagiannaki
200 (OK)                    The request succeeded
263 890c2065 Sofia Papagiannaki
502 (Bad Gateway)           Send feedback failure
264 5d2e61ec Sofia Papagiannaki
400 (Bad Request)           Method not allowed or invalid message data
265 5d2e61ec Sofia Papagiannaki
401 (Unauthorized)          Missing or expired user token
266 949f8393 Sofia Papagiannaki
500 (Internal Server Error) The request cannot be completed because of an internal error
267 949f8393 Sofia Papagiannaki
=========================== =====================
268 949f8393 Sofia Papagiannaki
269 5d2e61ec Sofia Papagiannaki
Get User catalogs
270 5d2e61ec Sofia Papagiannaki
^^^^^^^^^^^^^^^^^
271 949f8393 Sofia Papagiannaki
272 5d2e61ec Sofia Papagiannaki
Return a json formatted dictionary containing information about a specific user
273 949f8393 Sofia Papagiannaki
274 949f8393 Sofia Papagiannaki
================================ =========  ==================
275 949f8393 Sofia Papagiannaki
Uri                              Method     Description
276 949f8393 Sofia Papagiannaki
================================ =========  ==================
277 890c2065 Sofia Papagiannaki
``/user_catalogs``               POST       Get 2 catalogs containing uuid to displayname mapping and the opposite
278 949f8393 Sofia Papagiannaki
================================ =========  ==================
279 949f8393 Sofia Papagiannaki
280 949f8393 Sofia Papagiannaki
|
281 949f8393 Sofia Papagiannaki
282 949f8393 Sofia Papagiannaki
====================  ============================
283 949f8393 Sofia Papagiannaki
Request Header Name   Value
284 949f8393 Sofia Papagiannaki
====================  ============================
285 890c2065 Sofia Papagiannaki
X-Auth-Token          User authentication token
286 949f8393 Sofia Papagiannaki
====================  ============================
287 949f8393 Sofia Papagiannaki
288 949f8393 Sofia Papagiannaki
|
289 949f8393 Sofia Papagiannaki
290 890c2065 Sofia Papagiannaki
The request body is a json formatted dictionary containing a list with uuids and another list of displaynames to translate.
291 949f8393 Sofia Papagiannaki
292 890c2065 Sofia Papagiannaki
Example request content:
293 5d2e61ec Sofia Papagiannaki
294 5d2e61ec Sofia Papagiannaki
::
295 5d2e61ec Sofia Papagiannaki
296 5d2e61ec Sofia Papagiannaki
  {"displaynames": ["user1@example.com", "user2@example.com"],
297 5d2e61ec Sofia Papagiannaki
   "uuids":["ff53baa9-c025-4d56-a6e3-963db0438830", "a9dc21d2-bcb2-4104-9a9e-402b7c70d6d8"]}
298 5d2e61ec Sofia Papagiannaki
299 5d2e61ec Sofia Papagiannaki
Example reply:
300 5d2e61ec Sofia Papagiannaki
301 5d2e61ec Sofia Papagiannaki
::
302 5d2e61ec Sofia Papagiannaki
303 5d2e61ec Sofia Papagiannaki
  {"displayname_catalog": {"user1@example.com": "a9dc21d2-bcb2-4104-9a9e-402b7c70d6d8",
304 5d2e61ec Sofia Papagiannaki
                           "user2@example.com": "816351c7-7405-4f26-a968-6380cf47ba1f"},
305 5d2e61ec Sofia Papagiannaki
  'uuid_catalog': {"a9dc21d2-bcb2-4104-9a9e-402b7c70d6d8": "user1@example.com",
306 5d2e61ec Sofia Papagiannaki
                   "ff53baa9-c025-4d56-a6e3-963db0438830": "user2@example.com"}}
307 5d2e61ec Sofia Papagiannaki
308 5d2e61ec Sofia Papagiannaki
309 5d2e61ec Sofia Papagiannaki
|
310 5d2e61ec Sofia Papagiannaki
311 5d2e61ec Sofia Papagiannaki
=========================== =====================
312 5d2e61ec Sofia Papagiannaki
Return Code                 Description
313 5d2e61ec Sofia Papagiannaki
=========================== =====================
314 5d2e61ec Sofia Papagiannaki
200 (OK)                    The request succeeded
315 5d2e61ec Sofia Papagiannaki
400 (Bad Request)           Method not allowed or request body is not json formatted
316 5d2e61ec Sofia Papagiannaki
401 (Unauthorized)          Missing or expired or invalid user token
317 5d2e61ec Sofia Papagiannaki
500 (Internal Server Error) The request cannot be completed because of an internal error
318 5d2e61ec Sofia Papagiannaki
=========================== =====================
319 5d2e61ec Sofia Papagiannaki
320 5d2e61ec Sofia Papagiannaki
Service API Operations
321 5d2e61ec Sofia Papagiannaki
----------------------
322 5d2e61ec Sofia Papagiannaki
323 5d2e61ec Sofia Papagiannaki
The operations described in this chapter allow services to get user uuid/displayname mappings.
324 5d2e61ec Sofia Papagiannaki
325 5d2e61ec Sofia Papagiannaki
All the operations require a valid service token.
326 5d2e61ec Sofia Papagiannaki
327 5d2e61ec Sofia Papagiannaki
Get User catalogs
328 5d2e61ec Sofia Papagiannaki
^^^^^^^^^^^^^^^^^
329 5d2e61ec Sofia Papagiannaki
330 5d2e61ec Sofia Papagiannaki
Return a json formatted dictionary containing information about a specific user
331 5d2e61ec Sofia Papagiannaki
332 5d2e61ec Sofia Papagiannaki
================================ =========  ==================
333 5d2e61ec Sofia Papagiannaki
Uri                              Method     Description
334 5d2e61ec Sofia Papagiannaki
================================ =========  ==================
335 5d2e61ec Sofia Papagiannaki
``/user_catalogs``               POST       Get 2 catalogs containing uuid to displayname mapping and the opposite
336 5d2e61ec Sofia Papagiannaki
================================ =========  ==================
337 5d2e61ec Sofia Papagiannaki
338 5d2e61ec Sofia Papagiannaki
|
339 5d2e61ec Sofia Papagiannaki
340 5d2e61ec Sofia Papagiannaki
====================  ============================
341 5d2e61ec Sofia Papagiannaki
Request Header Name   Value
342 5d2e61ec Sofia Papagiannaki
====================  ============================
343 5d2e61ec Sofia Papagiannaki
X-Auth-Token          Service authentication token
344 5d2e61ec Sofia Papagiannaki
====================  ============================
345 5d2e61ec Sofia Papagiannaki
346 5d2e61ec Sofia Papagiannaki
|
347 5d2e61ec Sofia Papagiannaki
348 5d2e61ec Sofia Papagiannaki
The request body is a json formatted dictionary containing a list with uuids and another list of displaynames to translate.
349 19246578 Sofia Papagiannaki
If instead of list null is passed then the response contains the information for all the system users (For discretion purposes
350 19246578 Sofia Papagiannaki
this behavior is **not** exposed in the respective call of the User API).
351 5d2e61ec Sofia Papagiannaki
352 5d2e61ec Sofia Papagiannaki
Example request content:
353 8f9976c6 Constantinos Venetsanopoulos
354 8f9976c6 Constantinos Venetsanopoulos
::
355 8f9976c6 Constantinos Venetsanopoulos
356 890c2065 Sofia Papagiannaki
  {"displaynames": ["user1@example.com", "user2@example.com"],
357 890c2065 Sofia Papagiannaki
   "uuids":["ff53baa9-c025-4d56-a6e3-963db0438830", "a9dc21d2-bcb2-4104-9a9e-402b7c70d6d8"]}
358 949f8393 Sofia Papagiannaki
359 890c2065 Sofia Papagiannaki
Example reply:
360 8f9976c6 Constantinos Venetsanopoulos
361 890c2065 Sofia Papagiannaki
::
362 949f8393 Sofia Papagiannaki
363 890c2065 Sofia Papagiannaki
  {"displayname_catalog": {"user1@example.com": "a9dc21d2-bcb2-4104-9a9e-402b7c70d6d8",
364 890c2065 Sofia Papagiannaki
                           "user2@example.com": "816351c7-7405-4f26-a968-6380cf47ba1f"},
365 890c2065 Sofia Papagiannaki
  'uuid_catalog': {"a9dc21d2-bcb2-4104-9a9e-402b7c70d6d8": "user1@example.com",
366 890c2065 Sofia Papagiannaki
                   "ff53baa9-c025-4d56-a6e3-963db0438830": "user2@example.com"}}
367 8f9976c6 Constantinos Venetsanopoulos
368 8f9976c6 Constantinos Venetsanopoulos
369 949f8393 Sofia Papagiannaki
|
370 8f9976c6 Constantinos Venetsanopoulos
371 949f8393 Sofia Papagiannaki
=========================== =====================
372 949f8393 Sofia Papagiannaki
Return Code                 Description
373 949f8393 Sofia Papagiannaki
=========================== =====================
374 949f8393 Sofia Papagiannaki
200 (OK)                    The request succeeded
375 890c2065 Sofia Papagiannaki
400 (Bad Request)           Method not allowed or request body is not json formatted
376 949f8393 Sofia Papagiannaki
401 (Unauthorized)          Missing or expired or invalid service token
377 949f8393 Sofia Papagiannaki
500 (Internal Server Error) The request cannot be completed because of an internal error
378 949f8393 Sofia Papagiannaki
=========================== =====================