<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://community.appian.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Handling Method Variations in a Single Appian Web API Object</title><link>https://community.appian.com/discussions/f/general/38074/handling-method-variations-in-a-single-appian-web-api-object</link><description>Hi Community, 
 
 I am working on a POC where a third-party system interacts with my Appian Web API. The setup involves the following: 
 1. The third-party system is configured to call my API endpoint: https ://appianCloud.com/suite/webapi/endpoint1 for</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Handling Method Variations in a Single Appian Web API Object</title><link>https://community.appian.com/thread/143413?ContentTypeID=1</link><pubDate>Thu, 05 Dec 2024 14:47:48 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:2b5b3206-f4bf-4f13-9e85-8fbd956512ae</guid><dc:creator>Stefan Helzle</dc:creator><description>&lt;p&gt;You can create multiple API objects on the same endpoint, as long as the method is different.&lt;/p&gt;
&lt;p&gt;Then, in that objects, you route the call to separate expressions, depending on the path. In these expression, you do whatever is required.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Handling Method Variations in a Single Appian Web API Object</title><link>https://community.appian.com/thread/143351?ContentTypeID=1</link><pubDate>Wed, 04 Dec 2024 01:03:05 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:bd9648cc-045d-4a53-842c-01ab943c9ff4</guid><dc:creator>Mathieu Drouin</dc:creator><description>&lt;p&gt;Use pathSegments:&lt;/p&gt;
&lt;p&gt;GET&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" src="/resized-image/__size/640x480/__key/communityserver-discussions-components-files/11/pastedimage1733273651095v2.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;POST&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" src="/resized-image/__size/640x480/__key/communityserver-discussions-components-files/11/pastedimage1733274171363v3.png" alt=" " /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Handling Method Variations in a Single Appian Web API Object</title><link>https://community.appian.com/thread/143340?ContentTypeID=1</link><pubDate>Tue, 03 Dec 2024 17:27:36 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:af9dea9e-f36b-4156-954e-8f1eda83d14c</guid><dc:creator>Shantanu Joshi</dc:creator><description>&lt;p&gt;Hi&amp;nbsp;&lt;a href="/members/stefanhelzle0001"&gt;Stefan Helzle&lt;/a&gt;&amp;nbsp;&lt;a href="/members/mathieud0001"&gt;Mathieu Drouin&lt;/a&gt;&amp;nbsp;&lt;a href="/members/somasundaram.d"&gt;Soma&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;Thanks for your replies!&lt;/p&gt;
&lt;p&gt;Actually, in my current case I&amp;nbsp;will not&amp;nbsp;be able to create separate API for each endpoint. The reason for same is below:&lt;/p&gt;
&lt;p&gt;External system has a predefined UI and for each click we need our APi to respond.&lt;/p&gt;
&lt;p&gt;Now let say our API endpoint is /endpoint1. The URL will be: www.appiancloud.com/suits/webapi/endpoint1.&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;strong&gt;First Request:&lt;/strong&gt;&lt;br /&gt;&lt;em&gt;&lt;strong&gt;request URL:&lt;/strong&gt;&lt;/em&gt; www.appiancloud.com/suits/webapi/endpoint1/alldata&lt;br /&gt;In first request it will fetch list of records based on some query parameters (if provided)&lt;/p&gt;
&lt;p&gt;&lt;em&gt;&lt;strong&gt;response:&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;[&lt;br /&gt;{&lt;br /&gt; &amp;quot;id&amp;quot;: &amp;quot;ID1&amp;quot;,&lt;br /&gt; &amp;quot;Name1&amp;quot;: &amp;quot;Customer 1&amp;quot;,&lt;br /&gt; &amp;quot;Customernum&amp;quot;: &amp;quot;3&amp;quot;,&lt;br /&gt; &amp;quot;Street1&amp;quot;: &amp;quot;Line 111&amp;quot;,&lt;br /&gt; &amp;quot;Street2&amp;quot;: &amp;quot;740&amp;quot;,&lt;br /&gt;},&lt;br /&gt;{&lt;br /&gt; &amp;quot;id&amp;quot;: &amp;quot;ID2&amp;quot;,&lt;br /&gt; &amp;quot;Name1&amp;quot;: &amp;quot;Customer 2&amp;quot;,&lt;br /&gt; &amp;quot;Customernum&amp;quot;: &amp;quot;2&amp;quot;,&lt;br /&gt; &amp;quot;Street1&amp;quot;: &amp;quot;Line 111&amp;quot;,&lt;br /&gt; &amp;quot;Street2&amp;quot;: &amp;quot;740&amp;quot;,&lt;br /&gt;},&lt;br /&gt;{&lt;br /&gt; &amp;quot;id&amp;quot;: &amp;quot;ID3&amp;quot;,&lt;br /&gt; &amp;quot;Name1&amp;quot;: &amp;quot;Customer 3&amp;quot;,&lt;br /&gt; &amp;quot;Customernum&amp;quot;: &amp;quot;3&amp;quot;,&lt;br /&gt; &amp;quot;Street1&amp;quot;: &amp;quot;Line 111&amp;quot;,&lt;br /&gt; &amp;quot;Street2&amp;quot;: &amp;quot;740&amp;quot;,&lt;br /&gt;}&lt;br /&gt;]&lt;/p&gt;
&lt;p&gt;This list of data will be showed in 3rd part systems UI&lt;/p&gt;
&lt;p&gt;Now if an end user clicks on any specific record in the 3rd party system. That particular data will be showed to the user and in that case request/response will look like below&lt;/p&gt;
&lt;p&gt;------&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Second Request:&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;em&gt;Request URL&lt;/em&gt;:&lt;/strong&gt; www.appiancloud.com/suits/webapi/endpoint1/data/{&amp;quot;id&amp;quot;}&lt;/p&gt;
&lt;p&gt;&lt;em&gt;&lt;strong&gt;Response:&lt;/strong&gt;&lt;/em&gt;&lt;br /&gt;{&lt;br /&gt; &amp;quot;id&amp;quot;: &amp;quot;ID2&amp;quot;,&lt;br /&gt; &amp;quot;Name1&amp;quot;: &amp;quot;Customer 1&amp;quot;,&lt;br /&gt; &amp;quot;Customernum&amp;quot;: &amp;quot;2&amp;quot;,&lt;br /&gt; &amp;quot;Street1&amp;quot;: &amp;quot;Line 111&amp;quot;,&lt;br /&gt; &amp;quot;Street2&amp;quot;: &amp;quot;740&amp;quot;,&lt;br /&gt;}&lt;/p&gt;
&lt;p&gt;Up till here it is following only GET method. Now according to the requirement there should options to perform certain actions on the specific record.&lt;br /&gt;In this case request will look like below&lt;/p&gt;
&lt;p&gt;------&lt;/p&gt;
&lt;p&gt;&lt;strong&gt; Third Case:&lt;/strong&gt;&lt;br /&gt;&lt;em&gt;&lt;strong&gt;Request URL:&lt;/strong&gt;&lt;/em&gt; www.appiancloud.com/suits/webapi/endpoint1/data/{&amp;quot;id&amp;quot;}/action&lt;br /&gt;&lt;em&gt;&lt;strong&gt;Request Body:&lt;/strong&gt;&lt;/em&gt; {&lt;br /&gt;&amp;quot;name1&amp;quot;: &amp;quot;updatedName&amp;quot;&lt;br /&gt;}&lt;/p&gt;
&lt;p&gt;&lt;em&gt;&lt;strong&gt;response:&lt;/strong&gt;&lt;/em&gt; &lt;br /&gt;{&lt;br /&gt; &amp;quot;id&amp;quot;: &amp;quot;ID2&amp;quot;,&lt;br /&gt; &amp;quot;Name1&amp;quot;: &amp;quot;updatedName&amp;quot;,&lt;br /&gt; &amp;quot;Customernum&amp;quot;: &amp;quot;2&amp;quot;,&lt;br /&gt; &amp;quot;Street1&amp;quot;: &amp;quot;Line 111&amp;quot;,&lt;br /&gt; &amp;quot;Street2&amp;quot;: &amp;quot;740&amp;quot;,&lt;br /&gt;}&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;PS: Above is a high-level requirement, there are multiple scenarios like this,&lt;br /&gt;&lt;br /&gt;Thank You!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Handling Method Variations in a Single Appian Web API Object</title><link>https://community.appian.com/thread/143339?ContentTypeID=1</link><pubDate>Tue, 03 Dec 2024 17:25:01 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:6134ca2e-2ca1-420d-a61e-714fec8de4ad</guid><dc:creator>Shantanu Joshi</dc:creator><description>&lt;p&gt;Hi&amp;nbsp;&lt;a href="/members/stefanhelzle0001"&gt;Stefan Helzle&lt;/a&gt;&amp;nbsp;&lt;a href="/members/mathieud0001"&gt;Mathieu Drouin&lt;/a&gt;&amp;nbsp;&lt;a href="/members/somasundaram.d"&gt;Soma&lt;/a&gt;&amp;nbsp;&lt;br /&gt;Thanks for your replies!&lt;/p&gt;
&lt;p&gt;Actually, in my current case I&amp;nbsp;will not&amp;nbsp;be able to create separate API for each endpoint. The reason for same is below:&lt;/p&gt;
&lt;p&gt;External system has a predefined UI and for each click we need our APi to respond.&lt;/p&gt;
&lt;p&gt;Now let say our API endpoint is /endpoint1. The web API URL will be: www.appiancloud.com/suits/webapi/endpoint1.&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;strong&gt;First Request:&lt;/strong&gt;&lt;br /&gt;&lt;em&gt;&lt;strong&gt;request URL:&lt;/strong&gt;&lt;/em&gt; www.appiancloud.com/suits/webapi/endpoint1/alldata&lt;br /&gt;In first request it will fetch list of records based on some query parameters (if provided)&lt;/p&gt;
&lt;p&gt;&lt;em&gt;&lt;strong&gt;response:&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;[&lt;br /&gt;{&lt;br /&gt; &amp;quot;id&amp;quot;: &amp;quot;ID1&amp;quot;,&lt;br /&gt; &amp;quot;Name1&amp;quot;: &amp;quot;Customer 1&amp;quot;,&lt;br /&gt; &amp;quot;Customernum&amp;quot;: &amp;quot;3&amp;quot;,&lt;br /&gt; &amp;quot;Street1&amp;quot;: &amp;quot;Line 111&amp;quot;,&lt;br /&gt; &amp;quot;Street2&amp;quot;: &amp;quot;740&amp;quot;,&lt;br /&gt;},&lt;br /&gt;{&lt;br /&gt; &amp;quot;id&amp;quot;: &amp;quot;ID2&amp;quot;,&lt;br /&gt; &amp;quot;Name1&amp;quot;: &amp;quot;Customer 2&amp;quot;,&lt;br /&gt; &amp;quot;Customernum&amp;quot;: &amp;quot;2&amp;quot;,&lt;br /&gt; &amp;quot;Street1&amp;quot;: &amp;quot;Line 111&amp;quot;,&lt;br /&gt; &amp;quot;Street2&amp;quot;: &amp;quot;740&amp;quot;,&lt;br /&gt;},&lt;br /&gt;{&lt;br /&gt; &amp;quot;id&amp;quot;: &amp;quot;ID3&amp;quot;,&lt;br /&gt; &amp;quot;Name1&amp;quot;: &amp;quot;Customer 3&amp;quot;,&lt;br /&gt; &amp;quot;Customernum&amp;quot;: &amp;quot;3&amp;quot;,&lt;br /&gt; &amp;quot;Street1&amp;quot;: &amp;quot;Line 111&amp;quot;,&lt;br /&gt; &amp;quot;Street2&amp;quot;: &amp;quot;740&amp;quot;,&lt;br /&gt;}&lt;br /&gt;]&lt;/p&gt;
&lt;p&gt;This list of data will be showed in 3rd part systems UI&lt;/p&gt;
&lt;p&gt;Now if an end user clicks on any specific record in the 3rd party system. That particular data will be showed to the user and in that case request/response will look like below&lt;/p&gt;
&lt;p&gt;------&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Second Request:&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;em&gt;Request URL&lt;/em&gt;:&lt;/strong&gt; www.appiancloud.com/suits/webapi/endpoint1/data/{&amp;quot;id&amp;quot;}&lt;/p&gt;
&lt;p&gt;&lt;em&gt;&lt;strong&gt;Response:&lt;/strong&gt;&lt;/em&gt;&lt;br /&gt;{&lt;br /&gt; &amp;quot;id&amp;quot;: &amp;quot;ID2&amp;quot;,&lt;br /&gt; &amp;quot;Name1&amp;quot;: &amp;quot;Customer 1&amp;quot;,&lt;br /&gt; &amp;quot;Customernum&amp;quot;: &amp;quot;2&amp;quot;,&lt;br /&gt; &amp;quot;Street1&amp;quot;: &amp;quot;Line 111&amp;quot;,&lt;br /&gt; &amp;quot;Street2&amp;quot;: &amp;quot;740&amp;quot;,&lt;br /&gt;}&lt;/p&gt;
&lt;p&gt;Up till here it is following only GET method. Now according to the requirement there should options to perform certain actions on the specific record.&lt;br /&gt;In this case request will look like below&lt;/p&gt;
&lt;p&gt;------&lt;/p&gt;
&lt;p&gt;&lt;strong&gt; Third Case:&lt;/strong&gt;&lt;br /&gt;&lt;em&gt;&lt;strong&gt;Request URL:&lt;/strong&gt;&lt;/em&gt; www.appiancloud.com/suits/webapi/endpoint1/data/{&amp;quot;id&amp;quot;}/action&lt;br /&gt;&lt;em&gt;&lt;strong&gt;Request Body:&lt;/strong&gt;&lt;/em&gt; {&lt;br /&gt;&amp;quot;name1&amp;quot;: &amp;quot;updatedName&amp;quot;&lt;br /&gt;}&lt;/p&gt;
&lt;p&gt;&lt;em&gt;&lt;strong&gt;response:&lt;/strong&gt;&lt;/em&gt; &lt;br /&gt;{&lt;br /&gt; &amp;quot;id&amp;quot;: &amp;quot;ID2&amp;quot;,&lt;br /&gt; &amp;quot;Name1&amp;quot;: &amp;quot;updatedName&amp;quot;,&lt;br /&gt; &amp;quot;Customernum&amp;quot;: &amp;quot;2&amp;quot;,&lt;br /&gt; &amp;quot;Street1&amp;quot;: &amp;quot;Line 111&amp;quot;,&lt;br /&gt; &amp;quot;Street2&amp;quot;: &amp;quot;740&amp;quot;,&lt;br /&gt;}&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;PS:&lt;/strong&gt; Above is just a high level of the requirement I am working on. Please let me know if you have any suggestion on this!&lt;br /&gt;Thank you!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Handling Method Variations in a Single Appian Web API Object</title><link>https://community.appian.com/thread/143298?ContentTypeID=1</link><pubDate>Mon, 02 Dec 2024 18:06:52 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:5ec144a7-f81f-42cd-9dbf-3193fb26df08</guid><dc:creator>Mathieu Drouin</dc:creator><description>&lt;p&gt;Create two separate Web API objects (i.e. Endpoint_GET and Endpoint_POST) with the same url endpoint but different methods (GET and POST).&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Handling Method Variations in a Single Appian Web API Object</title><link>https://community.appian.com/thread/143290?ContentTypeID=1</link><pubDate>Mon, 02 Dec 2024 15:53:59 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:135d57a2-6108-4c77-a66a-ce054d2b6678</guid><dc:creator>Stefan Helzle</dc:creator><description>&lt;p&gt;Why not just create separate API objects to handle the /action and /response endpoints?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Handling Method Variations in a Single Appian Web API Object</title><link>https://community.appian.com/thread/143260?ContentTypeID=1</link><pubDate>Mon, 02 Dec 2024 09:33:22 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:4f79e477-e404-4fd9-a626-f1388c43f333</guid><dc:creator>Soma</dc:creator><description>&lt;p&gt;It is possible to have same endpoints as long as the method is different. Create separate APIs for each methods&lt;/p&gt;
&lt;p&gt;One API for GET with &lt;em&gt;endpoint1&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Another API for all the POST API, you can handle your logics using relative paths (&lt;em&gt;endpoint1/action&lt;/em&gt; and &lt;em&gt;endpoint1/response&lt;/em&gt;)&lt;/p&gt;
&lt;p&gt;In the API, you can use&amp;nbsp;&lt;em&gt;http!request.pathSegments&amp;nbsp;&lt;/em&gt;&lt;strong&gt;&lt;/strong&gt;to differentiate the logics for each&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Handling Method Variations in a Single Appian Web API Object</title><link>https://community.appian.com/thread/143255?ContentTypeID=1</link><pubDate>Mon, 02 Dec 2024 06:19:59 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:ce1ec09b-4a78-42e4-9715-efc3dd5e41f3</guid><dc:creator>Shantanu Joshi</dc:creator><description>&lt;p&gt;Hi&amp;nbsp;&amp;nbsp;In the 3rd party system we can only configure one API URL, all the requests will be made to the same API only.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Handling Method Variations in a Single Appian Web API Object</title><link>https://community.appian.com/thread/143254?ContentTypeID=1</link><pubDate>Mon, 02 Dec 2024 06:16:45 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:7b80217f-9c95-491b-b06a-22ba021d2b31</guid><dc:creator>sarathkumar13</dc:creator><description>&lt;p&gt;Why you dont want to create separate APIs for post and get call?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>