Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Table of Contents

...

Abiquo chose to implement OAuth 1 because, at the time of implementation, it was considered was considered more secure and interoperable than OAuth 2.
See https://hueniverse. com/oauth-2-0-and-the-road-to-hell-8eec45921529

OAuth example applications

...

  • GET datacenters request

    Code Block
    % curl --verbose 'http://example.com/api/admin/datacenters/' \
            -X GET \
            -H "Accept:application/vnd.abiquo.datacenters+xml" \
            -H "Authorization: Token 1169dbbca2c1da4da5ab6b5a06b2b38756fb"
    
    > GET /api/admin/datacenters HTTP/1.1
    > User-Agent: curl/7.19.5 (x86_64-pc-linux-gnu) libcurl/7.19.5 OpenSSL/0.9.8g zlib/1.2.3.3 libidn/1.15
    > Host: example.com
    > Authorization: Token 1169dbbca2c1da4da5ab6b5a06b2b38756fb
    > Accept: application/vnd.abiquo.datacenters+xml

  • Response headers: Content-Length, Content-Type, Date, X-Abiquo-Token.
    Response message body: N/A.
    Response status: 200, 401, 403.
    Example response: Response of the authenticated GET over a Datacenters resource

  • GET datacenters response

    Code Block
    < HTTP/1.1 200 OK
    < Server: Apache-Coyote/1.1
    < X-Abiquo-Token: 1169dbbca2c1123455ab6b5a06b2b38756fb
    < Content-Type: application/vnd.abiquo.datacenters+xml
    < Content-Length: 420
    < Date: Fri, 02 Jul 2010 09:50:52 GMT
    <
    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <datacenters>
        <datacenter>
            <link href="http://example.com/api/admin/datacenters/1" rel="edit"/>
            <link href="http://example.com/api/admin/datacenters/1/racks" rel="racks"/>
            <link href="http://example.com/api/admin/datacenters/1/remoteServices" rel="remoteServices"/>
            <id>1</id>
            <location>Redwood city</location>
            <name>myDatacenter</name>
        </datacenter>
    </datacenters>

...