Rework webhook API for clustering service

This patch reworks the webhook API based on latest revisions to the
clustering API. The main revision is about generalizing webhooks into
receivers.

Change-Id: I135eafdee04450b94c55515b3c27f221687fb009
This commit is contained in:
tengqm
2015-12-26 01:29:43 -05:00
committed by Diane Fleming
parent 08efaccb6e
commit 2cec2fbf1b
11 changed files with 240 additions and 209 deletions

View File

@@ -184,21 +184,29 @@
</wadl:resource>
</wadl:resources>
</section>
<section xml:id="receivers">
<title>Receivers</title>
<para>
Lists all receivers and creates, shows information for, and deletes
a receiver.
</para>
<wadl:resources xmlns:wadl="http://wadl.dev.java.net/2009/02">
<wadl:resource href="../wadls/clustering-api/src/v1/wadl/clustering-api.wadl#receivers">
<wadl:method href="#listReceivers"/>
<wadl:method href="#createReceiver"/>
</wadl:resource>
<wadl:resource href="../wadls/clustering-api/src/v1/wadl/clustering-api.wadl#receiver_res_id">
<wadl:method href="#showReceiver"/>
<wadl:method href="#deleteReceiver"/>
</wadl:resource>
</wadl:resources>
</section>
<section xml:id="webhooks">
<title>Webhooks</title>
<para>
Lists all webhooks and creates, shows information for, deletes,
and triggers an action on a webhook.
Triggers an action represented by a webhook.
</para>
<wadl:resources xmlns:wadl="http://wadl.dev.java.net/2009/02">
<wadl:resource href="../wadls/clustering-api/src/v1/wadl/clustering-api.wadl#webhooks">
<wadl:method href="#listWebhooks"/>
<wadl:method href="#createWebhook"/>
</wadl:resource>
<wadl:resource href="../wadls/clustering-api/src/v1/wadl/clustering-api.wadl#webhook_res_id">
<wadl:method href="#showWebhook"/>
<wadl:method href="#deleteWebhook"/>
</wadl:resource>
<wadl:resource href="../wadls/clustering-api/src/v1/wadl/clustering-api.wadl#webhook_trigger">
<wadl:method href="#triggerWebhook"/>
</wadl:resource>

View File

@@ -89,6 +89,16 @@
</para>
</wadl:doc>
</param>'>
<!ENTITY receiver_idTemplateParameter '
<param name="receiver_id" style="template" required="true"
xmlns="http://wadl.dev.java.net/2009/02" type="csapi:UUID">
<wadl:doc xmlns="http://docbook.org/ns/docbook"
xmlns:wadl="http://wadl.dev.java.net/2009/02" xml:lang="EN">
<para>
The UUID of the receiver.
</para>
</wadl:doc>
</param>'>
<!ENTITY webhook_idTemplateParameter '
<param name="webhook_id" style="template" required="true"
xmlns="http://wadl.dev.java.net/2009/02" type="csapi:UUID">

View File

@@ -0,0 +1,11 @@
{
"receiver": {
"action": "CLUSTER_SCALE_OUT",
"cluster_id": "cf99d754-3cdc-47f4-8a29-cd14f02f5436",
"name": "cluster_inflate",
"params": {
"count": "1"
},
"type": "webhook"
}
}

View File

@@ -0,0 +1,26 @@
{
"receiver": {
"action": "CLUSTER_SCALE_OUT",
"actor": {
"trust_id": [
"6dc6d336e3fc4c0a951b5698cd1236d9"
]
},
"channel": {
"alarm_url": "http://node1:8778/v1/webhooks/e03dd2e5-8f2e-4ec1-8c6a-74ba891e5422/trigger?V=1&count=1"
},
"cluster_id": "ae63a10b-4a90-452c-aef1-113a0b255ee3",
"created_time": "2015-06-27T05:09:43",
"deleted_time": null,
"domain": "Default",
"id": "573aa1ba-bf45-49fd-907d-6b5d6e6adfd3",
"name": "cluster_inflate",
"params": {
"count": "1"
},
"project": "6e18cc2bdbeb48a5b3cad2dc499f6804",
"type": "webhook",
"updated_time": null,
"user": "b4ad2d6e18cc2b9c48049f6dbe8a5b3c"
}
}

View File

@@ -0,0 +1,26 @@
{
"receiver": {
"action": "CLUSTER_SCALE_OUT",
"actor": {
"trust_id": [
"6dc6d336e3fc4c0a951b5698cd1236d9"
]
},
"channel": {
"alarm_url": "http://node1:8778/v1/webhooks/e03dd2e5-8f2e-4ec1-8c6a-74ba891e5422/trigger?V=1&count=1"
},
"cluster_id": "ae63a10b-4a90-452c-aef1-113a0b255ee3",
"created_time": "2015-06-27T05:09:43",
"deleted_time": null,
"domain": "Default",
"id": "573aa1ba-bf45-49fd-907d-6b5d6e6adfd3",
"name": "cluster_inflate",
"params": {
"count": "1"
},
"project": "6e18cc2bdbeb48a5b3cad2dc499f6804",
"type": "webhook",
"updated_time": null,
"user": "b4ad2d6e18cc2b9c48049f6dbe8a5b3c"
}
}

View File

@@ -0,0 +1,28 @@
{
"receivers": [
{
"action": "CLUSTER_SCALE_OUT",
"actor": {
"trust_id": [
"6dc6d336e3fc4c0a951b5698cd1236d9"
]
},
"channel": {
"alarm_url": "http://node1:8778/v1/webhooks/e03dd2e5-8f2e-4ec1-8c6a-74ba891e5422/trigger?V=1&count=1"
},
"cluster_id": "ae63a10b-4a90-452c-aef1-113a0b255ee3",
"created_time": "2015-06-27T05:09:43",
"deleted_time": null,
"domain": "Default",
"id": "573aa1ba-bf45-49fd-907d-6b5d6e6adfd3",
"name": "cluster_inflate",
"params": {
"count": "1"
},
"project": "6e18cc2bdbeb48a5b3cad2dc499f6804",
"type": "webhook",
"updated_time": null,
"user": "b4ad2d6e18cc2b9c48049f6dbe8a5b3c"
}
]
}

View File

@@ -1,16 +0,0 @@
{
"webhook": {
"action": "CLUSTER_RESIZE",
"credential": {
"password": "secretekey",
"username": "john"
},
"name": "cluster_shrink_1",
"obj_id": "cf99d754-3cdc-47f4-8a29-cd14f02f5436",
"obj_type": "cluster",
"params": {
"adjustment_number": "20",
"adjustment_type": "CHANGE_IN_PERCENTAGE"
}
}
}

View File

@@ -1,19 +0,0 @@
{
"webhook": {
"action": "CLUSTER_RESIZE",
"created_time": "2015-06-27T05:09:43",
"credential": "securely encrypted message here",
"deleted_time": null,
"domain": "Default",
"id": "573aa1ba-bf45-49fd-907d-6b5d6e6adfd3",
"name": "cluster_shrink",
"obj_id": "ed0a26da-55a4-49aa-afe3-290906376a4a",
"obj_type": "cluster",
"params": {
"adjustment_number": 20,
"adjustment_type": "CHANGE_IN_PERCENTAGE"
},
"project": "6e18cc2bdbeb48a5b3cad2dc499f6804",
"user": "b4ad2d6e18cc2b9c48049f6dbe8a5b3c"
}
}

View File

@@ -1,19 +0,0 @@
{
"webhook": {
"action": "CLUSTER_RESIZE",
"created_time": "2015-06-27T05:09",
"credential": "securely encrypted message here",
"deleted_time": null,
"domain": "Default",
"id": "573aa1ba-bf45-49fd-907d-6b5d6e6adfd3",
"name": "cluster_shrink",
"obj_id": "ed0a26da-55a4-49aa-afe3-290906376a4a",
"obj_type": "cluster",
"params": {
"adjustment_number": 20,
"adjustment_type": "CHANGE_IN_PERCENTAGE"
},
"project": "6e18cc2bdbeb48a5b3cad2dc499f6804",
"user": "b4ad2d6e18cc2b9c48049f6dbe8a5b3c"
}
}

View File

@@ -1,21 +0,0 @@
{
"webhooks": [
{
"action": "CLUSTER_RESIZE",
"created_time": "2015-06-27T05:09:43.000000",
"credential": "securely encrypted message here",
"deleted_time": null,
"domain": "Default",
"id": "573aa1ba-bf45-49fd-907d-6b5d6e6adfd3",
"name": "cluster_shrink",
"obj_id": "ed0a26da-55a4-49aa-afe3-290906376a4a",
"obj_type": "cluster",
"params": {
"adjustment_number": 20,
"adjustment_type": "CHANGE_IN_PERCENTAGE"
},
"project": "6e18cc2bdbeb48a5b3cad2dc499f6804",
"user": "b4ad2d6e18cc2b9c48049f6dbe8a5b3c"
}
]
}

View File

@@ -91,13 +91,18 @@
<method href="#showAction"/>
</resource>
</resource>
<resource id="receivers" path="receivers">
<method href="#listReceivers"/>
<method href="#createReceiver"/>
<resource id="receiver_res_id" path="{receiver_id}">
&receiver_idTemplateParameter;
<method href="#showReceiver"/>
<method href="#deleteReceiver"/>
</resource>
</resource>
<resource id="webhooks" path="webhooks">
<method href="#listWebhooks"/>
<method href="#createWebhook"/>
<resource id="webhook_res_id" path="{webhook_id}">
&webhook_idTemplateParameter;
<method href="#showWebhook"/>
<method href="#deleteWebhook"/>
<resource id="webhook_trigger" path="trigger">
<method href="#triggerWebhook"/>
</resource>
@@ -194,8 +199,8 @@
<wadl:doc xmlns="http://docbook.org/ns/docbook"
xml:lang="EN">
<para>
Sorts the list by an attribute. A valid attribute
is <code>name</code>, <code>status</code>,
Sorts the list by an attribute. A valid value is
<code>name</code>, <code>status</code>,
<code>created_time</code>, or
<code>updated_time</code>.
</para>
@@ -211,8 +216,8 @@
multiple pairs of sort key and sort direction
query parameters. If you omit the sort direction
in a pair, the API uses the natural sorting
direction of the attribute that is provided as the
<code>sort_key</code>.
direction of the <code>sort_key</code> attribute
value.
</para>
</wadl:doc>
</param>
@@ -364,14 +369,14 @@
<para>
<code>add_nodes</code> Add one or more
nodes, as a list, to a cluster. For
example: <xsdxt:code href="../samples/cluster-add-nodes-request.json"/>
example:
<xsdxt:code href="../samples/cluster-add-nodes-request.json"/>
</para>
</listitem>
<listitem>
<para>
<code>del_nodes</code> Delete one or more
nodes, as a list, from
a cluster. For example:
nodes, as a list, from a cluster. For example:
<xsdxt:code href="../samples/cluster-delete-nodes-request.json"/>
</para>
</listitem>
@@ -432,7 +437,7 @@
<wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN">
<para>
The <code>Location</code> response header contains the
action that the request initiated.
action that the request initiates.
</para>
</wadl:doc>
&actionLocationParameter;
@@ -503,8 +508,7 @@
multiple pairs of sort key and sort direction
query parameters. If you omit the sort direction
in a pair, the API uses the natural sorting
direction of the attribute that is provided as the
<code>sort_key</code>.
direction of the <code>sort_key</code> attribute.
</para>
</wadl:doc>
</param>
@@ -647,11 +651,12 @@
<wadl:doc xmlns="http://docbook.org/ns/docbook"
xml:lang="EN">
<para>
Sorts the list by the <code>name</code>,
<code>type</code>, <code>created_time</code>,
Sorts the list by an attribute. A valid value is
<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> attribute.
<code>deleted_time</code>,
<code>permission</code>, or <code>metadata</code>.
</para>
</wadl:doc>
</param>
@@ -665,8 +670,7 @@
multiple pairs of sort key and sort direction
query parameters. If you omit the sort direction
in a pair, the API uses the natural sorting
direction of the attribute that is provided as the
<code>sort_key</code>.
direction of the <code>sort_key</code> attribute.
</para>
</wadl:doc>
</param>
@@ -757,10 +761,10 @@
xmlns="http://wadl.dev.java.net/2009/02" type="xsd:dict">
<wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN">
<para>
A dictionary with details for the profile.
A dictionary with profile details.
</para>
<itemizedlist xml:id="profile_response_body">
<title>Profile Create Response</title>
<title>Profile create response</title>
<listitem>
<para>
<code>id</code> An unique ID for the profile.
@@ -869,7 +873,9 @@
<param name="name" style="plain" required="false"
xmlns="http://wadl.dev.java.net/2009/02" type="xsd:string">
<wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN">
<para>New name for the target profile.</para>
<para>
New name for the target profile.
</para>
</wadl:doc>
</param>
<param name="permission" style="plain" required="false"
@@ -927,9 +933,9 @@
<wadl:doc xmlns="http://docbook.org/ns/docbook"
xml:lang="EN">
<para>
Sorts the list by the <code>name</code>,
<code>type</code>, <code>level</code>,
<code>created_time</code>,
Sorts the list by an attribute. A valid value is
<code>name</code>, <code>type</code>,
<code>level</code>, <code>created_time</code>,
<code>updated_time</code>,
<code>deleted_time</code>, or
<code>cooldown</code> attribute.
@@ -946,8 +952,7 @@
multiple pairs of sort key and sort direction
query parameters. If you omit the sort direction
in a pair, the API uses the natural sorting
direction of the attribute that is provided as the
<code>sort_key</code>.
direction of the <code>sort_key</code> attribute.
</para>
</wadl:doc>
</param>
@@ -988,7 +993,9 @@
<param name="show_deleted" style="query" required="false"
xmlns="http://wadl.dev.java.net/2009/02" type="xsd:boolean">
<wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN">
<para>Specifies whether deleted policies are to be listed.</para>
<para>
Specifies whether to list or omit deleted policies.
</para>
</wadl:doc>
</param>
</representation>
@@ -1163,18 +1170,18 @@
<title>Policy body</title>
<listitem>
<para>
<code>name</code> New name for the policy, if specified.
<code>name</code> Name for the policy, if specified.
</para>
</listitem>
<listitem>
<para>
<code>level</code> New enforcement level for the policy, if specified.
<code>level</code> Enforcement level for the policy, if specified.
</para>
</listitem>
<listitem>
<para>
<code>cooldown</code> New cooldown, in
seconds, for the policy, if specified.
<code>cooldown</code> The cooldown value for the policy, in
seconds, if specified.
</para>
</listitem>
</itemizedlist>
@@ -1270,8 +1277,7 @@
multiple pairs of sort key and sort direction
query parameters. If you omit the sort direction
in a pair, the API uses the natural sorting
direction of the attribute that is provided as the
<code>sort_key</code>.
direction of the <code>sort_key</code> attribute.
</para>
</wadl:doc>
</param>
@@ -1279,7 +1285,7 @@
xmlns="http://wadl.dev.java.net/2009/02" type="xsd:boolean">
<wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN">
<para>
Indicates whether nodes from all tenants (projects) are to be listed.
Indicates whether to list or omit nodes from all tenants.
Operation subject to access policy enforcement.
</para>
</wadl:doc>
@@ -1396,7 +1402,7 @@
<wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN">
<para>A map with detailed data for the node.</para>
<itemizedlist xml:id="updateNode_body">
<title>Node Update Request Body</title>
<title>Node update request body</title>
<listitem>
<para>
<code>name</code> New name for the node (optional).
@@ -1544,10 +1550,10 @@
</representation>
</response>
</method>
<method name="GET" id="listWebhooks">
<wadl:doc xml:lang="EN" title="List webhooks" xmlns="http://docbook.org/ns/docbook">
<method name="GET" id="listReceivers">
<wadl:doc xml:lang="EN" title="List receivers" xmlns="http://docbook.org/ns/docbook">
<para role="shortdesc">
Lists all webhooks.
Lists all receivers.
</para>
</wadl:doc>
<request>
@@ -1557,7 +1563,7 @@
xmlns="http://wadl.dev.java.net/2009/02" type="xsd:boolean">
<wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN">
<para>
Indicates whether to show or omit deleted webhooks.
Indicates whether to show or omit deleted receivers.
</para>
</wadl:doc>
</param>
@@ -1565,7 +1571,15 @@
xmlns="http://wadl.dev.java.net/2009/02" type="xsd:string">
<wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN">
<para>
Filters the response by the name of a webhook.
Filters the response by the name of a receiver.
</para>
</wadl:doc>
</param>
<param name="type" style="query" required="false"
xmlns="http://wadl.dev.java.net/2009/02" type="xsd:string">
<wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN">
<para>
Filters the response by the type of a receiver.
</para>
</wadl:doc>
</param>
@@ -1573,23 +1587,15 @@
xmlns="http://wadl.dev.java.net/2009/02" type="xsd:string">
<wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN">
<para>
Filters the response by the user name of a webhook.
Filters the response by the user name of a receiver.
</para>
</wadl:doc>
</param>
<param name="obj_id" style="query" required="false"
<param name="cluster_id" style="query" required="false"
xmlns="http://wadl.dev.java.net/2009/02" type="xsd:string">
<wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN">
<para>
Filters the response by the ID of the targeted object of a webhook.
</para>
</wadl:doc>
</param>
<param name="obj_type" style="query" required="false"
xmlns="http://wadl.dev.java.net/2009/02" type="xsd:string">
<wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN">
<para>
Filters the response by the type of the targeted object of a webhook.
Filters the response by the ID of the targeted cluster of a receiver.
</para>
</wadl:doc>
</param>
@@ -1597,7 +1603,7 @@
xmlns="http://wadl.dev.java.net/2009/02" type="xsd:string">
<wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN">
<para>
Filters the response by the targeted action of a webhook.
Filters the response by the targeted action of a receiver.
</para>
</wadl:doc>
</param>
@@ -1606,10 +1612,9 @@
<wadl:doc xmlns="http://docbook.org/ns/docbook"
xml:lang="EN">
<para>
Sorts the list by an attribute. A valid attribute
is <code>name</code>, <code>obj_id</code>,
<code>obj_type</code>, <code>created_time</code>,
or <code>deleted_time</code>.
Sorts the list by an attribute. A valid attribute is
<code>name</code>, <code>type</code>, <code>action</code>,
<code>cluster_id</code> or <code>created_time</code>.
</para>
</wadl:doc>
</param>
@@ -1623,8 +1628,7 @@
multiple pairs of sort key and sort direction
query parameters. If you omit the sort direction
in a pair, the API uses the natural sorting
direction of the attribute that is provided as the
<code>sort_key</code>.
direction of the <code>sort_key</code> attribute.
</para>
</wadl:doc>
</param>
@@ -1632,7 +1636,7 @@
xmlns="http://wadl.dev.java.net/2009/02" type="xsd:boolean">
<wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN">
<para>
Indicates whether to show or omit webhooks from all projects.
Indicates whether to show or omit receivers from all projects.
This operation is subject to access privilege checking.
</para>
</wadl:doc>
@@ -1642,77 +1646,71 @@
<response status="200">
<representation mediaType="application/json">
<wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN">
<xsdxt:code href="../samples/webhooks-list-response.json"/>
<para>
List of receiver records. Each record contains
fields such as <code>id</code>, <code>name</code>,
<code>user</code>, <code>project></code>,
<code>domain</code>, <code>cluster_id</code>,
<code>type</code>, <code>action</code>,
<code>actor</code>, <code>params</code>,
<code>created_time</code> and
<code>deleted_time</code>, and so on.
</para>
<xsdxt:code href="../samples/receivers-list-response.json"/>
</wadl:doc>
<param name="nodes" style="query" required="false"
xmlns="http://wadl.dev.java.net/2009/02" type="xsd:list">
<wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN">
<para>
List of webhook records. Each record contains
fields such as <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>, and so on.
</para>
</wadl:doc>
</param>
</representation>
</response>
</method>
<method name="POST" id="createWebhook">
<wadl:doc xml:lang="EN" title="Create webhook" xmlns="http://docbook.org/ns/docbook">
<method name="POST" id="createReceiver">
<wadl:doc xml:lang="EN" title="Create receiver" xmlns="http://docbook.org/ns/docbook">
<para role="shortdesc">
Creates a webhook.
Creates a receiver.
</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-request.json"/>
<xsdxt:code href="../samples/receiver-create-request.json"/>
</wadl:doc>
<param name="webhook" style="plain" required="true"
<param name="receiver" style="plain" required="true"
xmlns="http://wadl.dev.java.net/2009/02" type="xsd:dict">
<wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN">
<para>
A map with detailed data for the webhook.
A map with detailed data for the receiver.
</para>
<itemizedlist xml:id="createWebhook_body">
<title>Webhook Create Request Body</title>
<title>Receiver Create Request Body</title>
<listitem>
<para>
<code>name</code> Name for the webhook (optional).
<code>name</code> Name for the receiver (optional).
</para>
</listitem>
<listitem>
<para>
<code>obj_id</code> Name, ID, or short ID of the object targeted
by the webhook (required).
<code>cluster_id</code> Name, ID, or short ID of the object targeted
by the receiver (required).
</para>
</listitem>
<listitem>
<para>
<code>obj_type</code> The object type. A
valid value is <code>cluster</code>,
<code>node</code>, or <code>policy</code> (required).
<code>type</code> The type of the receiver where the only
valid value is <code>webhook</code> currently (required).
</para>
</listitem>
<listitem>
<para>
<code>action</code> The action to initiate
when the webhook is triggered. Valid
values depend on the
<code>obj_type</code> (required).
when the receiver is triggered. A valid
value should be the name of an action that
can be applied on a cluster.
</para>
</listitem>
<listitem>
<para>
<code>credential</code> A map of key and
value pairs to use for authentication. If
omitted, the requester credential is used
(optional).
<code>actor</code> A map of key and value
pairs to use for authentication. If
omitted, the requester is assumed to be the
actor (optional).
</para>
</listitem>
<listitem>
@@ -1731,14 +1729,14 @@
<response status="201">
<representation mediaType="application/json">
<wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN">
<xsdxt:code href="../samples/webhook-create-response.json" />
<xsdxt:code href="../samples/receiver-create-response.json" />
</wadl:doc>
&resourceLocationParameter;
<param name="webhook" style="plain" required="true"
<param name="receiver" style="plain" required="true"
xmlns="http://wadl.dev.java.net/2009/02" type="xsd:dict">
<wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN">
<para>
The webhook details, such as <code>id</code>,
The receiver details, such as <code>id</code>,
<code>name</code>, <code>action</code>, and so on.
</para>
</wadl:doc>
@@ -1746,34 +1744,35 @@
</representation>
</response>
</method>
<method name="GET" id="showWebhook">
<wadl:doc xml:lang="EN" title="Show webhook details" xmlns="http://docbook.org/ns/docbook">
<method name="GET" id="showReceiver">
<wadl:doc xml:lang="EN" title="Show receiver details" xmlns="http://docbook.org/ns/docbook">
<para role="shortdesc">
Shows details for a webhook.
Shows details for a receiver.
</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. The record includes fields such as
<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>,
A receiver record. The record includes fields such as
<code>id</code>, <code>name</code>, <code>type</code>,
<code>cluster_id</code>, <code>action</code>,
<code>actor</code>, <code>params</code>,
<code>channel</code>,
<code>created_time</code>, <code>updated_time</code>,
<code>deleted_time</code>,
<code>user</code>, <code>project</code>,
<code>domain</code>, and so on.
</para>
<xsdxt:code href="../samples/webhook-show-response.json"/>
<xsdxt:code href="../samples/receiver-show-response.json"/>
</wadl:doc>
</representation>
</response>
</method>
<method name="DELETE" id="deleteWebhook">
<wadl:doc xml:lang="EN" title="Delete webhook" xmlns="http://docbook.org/ns/docbook">
<method name="DELETE" id="deleteReceiver">
<wadl:doc xml:lang="EN" title="Delete receiver" xmlns="http://docbook.org/ns/docbook">
<para role="shortdesc">
Deletes a webhook.
Deletes a receiver.
</para>
</wadl:doc>
<response status="204"/>
@@ -1781,25 +1780,25 @@
<method name="POST" id="triggerWebhook">
<wadl:doc xml:lang="EN" title="Trigger webhook action" xmlns="http://docbook.org/ns/docbook">
<para role="shortdesc">
Triggers a webhook action.
Triggers a webhook receiver.
</para>
</wadl:doc>
<request>
<representation mediaType="application/json">
<param name="key" style="query" required="true"
<param name="V" style="query" required="true"
xmlns="http://wadl.dev.java.net/2009/02" type="xsd:string">
<wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN">
<para>
The key to decipher the credentials stored in database.
Senlin uses the decrypted data for authentication.
The webhook implementation version requested.
</para>
</wadl:doc>
</param>
<param name="params" style="plain" required="true"
<param name="params" style="query" required="false"
xmlns="http://wadl.dev.java.net/2009/02" type="xsd:dict">
<wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN">
<para>
The JSON body with inputs to use for the targeted action.
The query string that forms the inputs to use for
the targeted action.
</para>
</wadl:doc>
</param>
@@ -1847,8 +1846,7 @@
multiple pairs of sort key and sort direction
query parameters. If you omit the sort direction
in a pair, the API uses the natural sorting
direction of the attribute that is provided as the
<code>sort_key</code>.
direction of the <code>sort_key</code> attribute.
</para>
</wadl:doc>
</param>
@@ -2009,8 +2007,7 @@
multiple pairs of sort key and sort direction
query parameters. If you omit the sort direction
in a pair, the API uses the natural sorting
direction of the attribute that is provided as the
<code>sort_key</code>.
direction of the <code>sort_key</code> attribute.
</para>
</wadl:doc>
</param>
@@ -2048,7 +2045,7 @@
<representation mediaType="application/json">
<wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN">
<para>
An <code>action</code> map. Contains fields, such as <code>id</code>,
An <code>action</code> map. Contains fields such as <code>id</code>,
<code>action</code>, and so on.
</para>
<xsdxt:code href="../samples/action-show-response.json"/>