Revision 98893c32

b/docs/astakos-api-guide.rst
20 20
=========================  ================================
21 21
Revision                   Description
22 22
=========================  ================================
23
0.14 (May 23, 2013)        Extend api to list endpoints
23 24
0.14 (May 14, 2013)        Do not serve user quotas in :ref:`authenticate-api-label`
24 25
0.14 (May 02, 2013)        Change URIs (keep also the old ones until the next version)
25 26
0.13 (January 21, 2013)    Extend api to export user presentation & quota information.
......
251 252

  
252 253
Return a json formatted dictionary containing information about a specific user
253 254

  
254
===================================== =========  ==================
255
Uri                                   Method     Description
256
===================================== =========  ==================
255
====================================== =========  ==================
256
Uri                                    Method     Description
257
====================================== =========  ==================
257 258
``/astakos/api/service/user_catalogs`` POST       Get 2 catalogs containing uuid to displayname mapping and the opposite
258
===================================== =========  ==================
259
====================================== =========  ==================
259 260

  
260 261
|
261 262

  
......
301 302

  
302 303
.. warning:: The service is also available under ``/service/api/user_catalogs``.
303 304
     It  will be removed in the next version.
305

  
306
Tokens API Operations
307
----------------------
308

  
309
Get endpoints
310
^^^^^^^^^^^^^
311

  
312
Return a json (or xml) formatted dictionary containing information about registered endpoints
313

  
314
========================================= =========  ==================
315
Uri                                       Method     Description
316
========================================= =========  ==================
317
``/astakos/api/tokens/<token>/endpoints`` GET        Returns a list registered endpoints
318
========================================= =========  ==================
319

  
320
|
321

  
322
====================  ============================
323
Request Header Name   Value
324
====================  ============================
325
X-Auth-Token          User authentication token
326
====================  ============================
327

  
328
|
329

  
330
======================  ============================
331
Request Parameter Name  Value
332

  
333
======================  ============================
334
belongsTo               Check that the token belongs to a supplied user
335
marker                  Return endpoints (ordered by ID) whose ID is higher than the marker
336
limit                   Maximum number of endpoints to return
337
======================  ============================
338

  
339
|
340

  
341
Example json reply:
342

  
343
::
344

  
345
    {'endpoint_links': [{'href': '/astakos/api/tokens/0000/endpoints?marker=7&limit=10000',
346
       'rel': 'next'}],
347
     'endpoints': [
348
      {'adminURL': 'https://node1.example.com/ui/',
349
       'id': 5,
350
       'internalURL': 'https://node1.example.com/ui/',
351
       'name': 'cyclades',
352
       'publicURL': 'https://node1.example.com/ui/',
353
       'region': 'cyclades',
354
       'type': None},
355
      {'adminURL': 'https://node2.example.com/v1',
356
       'id': 6,
357
       'internalURL': 'https://node2.example.com/ui/',
358
       'name': 'pithos',
359
       'publicURL': 'https://node2.example.com/ui/',
360
       'region': 'pithos',
361
       'type': None},
362
     ]}
363

  
364

  
365
Example xml reply:
366

  
367
::
368

  
369
    <?xml version="1.0" encoding="UTF-8"?>
370
    <endpoints xmlns="http://docs.openstack.org/identity/api/v2.0">
371
        <endpoint "name"="cyclades" "region"="cyclades" "internalURL"="https://node1.example.com/ui/" "adminURL"="https://node1.example.com/ui/" "id"="5" "publicURL"="https://node1.example.com/ui/" />
372
        <endpoint "name"="pithos" "region"="pithos" "internalURL"="https://node2.example.com/ui/" "adminURL"="https://node2.example.com/v1" "id"="6" "publicURL"="https://node2.example.com/ui/" />
373
    </endpoints>
374
    <endpoint_links>
375
            <endpoint_link "href"="/astakos/api/tokens/0000/endpoints?marker=7&amp;limit=10000" "rel"="next" />
376
    </endpoint_links>
377

  
378

  
379
|
380

  
381
=========================== =====================
382
Return Code                 Description
383
=========================== =====================
384
200 (OK)                    The request succeeded
385
400 (Bad Request)           Method not allowed or token does not belong to the specific user
386
401 (Unauthorized)          Missing or expired or invalid service token
387
403 (Forbidden)             Path token does not comply with X-Auth-Token
388
500 (Internal Server Error) The request cannot be completed because of an internal error
389
=========================== =====================

Also available in: Unified diff