Revision a24b5bda docs/astakos-api-guide.rst

b/docs/astakos-api-guide.rst
20 20
=========================  ================================
21 21
Revision                   Description
22 22
=========================  ================================
23
0.14 (June 03, 2013)       Remove endpoint listing
23 24
0.14 (May 28, 2013)        Extend token api with authenticate call
24 25
0.14 (May 23, 2013)        Extend api to list endpoints
25 26
0.14 (May 14, 2013)        Do not serve user quotas in :ref:`authenticate-api-label`
......
474 475
401 (Unauthorized)          Invalid token or invalid creadentials or tenantName does not comply with the provided token
475 476
500 (Internal Server Error) The request cannot be completed because of an internal error
476 477
=========================== =====================
477

  
478

  
479

  
480
Get endpoints
481
^^^^^^^^^^^^^
482

  
483
Return a json (or xml) formatted dictionary containing information about registered endpoints
484

  
485
========================================= =========  ==================
486
Uri                                       Method     Description
487
========================================= =========  ==================
488
``/astakos/api/tokens/<token>/endpoints`` GET        Returns a list registered endpoints
489
========================================= =========  ==================
490

  
491
|
492

  
493
====================  ============================
494
Request Header Name   Value
495
====================  ============================
496
X-Auth-Token          User authentication token
497
====================  ============================
498

  
499
|
500

  
501
======================  ============================
502
Request Parameter Name  Value
503

  
504
======================  ============================
505
belongsTo               Check that the token belongs to a supplied user
506
marker                  Return endpoints (ordered by ID) whose ID is higher than the marker
507
limit                   Maximum number of endpoints to return
508
======================  ============================
509

  
510
|
511

  
512
Example json reply:
513

  
514
::
515

  
516
    {"endpoints": [
517
        {"name": "cyclades",
518
         "region": "cyclades",
519
         "internalURL": "https://node1.example.com/v1",
520
         "adminURL": "https://node1.example.com/v1",
521
         "type": null,
522
         "id": 5,
523
         "publicURL": "https://node1.example.com/vi/"},
524
        {"name": "pithos",
525
         "region": "pithos",
526
         "internalURL": "https://node2.example.com/vi/",
527
         "adminURL": "https://node2.example.com/v1",
528
         "type": null,
529
         "id": 6,
530
         "publicURL": "https://node2.example.com/vi/"},
531
    ],
532
    "endpoint_links": [{
533
        "href": "/astakos/api/tokens/0000/endpoints?marker=6&limit=10000",
534
         "rel": "next"}]}
535

  
536

  
537
Example xml reply:
538

  
539
::
540

  
541
    <?xml version="1.0" encoding="UTF-8"?>
542
    <endpoints xmlns="http://docs.openstack.org/identity/api/v2.0">
543
        <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/" />
544
        <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/" />
545
    </endpoints>
546
    <endpoint_links>
547
            <endpoint_link "href"="/astakos/api/tokens/0000/endpoints?marker=6&amp;limit=10000" "rel"="next" />
548
    </endpoint_links>
549

  
550

  
551
|
552

  
553
=========================== =====================
554
Return Code                 Description
555
=========================== =====================
556
200 (OK)                    The request succeeded
557
400 (Bad Request)           Method not allowed or token does not belong to the specific user
558
401 (Unauthorized)          Missing or expired or invalid service token
559
403 (Forbidden)             Path token does not comply with X-Auth-Token
560
500 (Internal Server Error) The request cannot be completed because of an internal error
561
=========================== =====================

Also available in: Unified diff