<?xml version="1.0" encoding="UTF-8"?>
<!-- (C) 2012-2014 OpenStack Foundation, All Rights Reserved -->
<!-- Useful for describing APIs -->
<!DOCTYPE application[
<!-- Useful for describing APIs -->
<!ENTITY GET    '<command xmlns="http://docbook.org/ns/docbook">GET</command>'>
<!ENTITY PUT    '<command xmlns="http://docbook.org/ns/docbook">PUT</command>'>
<!ENTITY POST   '<command xmlns="http://docbook.org/ns/docbook">POST</command>'>
<!ENTITY DELETE '<command xmlns="http://docbook.org/ns/docbook">DELETE</command>'>

]>

<application xmlns="http://wadl.dev.java.net/2009/02"
    xmlns:xsdxt="http://docs.rackspacecloud.com/xsd-ext/v1.0"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:wadl="http://wadl.dev.java.net/2009/02"
    xmlns:xlink="http://www.w3.org/1999/xlink">
    <resources base="https://senlin.example.com/" xml:id="clustering-api-v1.0">
        <resource id="versions" path="//">
            <method href="#getVersions-senlin-v1"/>
        </resource>
        <resource id="version" path="//v1">
            <resource id="tenant_id" path="{tenant_id}">
                <param name="tenant_id" style="template">
                    <wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN">
                        <para>The unique identifier of the tenant or account.</para>
                    </wadl:doc>
                </param>
                <resource id="profile_types" path="profile_types">
                    <method href="#profile_type_list"/>
                    <resource id="profile_schema" path="{profile_type}" >
                        <param name="profile_type" style="template" required="true"
                            xmlns="http://wadl.dev.java.net/2009/02">
                            <wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN">
                                <para role="shortdesc">The name of a profile type.</para>
                            </wadl:doc>
                        </param>
                        <method href="#profile_type_schema"/>
                    </resource>
                </resource>
                <resource id="policy_types" path="policy_types">
                    <method href="#policy_type_list"/>
                    <resource id="policy_schema" path="{policy_type}">
                        <param name="policy_type" style="template" required="true"
                            xmlns="http://wadl.dev.java.net/2009/02">
                            <wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN">
                                <para role="shortdesc">The name of a policy type.</para>
                            </wadl:doc>
                        </param>
                        <method href="#policy_type_schema"/>
                    </resource>
                </resource>
                <resource path="profiles" id="profiles">
                    <method href="#profile_list"/>
                    <method href="#profile_create"/>
                    <resource path="{profile_id}" id="profile_id">
                        <param name="profile_id" style="template" required="true">
                            <wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN">
                                <para>ID of a profile.</para>
                            </wadl:doc>
                        </param>
                        <method href="#profile_get"/>
                        <method href="#profile_update"/>
                        <method href="#profile_delete"/>
                    </resource>
                </resource>
                <resource path="policies" id="policies">
                    <method href="#policy_list"/>
                    <method href="#policy_create"/>
                    <resource path="{policy_id}" id="policy_id">
                        <param name="policy_id" style="template" required="true">
                            <wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN">
                                <para>ID of a policy.</para>
                            </wadl:doc>
                        </param>
                        <method href="#policy_get"/>
                        <method href="#policy_update"/>
                        <method href="#policy_delete"/>
                    </resource>
                </resource>
                <resource id="clusters" path="clusters">
                    <method href="#cluster_list"/>
                    <method href="#cluster_create"/>
                    <resource path="{cluster_id}" id="cluster_id">
                        <param name="cluster_id" style="template" required="true">
                            <wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN">
                                <para>The unique identifier for a cluster.</para>
                            </wadl:doc>
                        </param>
                        <method href="#cluster_get"/>
                        <method href="#cluster_update"/>
                        <method href="#cluster_delete"/>
                        <resource path="action" id="cluster_actions">
                            <method href="#cluster_action"/>
                        </resource>
                        <resource path="policies" id="cluster_policies">
                            <method href="#cluster_policy_list"/>
                            <resource path="{policy_id}" id="cluster_policy_id">
                                <param name="policy_id" style="template" required="true">
                                    <wadl:doc xlmns="http://docbook.org/ns/docbook" xml:lang="EN">
                                        The ID of a policy.
                                    </wadl:doc>
                                </param>
                                <method href="#cluster_policy_get"/>
                            </resource>
                        </resource>
                   </resource>
                </resource>
                <resource path="nodes" id="nodes">
                    <method href="#node_list"/>
                    <method href="#node_create"/>
                    <resource path="{node_id}" id="node_id">
                        <param name="node_id" style="template" required="true">
                            <wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN">
                                The ID of a node.
                            </wadl:doc>
                        </param>
                        <method href="#node_get"/>
                        <method href="#node_update"/>
                        <method href="#node_delete"/>
                        <resource path="action" id="node_actions">
                            <method href="#node_action"/>
                        </resource>
                    </resource>
                </resource>
                <resource path="actions" id="actions">
                    <method href="#action_list"/>
                    <resource path="{action_id}" id="action_id">
                        <param name="action_id" style="template" required="true">
                            <wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN">
                                <para>The unique ID of an action.</para>
                            </wadl:doc>
                        </param>
                        <method href="#action_get"/>
                    </resource>
                </resource>
                <resource path="webhooks" id="webhooks">
                    <method href="#webhook_list"/>
                    <method href="#webhook_create"/>
                    <resource path="{webhook_id}" id="webhook_id">
                        <param name="webhook_id" style="template" required="true">
                            <wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN">
                                <para>The unique ID of a webhook.</para>
                            </wadl:doc>
                        </param>
                        <method href="#webhook_get"/>
                        <method href="#webhook_delete"/>
                        <resource path="trigger" id="webhook_trigger">
                            <method href="#webhook_trigger"/>
                        </resource>
                    </resource>
                </resource>
                <resource path="events" id="events">
                    <method href="#event_list"/>
                    <resource path="{event_id}" id="event_id">
                        <param name="event_id" style="template" required="true">
                            <wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN">
                                <para>The unique ID of an event.</para>
                            </wadl:doc>
                        </param>
                        <method href="#event_get"/>
                    </resource>
                </resource>
                <resource path="build_info" id="build_info">
                    <method href="#build_info_get"/>
                </resource>
            </resource>
        </resource>
    </resources>
    <method name="GET" id="getVersions-senlin-v1">
        <wadl:doc xml:lang="EN" title="List versions" xmlns="http://docbook.org/ns/docbook">
            <para role="shortdesc">Lists information about all Clustering API versions.</para>
        </wadl:doc>
        <response status="200">
            <representation mediaType="application/json">
                <wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN">
                    <xsdxt:code href="samples/senlin-versions-response.json"/>
                </wadl:doc>
            </representation>
        </response>
    </method>
    <method name="GET" id="cluster_list">
        <wadl:doc xml:lang="EN" title="List clusters." xmlns="http://docbook.org/ns/docbook">
            <para role="shortdesc">Lists clusters.</para>
        </wadl:doc>
        <request>
            <representation mediaType="application/json">
                <param name="limit" style="query" required="false">
                    <wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN">
                        <para>Limits the number of clusters that appear on a page to this value. The
                            typical pattern of <code>limit</code> and <code>marker</code> is to make
                            an initial limited request and then to use the <code>id</code> of the
                            last cluster from the response as the <code>marker</code> parameter in a
                            subsequent limited request.
                        </para>
                    </wadl:doc>
                </param>
                <param name="marker" style="query" required="false">
                    <wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN">
                        <para>Specifies the <code>id</code> of the last-seen cluster. The typical
                            pattern of <code>limit</code> and <code>marker</code> is to make an
                            initial limited request and then to use the <code>id</code> of the last
                            cluster from the response as the <code>marker</code> parameter in a
                            subsequent limited request.
                        </para>
                    </wadl:doc>
                </param>
                <param name="filters" style="query" required="false">
                    <wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN">
                        <para>Filters to apply on the returned clusters. Each filter is in the form
                            of key-value pair, where the keys can be one of the following values:</para>
                        <itemizedlist xml:id="cluster_query_param">
                            <title>Cluster Query Filters</title>
                            <listitem>
                                <para>
                                    <code>name</code> Name of cluster, may appear more than once.
                                </para>
                            </listitem>
                            <listitem>
                                <para>
                                    <code>status</code> Status of cluster, may appear more than once.
                                </para>
                            </listitem>
                            <listitem>
                                <para>
                                    <code>project</code> Project of cluster, may appear more than once.
                                </para>
                            </listitem>
                            <listitem>
                                <para>
                                    <code>user</code> User who is owner of the cluster, may appear
                                    more than once.
                                </para>
                            </listitem>
                            <listitem>
                                <para>
                                    <code>parent</code> ID of parent cluster of the cluster, may
                                    appear more than once. This is used for nested clusters.
                                </para>
                            </listitem>
                        </itemizedlist>
                    </wadl:doc>
                </param>
                <param name="show_deleted" style="query" required="false">
                    <wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN">
                        <para>Specifies whether to include deleted clusters in the cluster list. Set
                            to <code>False</code> by default, so that deleted clusters are not shown
                            in the results of the &GET; request unless you set this value to
                            <code>True</code>.
                        </para>
                    </wadl:doc>
                </param>
                <param name="show_nested" style="query" required="false">
                    <wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN">
                        <para>Specifies whether to include nested cluster in the cluster list.</para>
                    </wadl:doc>
                </param>
                <param name="sort_keys" style="query" required="false">
                    <wadl:doc xmlns="http://docbook.org/ns/docbook"
                        xml:lang="EN">
                        <para>
                            Sorts the cluster list by one of these attributes: <code>name</code>,
                            <code>status</code>, <code>created_time</code>, or <code>updated_time
                            </code>.
                        </para>
                    </wadl:doc>
                </param>
                <param name="sort_dir" style="query" required="false">
                    <wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN">
                        <para>The sort direction of the cluster list.  Either <code>asc</code>
                            (ascending) or <code>desc</code> (descending) is acceptable.
                        </para>
                    </wadl:doc>
                </param>
            </representation>
        </request>
        <response status="200">
            <representation mediaType="application/json">
                <wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN">
                    <xsdxt:code href="samples/cluster_list_resp.json"/>
                </wadl:doc>
                <param name="clusters" style="plain" required="false">
                    <wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN">
                        <para>List of cluster records where each record contains fields like
                            <code>created_time</code>, <code>id</code>, <code>name</code>,
                            <code>profile_id</code>, <code>size</code>, <code>nodes</code>,
                            <code>status</code>, <code>status_reason</code> etc.
                        </para>
                    </wadl:doc>
                </param>
            </representation>
        </response>
    </method>
    <method name="POST" id="cluster_create">
        <wadl:doc xml:lang="EN" title="Create Cluster" xmlns="http://docbook.org/ns/docbook">
            <para role="shortdesc">Creates a cluster.</para>
        </wadl:doc>
        <request>
            <representation mediaType="application/json">
                <wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN">
                    <xsdxt:code href="samples/cluster_create.json"/>
                </wadl:doc>
                <param name="cluster" style="plain" required="true">
                    <wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN">
                        <para>A map that contains details for the cluster to be created.</para>
                        <itemizedlist xml:id="cluster_create_body">
                            <title>Cluster Create Request Body</title>
                            <listitem>
                                <para>
                                    <code>name</code> Name for the cluster to be created. (required).
                                </para>
                            </listitem>
                            <listitem>
                                <para>
                                    <code>parent</code> ID of parent cluster if the new cluster is to be
                                    a nested cluster. (optional).
                                </para>
                            </listitem>
                            <listitem>
                                <para>
                                    <code>profile_id</code> ID or name of profile to be used by the cluster.
                                    (required).
                                </para>
                            </listitem>
                            <listitem>
                                <para>
                                    <code>size</code> Initial size of the cluster, default to 0.  (required).
                                </para>
                            </listitem>
                            <listitem>
                                <para>
                                    <code>timeout</code> Cluster creation timeout as number of minutes.
                                    Default to 60. (optional).
                                </para>
                            </listitem>
                            <listitem>
                                <para>
                                    <code>metadata</code> List of key-value pairs that will be associated with
                                    the cluster. (optional).
                                </para>
                            </listitem>
                        </itemizedlist>
                    </wadl:doc>
                </param>
            </representation>
        </request>
        <response status="200">
            <representation mediaType="application/json">
                <wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN">
                    <xsdxt:code href="samples/cluster_create_resp.json" />
                </wadl:doc>
                <param name="cluster" style="plain" required="true">
                    <wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN">
                        <para>A map containing the <code>id</code>, <code>name</code>, <code>status</code>,
                            and many other fields of the cluster under creation.</para>
                    </wadl:doc>
                </param>
            </representation>
        </response>
    </method>
    <method name="GET" id="cluster_get">
        <wadl:doc xml:lang="EN" title="Show Cluster Details" xmlns="http://docbook.org/ns/docbook">
            <para role="shortdesc">Shows details for a specified cluster.</para>
        </wadl:doc>
        <response status="200">
            <representation mediaType="application/json">
                <wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN">
                    <xsdxt:code href="samples/cluster_get_resp.json"/>
                </wadl:doc>
            </representation>
        </response>
    </method>
    <method name="PATCH" id="cluster_update">
        <wadl:doc xml:lang="EN" title="Update Cluster" xmlns="http://docbook.org/ns/docbook">
            <para role="shortdesc">Updates a specified cluster.</para>
        </wadl:doc>
        <request>
            <representation mediaType="application/json">
                <wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN">
                    <xsdxt:code href="samples/cluster_update.json"/>
                </wadl:doc>
                <param name="cluster" style="plain" required="true">
                    <wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN">
                        <para>A map that contains details for the cluster to be created.</para>
                        <itemizedlist xml:id="cluster_update_body">
                            <title>Cluster Update Request Body</title>
                            <listitem>
                                <para>
                                    <code>name</code> New name for the cluster to be updated, if provided.
                                </para>
                            </listitem>
                            <listitem>
                                <para>
                                    <code>profile_id</code> New profile to be used for the cluster as a
                                    whole. Note that the new profile specified has to be of the same type
                                    of the original profile.
                                </para>
                            </listitem>
                            <listitem>
                                <para>
                                    <code>parent</code> (New) parent cluster ID for the cluster to be
                                    updated, if provided. This is intended to make the targeted cluster
                                    a nested one inside another cluster.
                                </para>
                            </listitem>
                            <listitem>
                                <para>
                                    <code>metadata</code> New metadata to be associated to the cluster being
                                    updated, if provided. The value should be a list of key-value pairs.
                                </para>
                            </listitem>
                            <listitem>
                                <para>
                                    <code>timeout</code> New timeout value (in minutes) for future cluster
                                    operations (including this update operation), if specified.
                                </para>
                            </listitem>
                        </itemizedlist>
                    </wadl:doc>
                </param>
            </representation>
        </request>
        <response status="202"/>
    </method>
    <method name="PUT" id="cluster_action">
        <wadl:doc xml:lang="EN" title="Cluster Action" xmlns="http://docbook.org/ns/docbook">
            <para role="shortdesc">Trigger an action on the specified cluster.</para>
        </wadl:doc>
        <request>
            <representation mediaType="application/json">
                <param name="action" style="plain" required="true">
                    <wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN">
                        <para>This is the name of the action to be triggered. Supported action names
                        include:</para>
                        <itemizedlist>
                            <listitem>
                                <para>
                                    <code>add_nodes</code> Add specified nodes to the cluster where nodes
                                    are provided as a list. For example:
                                    <xsdxt:code href="samples/cluster_add_nodes.json"/>
                                </para>
                            </listitem>
                            <listitem>
                                <para>
                                    <code>del_nodes</code> Delete specified nodes from the cluster where
                                    nodes are provided as a list.
                                    <xsdxt:code href="samples/cluster_del_nodes.json"/>
                                </para>
                            </listitem>
                            <listitem>
                                <para>
                                    <code>scale_out</code> Scale out (enlarge) the cluster by number of nodes
                                    specified by the <code>count</code> parameter.
                                    <xsdxt:code href="samples/cluster_scale_out.json"/>
                                </para>
                            </listitem>
                            <listitem>
                                <para>
                                    <code>scale_in</code> Scale in (shrink) the cluster by number of nodes
                                    specified by the <code>count</code> parameter.
                                    <xsdxt:code href="samples/cluster_scale_in.json"/>
                                </para>
                            </listitem>
                            <listitem>
                                <para>
                                    <code>resize</code> Change the size of the cluster using the specified
                                    parameters. Valid parameters include: <code>adjustment_type</code>,
                                    <code>number</code>, <code>min_step</code>, <code>min_size</code>,
                                    <code>max_size</code> and <code>strict</code>.
                                    <xsdxt:code href="samples/cluster_resize.json"/>
                                </para>
                            </listitem>
                            <listitem>
                                <para>
                                    <code>policy_attach</code> Attach the specified policy to the cluster where
                                    the request body contains parameters for the policy attachment.
                                    <xsdxt:code href="samples/cluster_policy_attach.json"/>
                                </para>
                            </listitem>
                            <listitem>
                                <para>
                                    <code>policy_detach</code> Detach the specified policy from the cluster
                                    where the request body contains the ID of the policy.
                                    <xsdxt:code href="samples/cluster_policy_attach.json"/>
                                </para>
                            </listitem>
                            <listitem>
                                <para>
                                    <code>policy_update</code> Update the policy attachment where the policy ID
                                    and the new property settings are provided in the request body.
                                    <xsdxt:code href="samples/cluster_policy_update.json"/>
                                </para>
                            </listitem>
                        </itemizedlist>
                        <para>Note that each action takes a different set of parameters.</para>
                    </wadl:doc>
                </param>
            </representation>
        </request>
        <response status="200">
            <representation mediaType="application/json">
                <wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN">
                    <para>The response is a map that contains the <code>action</code> key and a UUID as its value.
                    The UUID is the action that has been initiated by the request.</para>
                </wadl:doc>
            </representation>
        </response>
    </method>
    <!-- TODO: revise this -->
    <method name="GET" id="cluster_policy_list">
        <wadl:doc xml:lang="EN" title="List Policies" xmlns="http://docbook.org/ns/docbook">
            <para role="shortdesc">List the policies attahed to a cluster.</para>
        </wadl:doc>
        <request>
            <representation mediaType="application/json">
                <param name="filters" style="query" required="false">
                    <wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN">
                        <para>Filters to apply on the returned results. Each filter is in the form
                            of key-value pair, where the keys can be one of the following values:</para>
                        <itemizedlist xml:id="cluster_policy_query_param">
                            <title>Cluster Policy Query Filters</title>
                            <listitem>
                                <para>
                                    <code>priority</code> Priority value set to the policy attached to the
                                    cluster, may appear only once.
                                </para>
                            </listitem>
                            <listitem>
                                <para>
                                    <code>level</code> Enforcement level value set to the policy attached
                                    to the cluster, may appear only once.
                                </para>
                            </listitem>
                            <listitem>
                                <para>
                                    <code>cooldown</code> Cooldown seconds set to the policy attached to
                                    the cluster, may appear only once.
                                </para>
                            </listitem>
                            <listitem>
                                <para>
                                    <code>enabled</code> Enabled status set to the policy attached to the
                                    cluster. This key may appear only once.
                                </para>
                            </listitem>
                        </itemizedlist>
                    </wadl:doc>
                </param>
                <param name="sort_keys" style="query" required="false">
                    <wadl:doc xmlns="http://docbook.org/ns/docbook"
                        xml:lang="EN">
                        <para>Sorts the policy list by one of these attributes: <code>priority</code>,
                            <code>level</code>, <code>cooldown</code>, or <code>enabled</code>.
                        </para>
                    </wadl:doc>
                </param>
                <param name="sort_dir" style="query" required="false">
                    <wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN">
                        <para>The sort direction of the policy list.  Either <code>asc</code>
                            (ascending) or <code>desc</code> (descending).
                        </para>
                    </wadl:doc>
                </param>
            </representation>
        </request>
        <response status="200">
            <representation mediaType="application/json">
                <wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN">
                    <para>A list named <code>cluster_policies</code> that contains records
                        of cluster-policy bindings. Each record contains fields related to
                        the cluster, the policy and the binding itself.</para>
                    <xsdxt:code href="samples/cluster_policy_list_resp.json"/>
                </wadl:doc>
            </representation>
        </response>
    </method>
    <method name="GET" id="cluster_policy_get">
        <wadl:doc xml:lang="EN" title="Get Policy" xmlns="http://docbook.org/ns/docbook">
            <para role="shortdesc">Show details of a policy attached to a cluster.</para>
        </wadl:doc>
        <response status="200">
            <representation mediaType="application/json">
                <wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN">
                    <para>
                        A map named <code>cluster_policy</code> that contains keys like
                        <code>cluster_id</code>, <code>policy_id</code>, <code>policy_type
                        </code>, <code>level</code>, <code>cooldown</code>, <code>priority
                        </code> etc. The values are attributes of the policy that is attached
                        to the cluster.
                    </para>
                    <xsdxt:code href="samples/cluster_policy_get_resp.json"/>
                </wadl:doc>
            </representation>
        </response>
    </method>
    <method name="DELETE" id="cluster_delete">
        <wadl:doc xml:lang="EN" title="Delete Cluster" xmlns="http://docbook.org/ns/docbook">
            <para role="shortdesc">Deletes the specified cluster.</para>
        </wadl:doc>
        <response status="204"/>
    </method>
    <method name="GET" id="profile_type_list">
        <wadl:doc xml:lang="EN" title="List Profile Types" xmlns="http://docbook.org/ns/docbook">
            <para role="shortdesc">Lists the supported profile types.</para>
        </wadl:doc>
        <response status="200">
            <representation mediaType="application/json">
                <wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN">
                    <para>A list of profile types supported.</para>
                    <xsdxt:code href="samples/profile_type_list_resp.json"/>
                </wadl:doc>
            </representation>
        </response>
    </method>
    <method name="GET" id="profile_type_schema">
        <wadl:doc xml:lang="EN" title="Show Profile Schema" xmlns="http://docbook.org/ns/docbook">
            <para role="shortdesc">Shows the interface schema for a specified profile type.</para>
        </wadl:doc>
        <response status="200">
            <representation mediaType="application/json">
                <wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN">
                    <xsdxt:code href="samples/profile_schema.json"/>
                </wadl:doc>
            </representation>
        </response>
    </method>
    <method name="GET" id="policy_type_list">
        <wadl:doc xml:lang="EN" title="List Policy Types" xmlns="http://docbook.org/ns/docbook">
            <para role="shortdesc">Lists the supported policy types.</para>
        </wadl:doc>
        <response status="200">
            <representation mediaType="application/json">
                <wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN">
                    <para>A list of policy types supported.</para>
                    <xsdxt:code href="samples/policy_type_list_resp.json"/>
                </wadl:doc>
            </representation>
        </response>
    </method>
    <method name="GET" id="policy_type_schema">
        <wadl:doc xml:lang="EN" title="Show Policy Schema" xmlns="http://docbook.org/ns/docbook">
            <para role="shortdesc">Shows the interface schema for a specified policy type.</para>
        </wadl:doc>
        <response status="200">
            <representation mediaType="application/json">
                <wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN">
                    <xsdxt:code href="samples/policy_schema.json"/>
                </wadl:doc>
            </representation>
        </response>
    </method>
    <method name="GET" id="profile_list">
        <wadl:doc xml:lang="EN" title="List Profiles" xmlns="http://docbook.org/ns/docbook">
            <para role="shortdesc">List profiles.</para>
        </wadl:doc>
        <request>
            <representation mediaType="application/json">
                <param name="limit" style="query" required="false">
                    <wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN">
                        <para>
                            Limits the number of profiles that appear on a page to
                            this value. The typical pattern of <code>limit</code>
                            and <code>marker</code> is to make an initial limited
                            request and then to use the <code>id</code> of the last
                            profile from the response as the <code>marker</code>
                            parameter in a subsequent limited request.
                        </para>
                    </wadl:doc>
                </param>
                <param name="marker" style="query" required="false">
                    <wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN">
                        <para>
                            Specifies the <code>id</code> of the last-seen profile.
                            The typical pattern of <code>limit</code> and
                            <code>marker</code> is to make an initial limited
                            request and then to use the <code>id</code> of the last
                            profile from the response as the <code>marker</code>
                            parameter in a subsequent limited request.
                        </para>
                    </wadl:doc>
                </param>
                <param name="sort_keys" style="query" required="false">
                    <wadl:doc xmlns="http://docbook.org/ns/docbook"
                        xml:lang="EN">
                        <para>
                            Sorts the profile list by one of these attributes:
                            <code>name</code>, <code>type</code>,
                            <code>created_time</code>, <code>updated_time</code>,
                            <code>deleted_time</code>, <code>permission</code> and
                            <code>metadata</code>.
                        </para>
                    </wadl:doc>
                </param>
                <param name="sort_dir" style="query" required="false">
                    <wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN">
                        <para>The sort direction of the profile list.  Either
                            <code>asc</code> (ascending) or <code>desc</code>
                            (descending).
                        </para>
                    </wadl:doc>
                </param>
                <param name="filters" style="query" required="false">
                    <wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN">
                        <para>Filters to apply on the returned profiles. Each
                            filter is in the form of key-value pair, where the
                            key can be one of <code>name</code>, <code>type</code>,
                            <code>created_time</code>, <code>updated_time</code>,
                            <code>deleted_time</code>, <code>permission</code> or
                            <code>metadata</code>.
                        </para>
                    </wadl:doc>
                </param>
                <param name="show_deleted" style="query" required="false">
                    <wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN">
                        <para>Specifies whether deleted profiles are to be listed.</para>
                    </wadl:doc>
                </param>
            </representation>
        </request>
        <response status="200">
            <representation mediaType="application/json">
                <wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN">
                    <xsdxt:code href="samples/profile_list_resp.json"/>
                </wadl:doc>
                <param name="nodes" style="query" required="false">
                    <wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN">
                        <para>List of profile records where each record contains
                            fields like <code>id</code>, <code>name</code>,
                            <code>type</code>, <code>spec</code>,
                            <code>permission</code>, <code>metadata</code> values etc.
                        </para>
                    </wadl:doc>
                </param>
            </representation>
        </response>
    </method>
    <method name="POST" id="profile_create">
        <wadl:doc xml:lang="EN" title="Create Profile" xmlns="http://docbook.org/ns/docbook">
            <para role="shortdesc">Creates a new profile.</para>
        </wadl:doc>
        <request>
            <representation mediaType="application/json">
                <wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN">
                    <xsdxt:code href="samples/profile_create.json"/>
                </wadl:doc>
                <param name="profile" style="plain" required="true">
                    <wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN">
                        <para>A map that contains details for the profile to be created.</para>
                        <itemizedlist xml:id="profile_body">
                            <title>Profile Body</title>
                            <listitem>
                                <para>
                                    <code>name</code> Name for the profile to be created. (required).
                                </para>
                            </listitem>
                            <listitem>
                                <para>
                                    <code>spec</code> Detailed specification based on the chosen profile type. (required).
                                </para>
                            </listitem>
                            <listitem>
                                <para>
                                    <code>permission</code> A string representing the default permission of the proflie. (optional).
                                </para>
                            </listitem>
                            <listitem>
                                <para>
                                    <code>metadata</code> A list of key-value pairs to be associated with the profile. (optional).
                                </para>
                            </listitem>
                        </itemizedlist>
                    </wadl:doc>
                </param>
            </representation>
        </request>
        <response status="200">
            <representation mediaType="application/json">
                <wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN">
                    <xsdxt:code href="samples/profile_create_resp.json" />
                </wadl:doc>
                <param name="profile" style="plain" required="true">
                    <wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN">
                        <para>A dictionary containing the details of the profile created.</para>
                        <itemizedlist xml:id="profile_response_body">
                            <title>Profile Create Response</title>
                            <listitem>
                                <para>
                                    <code>id</code> An unique ID for the newly created profile.
                                </para>
                            </listitem>
                            <listitem>
                                <para>
                                    <code>name</code> Name for the newly created profile.
                                </para>
                            </listitem>
                            <listitem>
                                <para>
                                    <code>type</code> Name of policy type referenced by the profile.
                                </para>
                            </listitem>
                            <listitem>
                                <para>
                                    <code>spec</code> Detailed specification based on the chosen profile type.
                                </para>
                            </listitem>
                            <listitem>
                                <para>
                                    <code>permission</code> A string representing the permission of the profile.
                                </para>
                            </listitem>
                            <listitem>
                                <para>
                                    <code>metadata</code> A list of key-value pairs attached to the profile.
                                </para>
                            </listitem>
                            <listitem>
                                <para>
                                    <code>created_time</code> UTC timestamp when the profile is created.
                                </para>
                            </listitem>
                             <listitem>
                                <para>
                                    <code>updated_time</code> UTC timestamp when the profile is updated.
                                </para>
                            </listitem>
                             <listitem>
                                <para>
                                    <code>deleted_time</code> UTC timestamp when the profile is deleted.
                                </para>
                            </listitem>
                        </itemizedlist>
                    </wadl:doc>
                </param>
            </representation>
        </response>
    </method>
    <method name="GET" id="profile_get">
        <wadl:doc xml:lang="EN" title="Show Profile Data" xmlns="http://docbook.org/ns/docbook">
            <para role="shortdesc">Show detailed data for a specified profile.</para>
        </wadl:doc>
        <response status="200">
            <representation mediaType="application/json">
                <wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN">
                    <para>A profile record that contains fields like <code>id</code>,
                        <code>name</code>, <code>type</code>, <code>spec</code>,
                        <code>permission</code>, <code>metadata</code> etc.
                    </para>
                    <xsdxt:code href="samples/profile_get_resp.json"/>
                </wadl:doc>
            </representation>
        </response>
    </method>
    <method name="PATCH" id="profile_update">
        <wadl:doc xml:lang="EN" title="Update Profile" xmlns="http://docbook.org/ns/docbook">
            <para role="shortdesc">Update the specified profile.</para>
        </wadl:doc>
        <request>
            <representation mediaType="application/json">
                <wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN">
                    <xsdxt:code href="samples/profile_update.json"/>
                </wadl:doc>
                <param name="name" style="plain" required="false">
                    <wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN">
                        <para>New name, if specified, for the target profile.</para>
                    </wadl:doc>
                </param>
                <param name="spec" style="plain" required="false">
                    <wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN">
                        <para>Detailed specification based on the chosen profile type.</para>
                    </wadl:doc>
                </param>
                <param name="permission" style="plain" required="false">
                    <wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN">
                        <para>A string to be interpreted as new permission.</para>
                    </wadl:doc>
                </param>
                <param name="metadata" style="plain" required="false">
                    <wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN">
                        <para>A list of key-value pairs to be associated with the target
                            profile.</para>
                    </wadl:doc>
                </param>
            </representation>
        </request>
        <response status="200">
            <representation mediaType="application/json">
                <wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN">
                    <para>A profile record that contains fields like <code>id</code>,
                        <code>name</code>, <code>type</code>, <code>spec</code>,
                        <code>permission</code>, <code>metadata</code> etc.
                    </para>
                    <xsdxt:code href="samples/profile_update_resp.json"/>
                </wadl:doc>
            </representation>
        </response>
    </method>
    <method name="DELETE" id="profile_delete">
        <wadl:doc xml:lang="EN" title="Delete Profile" xmlns="http://docbook.org/ns/docbook">
            <para role="shortdesc">Deletes a specified profile.</para>
        </wadl:doc>
        <response status="204"/>
    </method>
    <method name="GET" id="policy_list">
        <wadl:doc xml:lang="EN" title="List Policies" xmlns="http://docbook.org/ns/docbook">
            <para role="shortdesc">List policies.</para>
        </wadl:doc>
        <request>
            <representation mediaType="application/xml">
                <param name="limit" style="query" required="false">
                    <wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN">
                        <para>
                            Limits the number of policies that appear on a page to
                            this value. The typical pattern of <code>limit</code>
                            and <code>marker</code> is to make an initial limited
                            request and then to use the <code>id</code> of the last
                            policy seen from the response as the <code>marker</code>
                            parameter in a subsequent limited request.
                        </para>
                    </wadl:doc>
                </param>
                <param name="marker" style="query" required="false">
                    <wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN">
                        <para>
                            Specifies the <code>id</code> of the last-seen policy.
                            The typical pattern of <code>limit</code> and
                            <code>marker</code> is to make an initial limited
                            request and then to use the <code>id</code> of the last
                            policy from the response as the <code>marker</code>
                            parameter in a subsequent limited request.
                        </para>
                    </wadl:doc>
                </param>
                <param name="sort_keys" style="query" required="false">
                    <wadl:doc xmlns="http://docbook.org/ns/docbook"
                        xml:lang="EN">
                        <para>Sorts the policy list by one or more of attributes:
                            <code>name</code>, <code>type</code>, <code>level</code>,
                            <code>created_time</code>, <code>updated_time</code>,
                            <code>deleted_time</code>, <code>cooldown</code>.
                        </para>
                    </wadl:doc>
                </param>
                <param name="sort_dir" style="query" required="false">
                    <wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN">
                        <para>The sort direction of the policy list.  Either
                            <code>asc</code> (ascending) or <code>desc</code>
                            (descending).
                        </para>
                    </wadl:doc>
                </param>
                <param name="filters" style="query" required="false">
                    <wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN">
                        <para>Filters to apply on the returned policies. Each
                            filter is in the form of key-value pair, where the
                            key can be one of <code>name</code>, <code>type</code>,
                            <code>level</code>, <code>cooldown</code>,
                            <code>created_time</code>, <code>updated_time</code>,
                            <code>deleted_time</code>.
                        </para>
                    </wadl:doc>
                </param>
                <param name="show_deleted" style="query" required="false">
                    <wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN">
                        <para>Specifies whether deleted policies are to be
                            listed.</para>
                    </wadl:doc>
                </param>
            </representation>
        </request>
        <response status="200">
            <representation mediaType="application/json">
                <wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN">
                    <xsdxt:code href="samples/policy_list_resp.json"/>
                </wadl:doc>
                <param name="policies" style="query" required="false">
                    <wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN">
                        <para>List of policy records where each record contains fields
                            like <code>id</code>, <code>name</code>, <code>type</code>,
                            <code>spec</code>, <code>level</code>, <code>cooldown</code>
                            etc.
                        </para>
                    </wadl:doc>
                </param>
            </representation>
        </response>
    </method>
    <method name="POST" id="policy_create">
        <wadl:doc xml:lang="EN" title="Create Policy" xmlns="http://docbook.org/ns/docbook">
            <para role="shortdesc">Create a new policy.</para>
        </wadl:doc>
        <request>
            <representation mediaType="application/json">
                <wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN">
                    <xsdxt:code href="samples/policy_create.json"/>
                </wadl:doc>
                <param name="policy" style="plain" required="true">
                    <wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN">
                        <para>A map that contains the following keys and values that specify
                            the details of the policy to be created:</para>
                        <itemizedlist xml:id="policy_body">
                            <title>Policy body</title>
                            <listitem>
                                <para>
                                    <code>name</code> Name for the newly created policy. (required).
                                </para>
                            </listitem>
                            <listitem>
                                <para>
                                    <code>spec</code> Detailed specification based on the chosen policy type. (required).
                                </para>
                            </listitem>
                            <listitem>
                                <para>
                                    <code>level</code> A number representing the default enforcement level. (optional).
                                </para>
                            </listitem>
                            <listitem>
                                <para>
                                    <code>cooldown</code> A number representing the default cooldown seconds. (optional).
                                </para>
                            </listitem>
                        </itemizedlist>
                    </wadl:doc>
                </param>
            </representation>
        </request>
        <response status="200">
            <representation mediaType="application/json">
                <wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN">
                    <xsdxt:code href="samples/policy_create_resp.json" />
                </wadl:doc>
                <param name="policy" style="plain" required="true">
                    <wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN">
                        <para>A map that contains the following keys and values that provides the
                            details of the policy that is created:</para>
                        <itemizedlist xml:id="policy_response_body">
                            <title>Policy Create Response</title>
                            <listitem>
                                <para>
                                    <code>id</code> An unique ID for the newly created policy.
                                </para>
                            </listitem>
                            <listitem>
                                <para>
                                    <code>name</code> Name for the newly created policy.
                                </para>
                            </listitem>
                            <listitem>
                                <para>
                                    <code>type</code> Name of policy type referenced by the policy.
                                </para>
                            </listitem>
                            <listitem>
                                <para>
                                    <code>spec</code> Detailed specification based on the chosen policy type.
                                </para>
                            </listitem>
                            <listitem>
                                <para>
                                    <code>level</code> A number representing the default enforcement level.
                                </para>
                            </listitem>
                            <listitem>
                                <para>
                                    <code>cooldown</code> A number representing the default cooldown seconds.
                                </para>
                            </listitem>
                            <listitem>
                                <para>
                                    <code>created_time</code> UTC timestamp when the policy is created.
                                </para>
                            </listitem>
                             <listitem>
                                <para>
                                    <code>updated_time</code> UTC timestamp when the policy is updated.
                                </para>
                            </listitem>
                             <listitem>
                                <para>
                                    <code>deleted_time</code> UTC timestamp when the policy is deleted.
                                </para>
                            </listitem>
                        </itemizedlist>
                    </wadl:doc>
                </param>
            </representation>
        </response>
    </method>
    <method name="GET" id="policy_get">
        <wadl:doc xml:lang="EN" title="Show Policy Data" xmlns="http://docbook.org/ns/docbook">
            <para role="shortdesc">Show detailed data for a specified policy.</para>
        </wadl:doc>
        <response status="200">
            <representation mediaType="application/json">
                <wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN">
                    <para>A policy record that contains fields like <code>id</code>,
                        <code>name</code>, <code>type</code>, <code>spec</code>, <code>level</code>,
                        <code>cooldown</code>, <code>created_time</code>, <code>deleted_time</code>
                        etc.
                    </para>
                    <xsdxt:code href="samples/policy_get_resp.json"/>
                </wadl:doc>
            </representation>
        </response>
    </method>
    <method name="PATCH" id="policy_update">
        <wadl:doc xml:lang="EN" title="Update Policy" xmlns="http://docbook.org/ns/docbook">
            <para role="shortdesc">Update the specified policy.</para>
        </wadl:doc>
        <request>
            <representation mediaType="application/json">
                <wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN">
                    <xsdxt:code href="samples/policy_update.json"/>
                </wadl:doc>
                <param name="policy" style="plain" required="true">
                    <wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN">
                        <para>A map that contains the following keys and values that specify
                            the details of the policy to be updated:</para>
                        <itemizedlist xml:id="policy_update_body">
                            <title>Policy body</title>
                            <listitem>
                                <para>
                                    <code>name</code> New name for the policy, if specified.
                                </para>
                            </listitem>
                            <listitem>
                                <para>
                                    <code>level</code> New enforcement level for the policy, if specified.
                                </para>
                            </listitem>
                            <listitem>
                                <para>
                                    <code>cooldown</code> New cooldown seconds for the policy, if specified.
                                </para>
                            </listitem>
                        </itemizedlist>
                    </wadl:doc>
                </param>
            </representation>
        </request>
        <response status="200">
            <representation mediaType="application/json">
                <wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN">
                    <para>A policy record that contains fields like <code>id</code>,
                        <code>name</code>, <code>type</code>, <code>spec</code>, <code>level</code>,
                        <code>cooldown</code>, <code>created_time</code>, <code>updated_time</code>,
                        <code>deleted_time</code> etc.
                    </para>
                    <xsdxt:code href="samples/policy_update_resp.json"/>
                </wadl:doc>
            </representation>
        </response>
    </method>
    <method name="DELETE" id="policy_delete">
        <wadl:doc xml:lang="EN" title="Delete Policy" xmlns="http://docbook.org/ns/docbook">
            <para role="shortdesc">Deletes a specified policy.</para>
        </wadl:doc>
        <response status="204"/>
    </method>
    <method name="GET" id="node_list">
        <wadl:doc xml:lang="EN" title="List Nodes" xmlns="http://docbook.org/ns/docbook">
            <para role="shortdesc">Lists nodes.</para>
        </wadl:doc>
        <request>
            <representation mediaType="application/xml">
                <param name="cluster_id" style="query" required="false">
                    <wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN">
                        <para>ID of the cluster for the nodes to be listed.</para>
                    </wadl:doc>
                </param>
                <param name="show_deleted" style="query" required="false">
                    <wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN">
                        <para>Specifies whether deleted nodes are to be listed.</para>
                    </wadl:doc>
                </param>
                <param name="filters" style="query" required="false">
                    <wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN">
                        <para>A list of key-value pairs for filtering the returned nodes.</para>
                    </wadl:doc>
                </param>
                <param name="limit" style="query" required="false">
                    <wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN">
                        <para>
                            Limits the number of nodes that appear on one invocation to this
                            value. The typical pattern of <code>limit</code> and <code>marker</code>
                            is to make an initial limited request and then to use the
                            <code>id</code> of the last node from the response as the
                            <code>marker</code> parameter in a subsequent limited request.
                        </para>
                    </wadl:doc>
                </param>
                <param name="marker" style="query" required="false">
                    <wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN">
                        <para>
                            Specifies the <code>id</code> of the last-seen node. The typical
                            pattern of <code>limit</code> and <code>marker</code> is to make
                            an initial limited request and then to use the <code>id</code> of
                            the last node from the response as the <code>marker</code>
                            parameter in a subsequent limited request.
                        </para>
                    </wadl:doc>
                </param>
                <param name="sort_keys" style="query" required="false">
                    <wadl:doc xmlns="http://docbook.org/ns/docbook"
                        xml:lang="EN">
                        <para>Sorts the node list by one of these attributes: <code>name</code>,
                            <code>status</code>, <code>created_time</code>, or <code>updated_time
                            </code>.
                        </para>
                    </wadl:doc>
                </param>
                <param name="sort_dir" style="query" required="false">
                    <wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN">
                        <para>The sort direction of the node list.  Either <code>asc</code>
                            (ascending) or <code>desc</code> (descending) is acceptable.
                        </para>
                    </wadl:doc>
                </param>
                <param name="global_tenant" style="query" required="false">
                    <wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN">
                        <para>Indicates whether nodes from tenants(projects) are to be listed.
                            Operation subject to access policy enforcement.</para>
                    </wadl:doc>
                </param>
            </representation>
        </request>
        <response status="200">
            <representation mediaType="application/json">
                <wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN">
                    <xsdxt:code href="samples/node_list_resp.json"/>
                </wadl:doc>
                <param name="nodes" style="query" required="false">
                    <wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN">
                        <para>List of node records where each record contains fields like
                            <code>id</code>, <code>cluster_id</code>, <code>name</code>,
                            <code>physical_id</code>, <code>profile_id</code>, <code>created_time</code>,
                            <code>index</code>, <code>status</code>, <code>status_reason</code>,
                            <code>metadata</code>, <code>updated_time</code> etc.
                        </para>
                    </wadl:doc>
                </param>
            </representation>
        </response>
    </method>
    <method name="POST" id="node_create">
        <wadl:doc xml:lang="EN" title="Create Node" xmlns="http://docbook.org/ns/docbook">
            <para role="shortdesc">Creates a new node.</para>
        </wadl:doc>
        <request>
            <representation mediaType="application/json">
                <wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN">
                    <xsdxt:code href="samples/node_create.json"/>
                </wadl:doc>
                <param name="node" style="plain" required="true">
                    <wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN">
                        <para>A map that contains detailed data for the node to be created.</para>
                        <itemizedlist xml:id="node_create_body">
                            <title>Node Create Request Body</title>
                            <listitem>
                                <para>
                                    <code>name</code> Name for the newly created node. [Required].
                                </para>
                            </listitem>
                             <listitem>
                                <para>
                                    <code>profile_id</code> ID or name or short ID of the profile
                                    used by the node for creation. [Required].
                                </para>
                            </listitem>
                            <listitem>
                                <para>
                                    <code>cluster_id</code> ID or name or short ID of the cluster
                                    the node lives in. If not specified, the node created will be
                                    an orphaned node. [Optional].
                                </para>
                            </listitem>
                            <listitem>
                                <para>
                                    <code>role</code> A string indicating the role this node plays
                                    in a cluster. [Optional].
                                </para>
                            </listitem>
                            <listitem>
                                <para>
                                    <code>metadata</code> A list of key-value pairs to be attached to
                                    the newly created node. [Optional].
                                </para>
                            </listitem>
                        </itemizedlist>
                    </wadl:doc>
                </param>
            </representation>
        </request>
        <response status="200">
            <representation mediaType="application/json">
                <wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN">
                    <xsdxt:code href="samples/node_create_resp.json" />
                </wadl:doc>
                <param name="node" style="plain" required="true">
                    <wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN">
                        <para>A dictionary containing the detailed data of the node created such as
                            <code>id</code>, <code>name</code>, <code>status</code> etc. .</para>
                    </wadl:doc>
                </param>
            </representation>
        </response>
    </method>
    <method name="PATCH" id="node_update">
        <wadl:doc xml:lang="EN" title="Update Node" xmlns="http://docbook.org/ns/docbook">
            <para role="shortdesc">Update the specified node.</para>
        </wadl:doc>
        <request>
            <representation mediaType="application/json">
                <wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN">
                    <xsdxt:code href="samples/node_update.json"/>
                </wadl:doc>
                <param name="node" style="plain" required="true">
                    <wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN">
                        <para>A map that contains detailed data for the node to be updated.</para>
                        <itemizedlist xml:id="node_create_body">
                            <title>Node Update Request Body</title>
                            <listitem>
                                <para>
                                    <code>name</code> New name for the node. [Optional].
                                </para>
                            </listitem>
                             <listitem>
                                <para>
                                    <code>profile_id</code> ID or name or short ID of the new
                                    profile to be used by the node. The new profile has to have
                                    the same profile type as that of the node. [Optional].
                                </para>
                            </listitem>
                            <listitem>
                                <para>
                                    <code>role</code> A string indicating the new role this node
                                    plays in a cluster. [Optional].
                                </para>
                            </listitem>
                            <listitem>
                                <para>
                                    <code>metadata</code> A list of key-value pairs to be attached to
                                    the updated node. [Optional].
                                </para>
                            </listitem>
                        </itemizedlist>
                    </wadl:doc>
                </param>
            </representation>
        </request>
        <response status="202"/>
    </method>
    <method name="PUT" id="node_action">
        <wadl:doc xml:lang="EN" title="Node Action" xmlns="http://docbook.org/ns/docbook">
            <para role="shortdesc">Trigger an action on the specified node.</para>
        </wadl:doc>
        <request>
            <representation mediaType="application/json">
                <param name="action" style="plain" required="true">
                    <wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN">
                        <para>
                            This is the name of the action to be triggered. Supported action names
                            include:
                        </para>
                        <itemizedlist>
                            <listitem>
                                <para>
                                    <code>join</code> Add current node to the specified cluster.
                                    <xsdxt:code href="samples/node_join.json"/>
                                </para>
                            </listitem>
                            <listitem>
                                <para>
                                    <code>leave</code> Delete current node from its current cluster.
                                    <xsdxt:code href="samples/node_leave.json"/>
                                </para>
                            </listitem>
                        </itemizedlist>
                    </wadl:doc>
                </param>
            </representation>
        </request>
        <response status="200">
            <representation mediaType="application/json">
                <wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN">
                    <para>
                        The response is a map that contains the <code>action</code> key
                        and a UUID as its value.  The UUID is the action that has been
                        initiated by the request.
                    </para>
                </wadl:doc>
            </representation>
        </response>
    </method>
    <method name="DELETE" id="node_delete">
        <wadl:doc title="Delete Node" xmlns="http://docbook.org/ns/docbook" xml:lang="EN">
            <para role="shortdesc">Deletes a specified node.</para>
        </wadl:doc>
        <response status="204"/>
    </method>
    <method name="GET" id="node_get">
        <wadl:doc xml:lang="EN" title="Show Node Data" xmlns="http://docbook.org/ns/docbook">
            <para role="shortdesc">Shows data for a specified node.</para>
        </wadl:doc>
        <request>
            <representation mediaType="application/json">
                <param name="show_details" style="query" required="false">
                    <wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN">
                        <para>
                            A boolean indicating whether the node details should be returned.
                            Default is False.
                        </para>
                    </wadl:doc>
                </param>
            </representation>
        </request>
        <response status="200">
            <representation mediaType="application/json">
                <wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN">
                    <para>
                        A node record that contains fields like <code>id</code>, <code>cluster_id</code>,
                        <code>name</code>, <code>physical_id</code>, <code>profile_id</code>,
                        <code>created_time</code>, <code>index</code>, <code>status</code>,
                        <code>status_reason</code>, <code>metadata</code>, <code>updated_time</code> etc.
                    </para>
                    <xsdxt:code href="samples/node_get_resp.json"/>
                </wadl:doc>
            </representation>
        </response>
    </method>
    <method name="GET" id="webhook_list">
        <wadl:doc xml:lang="EN" title="List Webhooks" xmlns="http://docbook.org/ns/docbook">
            <para role="shortdesc">List webhooks.</para>
        </wadl:doc>
        <request>
            <representation mediaType="application/xml">
                <param name="show_deleted" style="query" required="false">
                    <wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN">
                        <para>Specifies whether deleted webhooks are to be listed.</para>
                    </wadl:doc>
                </param>
                <param name="filters" style="query" required="false">
                    <wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN">
                        <para>
                            A list of key-value pairs for filtering the returned nodes.
                            The valid filter keys are <code>name</code>, <code>user</code>,
                            <code>obj_type</code>, <code>obj_id</code>, <code>action</code>.
                        </para>
                    </wadl:doc>
                </param>
                <param name="limit" style="query" required="false">
                    <wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN">
                        <para>
                            Limits the number of webhooks that appear on one invocation to this
                            value. The typical pattern of <code>limit</code> and <code>marker</code>
                            is to make an initial limited request and then to use the
                            <code>id</code> of the last webhook from the response as the
                            <code>marker</code> parameter in a subsequent limited request.
                        </para>
                    </wadl:doc>
                </param>
                <param name="marker" style="query" required="false">
                    <wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN">
                        <para>
                            Specifies the <code>id</code> of the last-seen webhook. The typical
                            pattern of <code>limit</code> and <code>marker</code> is to make
                            an initial limited request and then to use the <code>id</code> of
                            the last-seen webhook from the response as the <code>marker</code>
                            parameter in a subsequent limited request.
                        </para>
                    </wadl:doc>
                </param>
                <param name="sort_keys" style="query" required="false">
                    <wadl:doc xmlns="http://docbook.org/ns/docbook"
                        xml:lang="EN">
                        <para>Sorts the webhook list by one of these attributes: <code>name</code>,
                            <code>obj_id</code>, <code>obj_type</code>, <code>created_time </code>
                            and <code>deleted_time</code>.
                        </para>
                    </wadl:doc>
                </param>
                <param name="sort_dir" style="query" required="false">
                    <wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN">
                        <para>The sort direction of the webhook list.  Either <code>asc</code>
                            (ascending) or <code>desc</code> (descending) is acceptable.
                        </para>
                    </wadl:doc>
                </param>
                <param name="global_tenant" style="query" required="false">
                    <wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN">
                        <para>Indicates whether webhooks from all tenants(projects) are listed.
                            This operation is subject to access privilege constraints.</para>
                    </wadl:doc>
                </param>
            </representation>
        </request>
        <response status="200">
            <representation mediaType="application/json">
                <wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN">
                    <xsdxt:code href="samples/webhook_list_resp.json"/>
                </wadl:doc>
                <param name="nodes" style="query" required="false">
                    <wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN">
                        <para>List of webhook records where each record contains fields like
                            <code>id</code>, <code>name</code>, <code>user</code>, <code>project></code>,
                            <code>domain</code>, <code>obj_id</code>, <code>obj_type</code>,
                            <code>action</code>, <code>credential</code>, <code>params</code>,
                            <code>created_time</code> and <code>deleted_time</code> etc.
                        </para>
                    </wadl:doc>
                </param>
            </representation>
        </response>
    </method>
    <method name="POST" id="webhook_create">
        <wadl:doc xml:lang="EN" title="Create Webhook" xmlns="http://docbook.org/ns/docbook">
            <para role="shortdesc">Creates a new webhook.</para>
        </wadl:doc>
        <request>
            <representation mediaType="application/json">
                <wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN">
                    <xsdxt:code href="samples/webhook_create.json"/>
                </wadl:doc>
                <param name="webhook" style="plain" required="true">
                    <wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN">
                        <para>A map that contains detailed data for the webhook to be created.</para>
                        <itemizedlist xml:id="webhook_create_body">
                            <title>Webhook Create Request Body</title>
                            <listitem>
                                <para>
                                    <code>name</code> Name for the newly created webhook. [Optional].
                                </para>
                            </listitem>
                            <listitem>
                                <para>
                                    <code>obj_id</code> ID or name or short ID of the object targeted
                                    by the webhook created. [Required].
                                </para>
                            </listitem>
                            <listitem>
                                <para>
                                    <code>obj_type</code> The type of the object to be operated. Valid
                                    values include <code>cluster</code>, <code>node</code> and <code>
                                    policy</code>. [Required].
                                </para>
                            </listitem>
                            <listitem>
                                <para>
                                    <code>action</code> A string indicating the action to be initiated
                                    when the webhook is triggered. Valid values are dependent on the
                                    <code>obj_type</code> specified. [Required].
                                </para>
                            </listitem>
                            <listitem>
                                <para>
                                    <code>credential</code> A map of key-value pairs to be used for
                                    authentication. If omitted, the requester's credential will be
                                    used. [Optional].
                                </para>
                            </listitem>
                            <listitem>
                                <para>
                                    <code>params</code> A map of key-value pairs to be used for
                                    action creation. Some actions may require certain input parameters.
                                    [Optional].
                                </para>
                            </listitem>
                        </itemizedlist>
                    </wadl:doc>
                </param>
            </representation>
        </request>
        <response status="200">
            <representation mediaType="application/json">
                <wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN">
                    <xsdxt:code href="samples/webhook_create_resp.json" />
                </wadl:doc>
                <param name="webhook" style="plain" required="true">
                    <wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN">
                        <para>A dictionary containing the details of the webhook created such as
                            <code>id</code>, <code>name</code>, <code>action</code> etc. .</para>
                    </wadl:doc>
                </param>
            </representation>
        </response>
    </method>
    <method name="GET" id="webhook_get">
        <wadl:doc xml:lang="EN" title="Show Webhook Data" xmlns="http://docbook.org/ns/docbook">
            <para role="shortdesc">Shows data for a specified webhook.</para>
        </wadl:doc>
        <response status="200">
            <representation mediaType="application/json">
                <wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN">
                    <para>
                        A webhook record that contains fields like <code>id</code>, <code>name</code>,
                        <code>obj_id</code>, <code>obj_type</code>, <code>action</code>,
                        <code>credential</code>, <code>params</code>, <code>created_time</code>,
                        <code>created_time</code>, <code>deleted_time</code>, <code>user</code>,
                        <code>project</code> and <code>domain</code> etc.
                    </para>
                    <xsdxt:code href="samples/webhook_get_resp.json"/>
                </wadl:doc>
            </representation>
        </response>
    </method>
    <method name="DELETE" id="webhook_delete">
        <wadl:doc title="Delete Webhook" xmlns="http://docbook.org/ns/docbook" xml:lang="EN">
            <para role="shortdesc">Deletes a specified webhook.</para>
        </wadl:doc>
        <response status="204"/>
    </method>
    <method name="POST" id="webhook_trigger">
        <wadl:doc xml:lang="EN" title="Webhook Trigger" xmlns="http://docbook.org/ns/docbook">
            <para role="shortdesc">Trigger the execution of a webhook.</para>
        </wadl:doc>
        <request>
            <representation mediaType="application/json">
                <param name="key" style="query" required="true">
                    <wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN">
                        <para>
                            This is the key used to decipher the credentials stored in database.
                            Senlin will use the decrypted data for authentication.
                        </para>
                    </wadl:doc>
                </param>
                <param name="params" style="plain" required="true">
                    <wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN">
                        <para>
                            This is the json body used as inputs for the targeted action.
                        </para>
                    </wadl:doc>
                </param>
            </representation>
        </request>
        <response status="200">
            <representation mediaType="application/json">
                <wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN">
                    <para>
                        The response is a map that contains the <code>action</code> key
                        and a UUID as its value.  The UUID is the action that has been
                        initiated by the request.
                    </para>
                </wadl:doc>
            </representation>
        </response>
    </method>
    <method name="GET" id="event_list">
        <wadl:doc xml:lang="EN" title="List Events" xmlns="http://docbook.org/ns/docbook">
            <para role="shortdesc">Lists events.</para>
        </wadl:doc>
        <request>
            <representation mediaType="application/json">
                <param name="limit" style="query" required="false">
                    <wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN">
                        <para>
                            Limits the number of events that appear on a page to this value.
                            The typical pattern of <code>limit</code> and <code>marker</code>
                            is to make an initial limited request and then to use the ID of
                            the last event from the response as the <code>marker</code>
                            parameter in a subsequent limited request.
                        </para>
                    </wadl:doc>
                </param>
                <param name="marker" style="query" required="false">
                    <wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN">
                        <para>
                            Specifies the ID of the last-seen event.  The typical pattern of
                            <code>limit</code> and <code>marker</code> is to make an initial
                            limited request and then to use the ID of the last event from the
                            response as the marker parameter in a subsequent limited request.
                        </para>
                    </wadl:doc>
                </param>
                <param name="sort_keys" style="query" required="false">
                    <wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN">
                        <para>
                            Sorts the event list by: <code>timestamp</code>, <code>obj_type
                            </code>, <code>obj_name</code>, <code>user</code>, <code>action
                            </code>.
                    </para>
                    </wadl:doc>
                </param>
                <param name="sort_dir" style="query" required="false">
                    <wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN">
                        <para>
                            The sort direction of the event list. Valid values include
                            <code>asc</code> (ascending) or <code>desc</code> (descending).
                            Default is <code>asc</code>.
                        </para>
                    </wadl:doc>
                </param>
                <param name="global_tenant" style="query" required="false">
                    <wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN">
                        <para>
                            Whether events related to all tenants should be returned.
                            Default is False
                        </para>
                    </wadl:doc>
                </param>
                <param name="show_deleted" style="query" required="false">
                    <wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN">
                        <para>
                            Whether deleted events should be returned as well.
                            Default is False
                        </para>
                    </wadl:doc>
                </param>
                <param name="filters" style="query" required="false">
                    <wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN">
                        <para>
                            A list of key-value pairs for filtering the events returned.
                            The key can be one of:
                        </para>
                        <itemizedlist>
                            <listitem>
                                <para>
                                    <code>obj_id</code> ID of an object for which the
                                    events are to be listed. An object here can be a
                                    cluster, a node, a policy etc. This key can appear
                                    more than once.
                                </para>
                            </listitem>
                            <listitem>
                                <para>
                                    <code>obj_type</code> Type of an object for which the
                                    events are to be listed. The type here can be one of
                                    <code>CLUSTER</code>, <code>NODE</code>, <code>POLICY
                                    </code> etc. This key can appear more than once.
                                </para>
                            </listitem>
                            <listitem>
                                <para>
                                    <code>obj_name</code> Name of an object for which the
                                    events are to be listed. This key can appear more than
                                    once.
                                </para>
                            </listitem>
                            <listitem>
                                <para>
                                    <code>cluster_id</code> ID of the cluster an event is
                                    related to. This key can appear more than once.
                                </para>
                            </listitem>
                            <listitem>
                                <para>
                                    <code>action</code> ID of the action to which an event
                                    is related. This key can appear more than once.
                                </para>
                            </listitem>
                        </itemizedlist>
                    </wadl:doc>
                </param>
            </representation>
        </request>
        <response status="200">
            <representation mediaType="application/json">
                <wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN">
                    <xsdxt:code href="samples/event_list_resp.json"/>
                </wadl:doc>
            </representation>
        </response>
    </method>
    <method name="GET" id="event_get">
        <wadl:doc xml:lang="EN" title="Show Event Data" xmlns="http://docbook.org/ns/docbook">
            <para role="shortdesc">Shows details for a specified event.</para>
        </wadl:doc>
        <response status="200">
            <representation mediaType="application/json">
                <wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN">
                    <para>
                        A map named <code>event</code> that contains the details of an event
                        such as <code>TIMESTAMP</code>, <code>LEVEL</code> etc.
                    </para>
                    <xsdxt:code href="samples/event_get_resp.json"/>
                </wadl:doc>
            </representation>
        </response>
    </method>
    <method name="GET" id="action_list">
        <wadl:doc xml:lang="EN" title="List Actions" xmlns="http://docbook.org/ns/docbook">
            <para role="shortdesc">Lists actions.</para>
        </wadl:doc>
        <request>
            <representation mediaType="application/json">
               <param name="filters" style="query" required="false">
                    <wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN">
                        <para>
                            A list of key-value pairs for filtering the actions returned, where
                            the key can be one of:
                        </para>
                        <itemizedlist>
                            <listitem>
                                <para>
                                    <code>name</code> Name of the action object to filter, can be
                                    specified more than once.
                                </para>
                            </listitem>
                            <listitem>
                                <para>
                                    <code>target</code> ID of an object for which the actions were
                                    initiated. An object can be a cluster, a node etc. Can be
                                    specified more than once.
                                </para>
                            </listitem>
                            <listitem>
                                <para>
                                    <code>action</code> Action verb to filter on. Can be specified
                                    more than once.
                                </para>
                            </listitem>
                            <listitem>
                                <para>
                                    <code>created_time</code> Timestamp when action was created.
                                    Can be specified only once.
                                </para>
                            </listitem>
                            <listitem>
                                <para>
                                    <code>updated_time</code> Timestamp when action was updated.
                                    Can be specified only once.
                                </para>
                            </listitem>
                            <listitem>
                                <para>
                                    <code>deleted_time</code> Timestamp when action was deleted.
                                    Can be specified only once.
                                </para>
                            </listitem>
                        </itemizedlist>
                    </wadl:doc>
                </param>
                <param name="limit" style="query" required="false">
                    <wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN">
                        <para>
                            Limits the number of actions that appear on a page to this value.
                            The typical pattern of <code>limit</code> and <code>marker</code> is
                            to make an initial limited request and then to use the <code>id</code>
                            of the last action from the response as the <code>marker</code>
                            parameter in a subsequent limited request.
                        </para>
                    </wadl:doc>
                </param>
                <param name="marker" style="query" required="false">
                    <wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN">
                        <para>
                            Specifies the <code>id</code> of the last-seen action.  The typical
                            pattern of <code>limit</code> and <code>marker</code> is to make an
                            initial limited request and then to use the <code>id</code> of the
                            last action from the response as the <code>marker</code> parameter
                            in a subsequent limited request.
                        </para>
                    </wadl:doc>
                </param>
                <param name="sort_keys" style="query" required="false">
                    <wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN">
                        <para>
                            Sorts the action list by the specified keys. Default to None. Valid
                            keys include <code>name</code>, <code>target</code>, <code>action</code>,
                            <code>created_time</code>, <code>status</code> etc.
                        </para>
                    </wadl:doc>
                </param>
                <param name="sort_dir" style="query" required="false">
                    <wadl:doc xmlns="http://docbook.org/ns/docbook"
                        xml:lang="EN">
                        <para>
                            The sort direction of the action list. Valid values are <code>asc
                            </code> (ascending) or <code>desc</code> (descending). Default is
                            <code>asc</code>.
                        </para>
                    </wadl:doc>
                </param>
                <param name="show_deleted" style="query" required="false">
                    <wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN">
                        <para>
                            Whether deleted action entries should be included in the list.
                            Default to False.
                        </para>
                    </wadl:doc>
                </param>
            </representation>
        </request>
        <response status="200">
            <representation mediaType="application/json">
                <wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN">
                    <para>
                        A list named <code>actions</code> that contains all records that
                        meet the criteria. Each record is a map that provides detailed data
                        about an action.
                    </para>
                    <xsdxt:code href="samples/action_list_resp.json"/>
                </wadl:doc>
            </representation>
        </response>
    </method>
    <method name="GET" id="action_get">
        <wadl:doc xml:lang="EN" title="Show Action Data" xmlns="http://docbook.org/ns/docbook">
            <para role="shortdesc">Shows details for a specified action.</para>
        </wadl:doc>
        <response status="200">
            <representation mediaType="application/json">
                <wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN">
                    <para>A map named <code>action</code> that contains the fields of an action
                        such as <code>id</code>, <code>action</code> etc.</para>
                    <xsdxt:code href="samples/action_get_resp.json"/>
                </wadl:doc>
            </representation>
        </response>
    </method>
    <method name="GET" id="build_info_get">
        <wadl:doc xml:lang="EN" title="Show Build Information" xmlns="http://docbook.org/ns/docbook">
            <para role="shortdesc">Shows build information for a senlin deployment.</para>
        </wadl:doc>
        <response status="200">
            <representation mediaType="application/json">
                <wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN">
                    <xsdxt:code href="samples/build_info.json"/>
                </wadl:doc>
            </representation>
        </response>
    </method>
</application>
