<?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 OS-KSADM-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:OS-KSADM="http://docs.openstack.org/identity/api/ext/OS-KSADM/v1.0"	
	xmlns:capi="http://docs.openstack.org/common/api/v2.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/OS-KSADM/v1.0 ../common/xsd/OS-KSADM.xsd
		">

    <grammars>
        <include href="../common/xsd/api.xsd"/>
        <include href="../common/xsd/api-common.xsd"/>
        <include href="../common/xsd/OS-KSADM.xsd" />
    </grammars>
    <!--*******************************************************-->
    <!--             All Resoruces                             -->
    <!--*******************************************************-->

    <!-- We should use SSL in production -->
    <resources base="http://localhost:5001">
        <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">
                <method href="#listUsers"/>
                <method href="#addUser"/>
                <resource id="userById" path="{userId}">
                    <method href="#updateUser"/>
                    <method href="#deleteUser"/>
                    <resource id="user-OS-KSADM" path="OS-KSADM">
                        <resource id="enabled" path="enabled">
                            <method href="#setUserEnabled"/>
                        </resource>
                        
                        <resource id="userRoles" path="roles">
                            <method href="#listUserRoles"/>
                            <resource id="userRoleById" path="{roleId}">
                                <param name="roleId" style="template" type="xsd:int"/>
                                <method href="#addUserRole"/>
                                <method href="#getUserRole"/>
                                <method href="#deleteUserRole"/>
                            </resource>
                        </resource>
                        
                        <resource id="userCredentials" path="credentials">
                            <method href="#addUserCredential"/>
                            <method href="#listCredentials"/>
                            <resource id="userCredentialsByType" path="{credential-type}">
                                <param name="credentialType" style="template" type="OS-KSADM:extensibleCredentialsType" required="true"/>
                                <method href="#updateUserCredential"/>
                                <method href="#deleteUserCredential"/>
                                <method href="#getUserCredential"/>
                            </resource>
                        </resource>
                    </resource>
                </resource>
            </resource>

            <resource id="tenants" path="tenants">
				<method href="#addTenant"/>
                <resource id="tenantById" path="{tenantId}">
                    <param name="tenantId" style="template" type="xsd:string"/>
                    <method href="#updateTenant"/>
                    <method href="#deleteTenant"/>
                    <resource id="tenant-OS-KSADM" path="OS-KSADM">
                        <resource id="rolesForTenant" path="roles">
                            <method href="#listRolesForTenant"/>
                        </resource>
                    </resource>        
                    <resource id="usersForTenant" path="users">
                        <method href="#listUsersForTenant"/>
                        <method href="#listUsersWithRoleForTenant"/>
                        <resource id="userForTenant" path="{userId}">
                            <param name="userId" style="template" type="xsd:string"/>
                            <resource id="userRolesForTenant" path="roles">
                                <resource id="tenant-user-role-OS-KSADM" path="OS-KSADM">
                                    <resource id="userSpecificRoleForTenant" path="{roleId}">
                                        <method href="#addRolesToUserOnTenant"/>
                                        <method href="#deleteRoleFromUserOnTenant"/>
                                    </resource>
                                </resource>
                            </resource>
                        </resource>
                   </resource>
                </resource>
            </resource>

            <resource id="role-service-OS-KSADM" path="OS-KSADM">
                <resource id="roles" path="roles">
                    <method href="#listRoles"/>
                    <method href="#addRole"/>
                    <resource id="roleId" path="{roleId}">
                        <param name="roleId" style="template" type="xsd:string"/>
                        <method href="#getRole"/>
                        <method href="#deleteRole"/>
                    </resource>
                </resource>
                <resource id="services" path="services">
                    <method href="#listServices"/>
                    <method href="#addService"/>
                    
                    <resource id="serviceId" path="{serviceId}">
                        <param name="serviceId" style="template" type="xsd:int"/>
                        <method href="#getService"/>
                        <method href="#deleteService"/>
                    </resource>
                </resource>
            </resource>
        </resource>
    </resources>

    <!--*******************************************************-->
    <!--               All Methods                             -->
    <!--*******************************************************-->

    <!-- Tenant Operations -->
    <method name="POST" id="addTenant">
        <doc xml:lang="EN" title="Add Tenant">
            <p xmlns="http://www.w3.org/1999/xhtml" class="shortdesc">
                Creates a tenant.
            </p>
            <p xmlns="http://www.w3.org/1999/xhtml">This call creates a tenant.</p>
        </doc>
        <request>
            <representation mediaType="application/xml" element="identity:tenant">
                <doc xml:lang="EN">
                    <xsdxt:code href="../common/samples/tenantwithoutid.xml"/>
                </doc>
            </representation>
            <representation mediaType="application/json">
                <doc xml:lang="EN">
                    <xsdxt:code href="../common/samples/tenantwithoutid.json"/>
                </doc>
            </representation>
        </request>
        <response status="201">
            <representation mediaType="application/xml" element="identity:tenant">
                <doc xml:lang="EN">
                    <xsdxt:code href="../common/samples/tenant.xml"/>
                </doc>
            </representation>
            <representation mediaType="application/json">
                <doc xml:lang="EN">
                    <xsdxt:code href="../common/samples/tenant.json"/>
                </doc>
            </representation>
        </response>
        &commonFaults;
        &postPutFaults;
    </method>

    <method name="POST" id="updateTenant">
        <doc xml:lang="EN" title="Update Tenant">
            <p xmlns="http://www.w3.org/1999/xhtml" class="shortdesc">
                Updates a tenant.
            </p>
            <p xmlns="http://www.w3.org/1999/xhtml">This call updates a tenant.</p>
        </doc>
        <request>
            <representation mediaType="application/xml" element="identity:tenant">
                <doc xml:lang="EN">
                    <xsdxt:code href="../common/samples/tenant.xml"/>
                </doc>
            </representation>
            <representation mediaType="application/json">
                <doc xml:lang="EN">
                    <xsdxt:code href="../common/samples/tenant.json"/>
                </doc>
            </representation>
        </request>
        <response status="200">
            <representation mediaType="application/xml" element="identity:tenant">
                <doc xml:lang="EN">
                    <xsdxt:code href="../common/samples/tenant.xml"/>
                </doc>
            </representation>
            <representation mediaType="application/json">
                <doc xml:lang="EN">
                    <xsdxt:code href="../common/samples/tenant.json"/>
                </doc>
            </representation>
        </response>
        &commonFaults;
        &getFaults;
        &postPutFaults;
    </method>

    <method name="DELETE" id="deleteTenant">
        <doc xml:lang="EN" title="Delete a Tenant">
            <p xmlns="http://www.w3.org/1999/xhtml" class="shortdesc">
                Deletes a tenant.
            </p>
            <p xmlns="http://www.w3.org/1999/xhtml">This call deletes a tenant.</p>
        </doc>
        <response status="204"/>
        &commonFaults;
        &getFaults;
    </method>
    
    <method name="GET" id="listRolesForTenant">
        <doc xml:lang="EN" title="List roles for a Tenant.">
            <p xmlns="http://www.w3.org/1999/xhtml" class="shortdesc">Lists all the roles for a tenant.</p>
            <p xmlns="http://www.w3.org/1999/xhtml">Lists all the roles for a tenant.</p>
        </doc>
        <request>
            <param name="marker" style="query" required="false" type="xsd:string"/>
            <param name="limit" style="query" required="false" type="xsd:int"/>
        </request>
        <response status="200 203">
            <representation mediaType="application/xml" element="identity:roles">
                <doc xml:lang="EN">
                    <xsdxt:code href="../common/samples/roles.xml"/>
                </doc>
            </representation>
            <representation mediaType="application/json">
                <doc xml:lang="EN">
                    <xsdxt:code href="../common/samples/roles.json"/>
                </doc>
            </representation>
        </response>
        &commonFaults;
        &getFaults;
    </method>

    <method name="GET" id="listUsersForTenant">
        <doc xml:lang="EN" title="List users for a Tenant.">
            <p xmlns="http://www.w3.org/1999/xhtml" class="shortdesc">Lists all the users for a tenant.</p>
            <p xmlns="http://www.w3.org/1999/xhtml">Lists all the users for a tenant.</p>
                        
        </doc>
        <request>
            <param name="marker" style="query" required="false" type="xsd:string"/>
            <param name="limit" style="query" required="false" type="xsd:int"/>
        </request>
        <response status="200 203">
            <representation mediaType="application/xml" element="identity:users">
                <doc xml:lang="EN">
                    <xsdxt:code href="../common/samples/users.xml"/>
                </doc>
            </representation>
            <representation mediaType="application/json">
                <doc xml:lang="EN">
                    <xsdxt:code href="../common/samples/users.json"/>
                </doc>
            </representation>
        </response>
        &commonFaults;
        &getFaults;
    </method>
    
    <method name="GET" id="listUsersWithRoleForTenant">
        <doc xml:lang="EN" title="List user with role for tenant.">
            <p xmlns="http://www.w3.org/1999/xhtml">Lists all the users with a specific role for a tenant.</p>
                        
        </doc>
        <request>
            <param name="roleId" style="query" required="true" type="xsd:string"/>
            <param name="marker" style="query" required="false" type="xsd:string"/>
            <param name="limit" style="query" required="false" type="xsd:int"/>
        </request>
        <response status="200 203">
            <representation mediaType="application/xml" element="identity:users">
                <doc xml:lang="EN">
                    <xsdxt:code href="../common/samples/users.xml"/>
                </doc>
            </representation>
            <representation mediaType="application/json">
                <doc xml:lang="EN">
                    <xsdxt:code href="../common/samples/users.json"/>
                </doc>
            </representation>
        </response>
        &commonFaults;
        &getFaults;
    </method>
    
    <method name="PUT" id="addRolesToUserOnTenant">
        <doc xml:lang="EN" title="Add roles to a user on a tenant.">
            <p xmlns="http://www.w3.org/1999/xhtml">Adds a specific role to a user for a tenant.</p>
        </doc>
        <response status="200"/>
        &commonFaults;
        &postPutFaults;
        &getFaults;
    </method>    

    <method name="DELETE" id="deleteRoleFromUserOnTenant">
        <doc xml:lang="EN" title="Delete roles from a user on tenant.">
            <p xmlns="http://www.w3.org/1999/xhtml">Deletes a specific role from a user for a tenant.</p>
        </doc>
        <response status="204"/>
        &commonFaults;
        &getFaults;
    </method>    
    
    <!--User Operations-->
    <method name="GET" id="listUsers">
        <doc xml:lang="EN" title="List users">
            <p xmlns="http://www.w3.org/1999/xhtml">List users.</p>
                        
        </doc>
        <response status="200 203">
            <representation mediaType="application/xml" element="identity:userss">
                <doc xml:lang="EN">
                    <xsdxt:code href="../common/samples/users.xml"/>
                </doc>
            </representation>
            <representation mediaType="application/json">
                <doc xml:lang="EN">
                    <xsdxt:code href="../common/samples/users.json"/>
                </doc>
            </representation>
        </response>
        &commonFaults;
        &getFaults;
    </method>
    
    
    <method name="POST" id="addUser">
        <doc xml:lang="EN" title="Add user">
            <p xmlns="http://www.w3.org/1999/xhtml">Adds a user.</p>
        </doc>
        <request>
            <representation mediaType="application/xml" element="identity:user">
                <doc xml:lang="EN">
                    <xsdxt:code href="../common/samples/userwithoutid.xml"/>
                </doc>
            </representation>
            <representation mediaType="application/json">
                <doc xml:lang="EN">
                    <xsdxt:code href="../common/samples/userwithoutid.json"/>
                </doc>
            </representation>
        </request>
        <response status="201">
            <representation mediaType="application/xml" element="identity:user">
                <doc xml:lang="EN">
                    <xsdxt:code href="../common/samples/user.xml"/>
                </doc>
            </representation>
            <representation mediaType="application/json">
                <doc xml:lang="EN">
                    <xsdxt:code href="../common/samples/user.json"/>
                </doc>
            </representation>
        </response>
        &commonFaults;
        &getFaults;
        &postPutFaults;
    </method>
   
    <method name="POST" id="updateUser">
        <doc xml:lang="EN" title="Update user">
            <p xmlns="http://www.w3.org/1999/xhtml">Update a user.</p>
            
            
                           
        </doc>
        <request>
            <representation mediaType="application/xml" element="identity:user">
                <doc xml:lang="EN">
                    <xsdxt:code href="../common/samples/user.xml"/>
                </doc>
            </representation>
            <representation mediaType="application/json">
                <doc xml:lang="EN">
                    <xsdxt:code href="../common/samples/user.json"/>
                </doc>
            </representation>
        </request>
        <response status="200">
            <representation mediaType="application/xml" element="identity:user">
                <doc xml:lang="EN">
                    <xsdxt:code href="../common/samples/user.xml"/>
                </doc>
            </representation>
            <representation mediaType="application/json">
                <doc xml:lang="EN">
                    <xsdxt:code href="../common/samples/user.json"/>
                </doc>
            </representation>
        </response>
        &commonFaults;
        &postPutFaults;
        &getFaults;
    </method>
   
    <method name="DELETE" id="deleteUser">
        <doc xml:lang="EN" title="Delete user">
            <p xmlns="http://www.w3.org/1999/xhtml">Delete a user.</p>
        </doc>
        <response status="204"/>
        &commonFaults;
        &getFaults;
    </method>
    
    <method name="PUT" id="setUserEnabled">
        <doc xml:lang="EN" title="Set user enabled.">
            <p xmlns="http://www.w3.org/1999/xhtml">Enable user.</p>
            
                         
        </doc>
        <request>
            <representation mediaType="application/xml" element="identity:user">
                <doc xml:lang="EN">
                    <xsdxt:code href="../common/samples/userwithenabledonly.xml"/>
                </doc>
                <param name="user" style="plain" path="/" type="OS-KSADM:UserWithOnlyEnabled"/></representation>
            <representation mediaType="application/json">
                <doc xml:lang="EN">
                    <xsdxt:code href="../common/samples/userwithenabledonly.json"/>
                </doc>
            </representation>
        </request>
        <response status="200">
            <representation mediaType="application/xml" element="identity:user">
                <doc xml:lang="EN">
                    <xsdxt:code href="../common/samples/user.xml"/>
                </doc>
            </representation>
            <representation mediaType="application/json">
                <doc xml:lang="EN">
                    <xsdxt:code href="../common/samples/user.json"/>
                </doc>
            </representation>
        </response>
        &commonFaults;
        &postPutFaults;
        &getFaults;
    </method>

    <!--User Roles-->
    <method name="GET" id="listUserRoles">
        <doc xml:lang="EN" title="List Global Roles for a User">
            <p xmlns="http://www.w3.org/1999/xhtml">List all the global roles for a user.</p>
                        
        </doc>
        <request>
            <param name="serviceId" style="query" required="false" type="xsd:string"/>
        </request>
        <response status="200 203">
            <representation mediaType="application/xml" element="identity:roles">
                <doc xml:lang="EN">
                    <xsdxt:code href="../common/samples/roles.xml"/>
                </doc>
            </representation>
            <representation mediaType="application/json">
                <doc xml:lang="EN">
                    <xsdxt:code href="../common/samples/roles.json"/>
                </doc>
            </representation>
        </response>
        &commonFaults;
        &getFaults;
    </method>
    
    <method name="PUT" id="addUserRole">
        <doc xml:lang="EN" title="Add Global roles to a user.">
            <p xmlns="http://www.w3.org/1999/xhtml">Adds a specific global role to a user.</p>
        </doc>
        <response status="200"/>
        &commonFaults;
        &postPutFaults;
        &getFaults;
    </method>    
    
    <method name="GET" id="getUserRole">
        <doc xml:lang="EN" title="Get user Role">
            <p xmlns="http://www.w3.org/1999/xhtml">Get information about a global role that belongs to a user.</p>
                        
        </doc>
        <response status="200 203">
            <representation mediaType="application/xml" element="identity:role">
                <doc xml:lang="EN">
                    <xsdxt:code href="../common/samples/role.xml"/>
                </doc>
            </representation>
            <representation mediaType="application/json">
                <doc xml:lang="EN">
                    <xsdxt:code href="../common/samples/role.json"/>
                </doc>
            </representation>
        </response>
        &commonFaults;
        &postPutFaults;
        &getFaults;
    </method>
    
    <method name="DELETE" id="deleteUserRole">
        <doc xml:lang="EN" title="Delete Global Roles on User.">
            <p xmlns="http://www.w3.org/1999/xhtml">Deletes a specific global role from a user.</p>
        </doc>
        <response status="204"/>
        &commonFaults;
        &getFaults;
    </method>    
    
    
    <!-- User Credentials-->
    <method name="POST" id="addUserCredential">
        <doc xml:lang="EN" title="Add user Credential.">
            <p xmlns="http://www.w3.org/1999/xhtml">Adds a credential to a user.</p>
        </doc>
        <request>
            <representation mediaType="application/xml" element="identity:credentials">
                <doc xml:lang="EN">
                    <xsdxt:code href="../common/samples/passwordcredentials.xml"/>
                </doc>
            </representation>
            <representation mediaType="application/json">
                <doc xml:lang="EN">
                    <xsdxt:code href="../common/samples/passwordcredentials.json"/>
                </doc>
            </representation>
        </request>
        <response status="201">
            <representation mediaType="application/xml" element="identity:credentials">
                <doc xml:lang="EN">
                    <xsdxt:code href="../common/samples/passwordcredentials.xml"/>
                </doc>
            </representation>
            <representation mediaType="application/json">
                <doc xml:lang="EN">
                    <xsdxt:code href="../common/samples/passwordcredentials.json"/>
                </doc>
            </representation>
        </response>
        &commonFaults;
        &postPutFaults;
        &getFaults;
    </method>

    <method name="GET" id="listCredentials">
        <doc xml:lang="EN" title="List Credentials">
            <p xmlns="http://www.w3.org/1999/xhtml">List credentials.</p>
                        
        </doc>
        <request>
            <param name="marker" style="query" required="false" type="xsd:string"/>
            <param name="limit" style="query" required="false" type="xsd:int"/>
        </request>
        <response status="200 203">
            <representation mediaType="application/xml" element="identity:credentials">
                <doc xml:lang="EN">
                    <xsdxt:code href="../common/samples/credentials.xml"/>
                </doc>
            </representation>
            <representation mediaType="application/json">
                <doc xml:lang="EN">
                    <xsdxt:code href="../common/samples/credentials.json"/>
                </doc>
            </representation>
        </response>
        &commonFaults;
        &getFaults;
    </method>
    
    <method name="GET" id="listCredentialsByType">
        <doc xml:lang="EN" title="List Credentials by type">
            <p xmlns="http://www.w3.org/1999/xhtml">List credentials by type.</p>
                        
        </doc>
        <request>
            <param name="marker" style="query" required="false" type="xsd:string"/>
            <param name="limit" style="query" required="false" type="xsd:int"/>
        </request>
        <response status="200 203">
            <representation mediaType="application/xml" element="identity:credentials">
                <doc xml:lang="EN">
                    <xsdxt:code href="../common/samples/credentials.xml"/>
                </doc>
            </representation>
            <representation mediaType="application/json">
                <doc xml:lang="EN">
                    <xsdxt:code href="../common/samples/credentials.json"/>
                </doc>
            </representation>
        </response>
        &commonFaults;
        &getFaults;
    </method>    

    <method name="POST" id="updateUserCredential">
        <doc xml:lang="EN" title="Update user credential">
            <p xmlns="http://www.w3.org/1999/xhtml">Update credentials.</p>
                        
        </doc>
        <request>
            <representation mediaType="application/xml" element="identity:credentials">
                <doc xml:lang="EN">
                    <xsdxt:code href="../common/samples/passwordcredentials.xml"/>
                </doc>
            </representation>
            <representation mediaType="application/json">
                <doc xml:lang="EN">
                    <xsdxt:code href="../common/samples/passwordcredentials.json"/>
                </doc>
            </representation>
        </request>
        <response status="200">
            <representation mediaType="application/xml" element="identity:credentials">
                <doc xml:lang="EN">
                    <xsdxt:code href="../common/samples/passwordcredentials.xml"/>
                </doc>
            </representation>
            <representation mediaType="application/json">
                <doc xml:lang="EN">
                    <xsdxt:code href="../common/samples/passwordcredentials.json"/>
                </doc>
            </representation>
        </response>
        &commonFaults;
        &postPutFaults;
        &getFaults;
    </method>
    
    <method name="DELETE" id="deleteUserCredential">
        <doc xml:lang="EN" title="Delete user credential">
            <p xmlns="http://www.w3.org/1999/xhtml">Delete User credentials.</p>
        </doc>
        <response status="204"/>
        &commonFaults;
        &postPutFaults;
        &getFaults;
    </method>
    
    <method name="GET" id="getUserCredential">
        <doc xml:lang="EN" title="Get user Credentials">
            <p xmlns="http://www.w3.org/1999/xhtml">Get user credentials.</p>
                        
        </doc>
        <response status="200 203">
            <representation mediaType="application/xml" element="identity:credentials">
                <doc xml:lang="EN">
                    <xsdxt:code href="../common/samples/passwordcredentials.xml"/>
                </doc>
            </representation>
            <representation mediaType="application/json">
                <doc xml:lang="EN">
                    <xsdxt:code href="../common/samples/passwordcredentials.json"/>
                </doc>
            </representation>
        </response>
        &commonFaults;
        &getFaults;
    </method>
    
    <!--Roles-->
    <method name="GET" id="listRoles">
        <doc xml:lang="EN" title="List Roles">
            <p xmlns="http://www.w3.org/1999/xhtml">List roles.</p>
                        
        </doc>
        <request>
            <param name="serviceId" style="query" required="false" type="xsd:string"/>
            <param name="marker" style="query" required="false" type="xsd:string"/>
            <param name="limit" style="query" required="false" type="xsd:int"/>
        </request>
        <response status="200 203">
            <representation mediaType="application/xml" element="identity:roles">
                <doc xml:lang="EN">
                    <xsdxt:code href="../common/samples/roles.xml"/>
                </doc>
            </representation>
            <representation mediaType="application/json">
                <doc xml:lang="EN">
                    <xsdxt:code href="../common/samples/roles.json"/>
                </doc>
            </representation>
        </response>
        &commonFaults;
        &getFaults;
    </method>

    <method name="POST" id="addRole">
        <doc xml:lang="EN" title="Add Role">
            <p xmlns="http://www.w3.org/1999/xhtml">Add a Role.</p>
        </doc>        
        <request>
            <representation mediaType="application/xml" element="identity:role">
                <doc xml:lang="EN">
                    <xsdxt:code href="../common/samples/role.xml"/>
                </doc>
            </representation>
            <representation mediaType="application/json">
                <doc xml:lang="EN">
                    <xsdxt:code href="../common/samples/role.json"/>
                </doc>
            </representation>
        </request>
        <response status="201">
            <representation mediaType="application/xml" element="identity:role">
                <doc xml:lang="EN">
                    <xsdxt:code href="../common/samples/role.xml"/>
                </doc>
                <param name="Location" type="xsd:anyURI" style="header"/>
            </representation>
            <representation mediaType="application/json">
                <doc xml:lang="EN">
                    <xsdxt:code href="../common/samples/role.json"/>
                </doc>
                <param name="Location" type="xsd:anyURI" style="header"/>
            </representation>
        </response>
        &commonFaults;
        &postPutFaults;
        &getFaults;
    </method>

    <method name="GET" id="getRole">
        <doc xml:lang="EN" title="Get Role">
            <p xmlns="http://www.w3.org/1999/xhtml">Get a role.</p>
        </doc>
        <response status="200 203">
            <representation mediaType="application/xml" element="identity:role"/>
            <representation mediaType="application/json"/>
        </response>
        &commonFaults;
        &postPutFaults;
        &getFaults;
    </method>
    
    <method name="DELETE" id="deleteRole">
        <doc xml:lang="EN" title="Delete Role">
            <p xmlns="http://www.w3.org/1999/xhtml">Delete a role.</p>
        </doc>
        <response status="204"/>
        &commonFaults;
        &getFaults;
    </method>

    <!-- Service Operations -->
    <method name="GET" id="listServices">
        <doc xml:lang="EN" title="List Services">
            <p xmlns="http://www.w3.org/1999/xhtml">List services.</p>
        </doc>
        <request>
            <param name="marker" style="query" required="false" type="xsd:string"/>
            <param name="limit" style="query" required="false" type="xsd:int"/>
        </request>
        <response status="200 203">
            <representation mediaType="application/xml" element="OS-KSADM:services">
                <doc xml:lang="EN">
                    <xsdxt:code href="../common/samples/services.xml"/>
                </doc>
            </representation>
            <representation mediaType="application/json">
                <doc xml:lang="EN">
                    <xsdxt:code href="../common/samples/services.json"/>
                </doc>
            </representation>
        </response>
        &commonFaults;
        &getFaults;
    </method>
    <method name="GET" id="getService">
        <doc xml:lang="EN" title="Get Service">
            <p xmlns="http://www.w3.org/1999/xhtml">Get a service.</p>
        </doc>
        <response status="200 203">
            <representation mediaType="application/xml" element="OS-KSADM:service">
                <doc xml:lang="EN">
                    <xsdxt:code href="../common/samples/service.xml"/>
                </doc>
            </representation>
            <representation mediaType="application/json">
                <doc xml:lang="EN">
                    <xsdxt:code href="../common/samples/service.json"/>
                </doc>
            </representation>
        </response>
        &commonFaults;
        &getFaults;
    </method>
    <method name="POST" id="addService">
        <doc xml:lang="EN" title="Add Service">
            <p xmlns="http://www.w3.org/1999/xhtml">Add a service.</p>
        </doc>        
        <request>
            <representation mediaType="application/xml" element="OS-KSADM:service">
                <doc xml:lang="EN">
                    <xsdxt:code href="../common/samples/service.xml"/>
                </doc>
            </representation>
            <representation mediaType="application/json">
                <doc xml:lang="EN">
                    <xsdxt:code href="../common/samples/service.json"/>
                </doc>
            </representation>
        </request>
        <response status="201">
            <representation mediaType="application/xml" element="OS-KSADM:service">
                <doc xml:lang="EN">
                    <xsdxt:code href="../common/samples/service.xml"/>
                </doc>
                <param name="Location" type="xsd:anyURI" style="header"/>
            </representation>
            <representation mediaType="application/json">
                <doc xml:lang="EN">
                    <xsdxt:code href="../common/samples/service.json"/>
                </doc>
                <param name="Location" type="xsd:anyURI" style="header"/>
            </representation>
        </response>
        &commonFaults;
        &postPutFaults;
        &getFaults;
    </method>
    <method name="DELETE" id="deleteService">
        <doc xml:lang="EN" title="Delete Service">
            <p xmlns="http://www.w3.org/1999/xhtml">Delete a service.</p>
        </doc>    
        <response status="204"/>
        &commonFaults;
        &getFaults;
    </method>
</application>