<?xml version="1.0" encoding="UTF-8"?>
<!-- (C) 2011 OpenStack LLC., All Rights Reserved -->
<!--*******************************************************-->
<!-- Import Common XML Entities -->
<!-- -->
<!-- You can resolve the entites with xmllint -->
<!-- -->
<!-- xmllint -noent RAX-KSQA-admin.wadl -->
<!--*******************************************************-->
<!DOCTYPE application [
<!ENTITY % common SYSTEM "../common/common.ent">
%common;
]>
<application xmlns="http://wadl.dev.java.net/2009/02"
    xmlns:identity="http://docs.openstack.org/identity/api/v2.0"
    xmlns:RAX-KSQA="http://docs.openstack.org/identity/api/ext/RAX-KSQA/v1.0"
    xmlns:capi="http://docs.openstack.org/common/api/v1.0"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:xsdxt="http://docs.rackspacecloud.com/xsd-ext/v1.0"
    xsi:schemaLocation="http://docs.openstack.org/identity/api/v2.0 ../common/xsd/api.xsd
    http://docs.openstack.org/common/api/v1.0 ../common/xsd/api-common.xsd
    http://wadl.dev.java.net/2009/02 http://www.w3.org/Submission/wadl/wadl.xsd
    http://docs.openstack.org/identity/api/ext/RAX-KSQA/v1.0 ../common/xsd/RAX-KSQA-secretQA.xsd
    ">
    
    <grammars>
        <include href="../common/xsd/api.xsd"/>
        <include href="../common/xsd/api-common.xsd"/>
        <include href="../common/xsd/RAX-KSQA-secretQA.xsd"/>
    </grammars>
    <!--*******************************************************-->
    <!-- All Resoruces -->
    <!--*******************************************************-->
    
    <!-- We should use SSL in production -->
    <resources base="http://localhost:35357">
        <resource id="version" path="v2.0">
            <param name="X-Auth-Token" style="header" type="xsd:string" required="true">
                <doc>You need a valid admin token for access.</doc>
            </param>
            <resource id="users" path="users">
                <resource id="userById" path="{userId}">
                    <param name="userId" style="template" type="xsd:string"/>
                    <resource id="user-RAX-KSQA" path="RAX-KSQA">
                        <resource id="secretqa" path="secretqa">
                            <method href="#getUserSecretQA"/>
                            <method href="#updateUserSecretQA"/>
                        </resource>
                    </resource>
                </resource>
            </resource>
        </resource>
    </resources>
    
    <method name="GET" id="getUserSecretQA">
        <doc xml:lang="EN" title="Get User SecretQA">
            <p xmlns="http://www.w3.org/1999/xhtml">Gets a User secret Question and Answer.</p>
        </doc>
        <response status="200 203">
            <representation mediaType="application/xml" element="RAX-KSQA:secretQA">
                <doc xml:lang="EN">
                    <xsdxt:code href="../common/samples/RAX-KSQA-secretQA.xml"/>
                </doc>
            </representation>
            <representation mediaType="application/json">
                <doc xml:lang="EN">
                    <xsdxt:code href="../common/samples/RAX-KSQA-secretQA.json"/>
                </doc>
            </representation>
        </response>
        &commonFaults;
        &getFaults;
    </method>
    <method name="PUT" id="updateUserSecretQA">
        <doc xml:lang="EN" title="Update User SecretQA">
            <p xmlns="http://www.w3.org/1999/xhtml">Updates a User secret Question and Answer.</p>
        </doc>
        <request>
            <representation mediaType="application/xml" element="RAX-KSQA:secretQA">
                <doc xml:lang="EN">
                    <xsdxt:code href="../common/samples/RAX-KSQA-secretQA.xml"/>
                </doc>
            </representation>
            <representation mediaType="application/json">
                <doc xml:lang="EN">
                    <xsdxt:code href="../common/samples/RAX-KSQA-secretQA.json"/>
                </doc>
            </representation>
        </request>
        <response status="200">
            <representation mediaType="application/xml" element="RAX-KSQA:secretQA">
                <doc xml:lang="EN">
                    <xsdxt:code href="../common/samples/RAX-KSQA-secretQA.xml"/>
                </doc>
            </representation>
            <representation mediaType="application/json">
                <doc xml:lang="EN">
                    <xsdxt:code href="../common/samples/RAX-KSQA-secretQA.json"/>
                </doc>
            </representation>
        </response>
        &commonFaults;
        &postPutFaults;
    </method>
   </application> 
