<?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>Call Web API from external system</title><link>https://community.appian.com/discussions/f/integrations/14962/call-web-api-from-external-system</link><description>Hi Everyone, 
 I am new to Integrations/Web API concept and need your suggestion/knowledge sharing on the below points. 
 I have created a Web API and it fetches the data of few fields from Appian DB in JSON which I want to be accessed out of Appian by</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Call Web API from external system</title><link>https://community.appian.com/thread/68862?ContentTypeID=1</link><pubDate>Fri, 16 Aug 2019 10:09:17 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:3dafb15b-c6ab-455f-98aa-28c7589104ee</guid><dc:creator>priyankag0001</dc:creator><description>&lt;p&gt;Hi Apoorv,&lt;/p&gt;
&lt;p&gt;Could you provide more details for SAML enabled environment.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Call Web API from external system</title><link>https://community.appian.com/thread/67575?ContentTypeID=1</link><pubDate>Thu, 20 Jun 2019 17:09:37 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:a40e82ad-9223-4326-ae41-df1eb8029ddb</guid><dc:creator>Ankur V</dc:creator><description>&lt;p&gt;To test your API use postman&amp;nbsp; application, create a webapi as GET in appian with an endpoint and use basic authentication. Here&amp;#39; s a simple GET API response code that you can test with&amp;nbsp; &lt;pre class="ui-code" data-mode="json"&gt;a!httpResponse(
  /*
  * The &amp;#39;statusCode&amp;#39; parameter is a number that represents the HTTP status code
  * of the response. If no status code is specified, a default of &amp;#39;200&amp;#39; is used,
  * meaning that the request was successful.
  */
  statusCode: 200,

  /*
  * The &amp;#39;headers&amp;#39; parameter is a list of HTTP headers to include on the response.
  * HTTP headers should be built with &amp;#39;a!httpHeader()&amp;#39;.
  */
  headers: {
    a!httpHeader(name:&amp;quot;Authorization&amp;quot;, value:&amp;quot;Basic sdsdefberirefuncvuebufe&amp;quot;)
  },

  /*
  * The &amp;#39;body&amp;#39; parameter is the text that will be included in the HTTP response&amp;#39;s
  * body.
  */
  body: &amp;quot; YOU JUST ROCKED THE API&amp;quot;
  )&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;In the a!httpHeader(name:&amp;quot;Authorization&amp;quot;, value:&amp;quot;Basic &amp;quot; use the code that you get from postman . On Postman create a GET API , enter the url you generated from the webapi in appian enter username and password of the user that is authorized to use the API then click on &amp;quot;code&amp;quot; it will generate the API Basic token that you need to add to the a!httpHeader(name:&amp;quot;Authorization&amp;quot;, value:&amp;quot;Basic cdcdcdc dc df&amp;quot; in the API configuration in Appian.&lt;img src="/resized-image/__size/320x240/__key/communityserver-discussions-components-files/18/pastedimage1561049932193v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;Note : this is only for Basic Authentication method, starting 19.2&amp;nbsp; API are can be controlled by API key that are associated with the service account more information can be found &lt;a href="https://docs.appian.com/suite/help/19.2/Web_API_Authentication.html#api-key-authentication"&gt;here&lt;/a&gt;.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Call Web API from external system</title><link>https://community.appian.com/thread/67573?ContentTypeID=1</link><pubDate>Thu, 20 Jun 2019 15:59:36 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:96059c4f-5ee7-4432-b527-9e98492cca57</guid><dc:creator>Bhanu Voora</dc:creator><description>&lt;p&gt;Hi Apporv, Thanks for the reply.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;We are not using SAML, Can you please tell me in detail what needs to be done for authentication.&lt;/p&gt;
&lt;p&gt;Like how to give authentication details in Http Header and how to call the Web-API link by passing the Basic user credentials.&lt;/p&gt;
&lt;p&gt;Also I am not clear on what you have mentioned to create API key in Admin Console. Could you please give more details and any sample code will be really helpful for me. Thanks&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Call Web API from external system</title><link>https://community.appian.com/thread/67164?ContentTypeID=1</link><pubDate>Mon, 10 Jun 2019 00:02:55 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:f37567ac-fd73-4b3c-926c-9e68c3ee9bfe</guid><dc:creator>Apoorv Gangwar</dc:creator><description>&lt;p&gt;3) For baisc authentication, you can give it somewhat like this:&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;If you are not using SAML, you can create API key (along with Service Account) in Admin Console for the Web API, that you created.&lt;/p&gt;
&lt;p&gt;-----------------or--------------------&lt;/p&gt;
&lt;p&gt;&lt;span&gt;f you are using SAML, in the WebAPI code,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;a!httpHeader(name: &amp;quot;Authorization&amp;quot;, value: &amp;quot;Basic &amp;lt;&amp;lt;Username:Password&amp;gt;&amp;gt;&amp;quot;)&lt;/p&gt;
&lt;p&gt;In the value tag, you encode username and password (which you created to be used for Web API) to base64 in the format: username:password and add Basic as a prefix.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Call Web API from external system</title><link>https://community.appian.com/thread/67163?ContentTypeID=1</link><pubDate>Sun, 09 Jun 2019 17:04:58 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:1c7ab6ae-0fe5-4391-884c-0310725fbbc6</guid><dc:creator>Bhanu Voora</dc:creator><description>&lt;p&gt;Hi Josep, I remember some where in apian community discussions I have read about it so was confirming on the same. Thanks for the information.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Call Web API from external system</title><link>https://community.appian.com/thread/66987?ContentTypeID=1</link><pubDate>Mon, 03 Jun 2019 19:28:58 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:681d3d89-180b-4dc6-a970-cdeb93899540</guid><dc:creator>josep</dc:creator><description>&lt;p&gt;Unless you are trying to do something extra like single sign on, or calling another service in the webapi then doesn’t sound like you need anything else. &lt;/p&gt;
&lt;p&gt;Is there anything that you saw on the console that could be causing confusion? Or was the reason for you to ask this? &lt;/p&gt;
&lt;p&gt;Jose &lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Call Web API from external system</title><link>https://community.appian.com/thread/66984?ContentTypeID=1</link><pubDate>Mon, 03 Jun 2019 16:01:00 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:f8247f8f-ece7-4cad-ba56-fff16b700d89</guid><dc:creator>Bhanu Voora</dc:creator><description>&lt;p&gt;Thank you Josep for your response. your information is very clear and helpful.&lt;/p&gt;
&lt;p&gt;Regarding point 4, what I mean to ask is other than creating basic user and providing security through Group to Web API, is there any set up need to be made in Admin Console like adding the site as trusted site if I the Web API url is accessed in a site out of Appian box?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Once again Thanks for all the inputs...&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Call Web API from external system</title><link>https://community.appian.com/thread/66962?ContentTypeID=1</link><pubDate>Mon, 03 Jun 2019 08:33:41 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:42dab52f-89f3-44bc-a3e0-8f0b5b03a1ee</guid><dc:creator>josep</dc:creator><description>&lt;p&gt;Hello Bhanu, &lt;/p&gt;
&lt;p&gt;1) no the web api requires a named user on the system &lt;/p&gt;
&lt;p&gt;2) yes a basic user can use a webapi as long as that user has enough rights to execute it. &lt;/p&gt;
&lt;p&gt;Regarding your question if one user can be used by multiple, I recommend to reach support or your trusted vendo to figure it out if you contract allows it. I don’t thinks so but please check it. &lt;/p&gt;
&lt;p&gt;3) the authentication goes on the http headers. &lt;/p&gt;
&lt;p&gt;4) you create users on the admin console and assign groups in designer. So it is a mix of places to set it up. &lt;/p&gt;
&lt;p&gt;5 ) googling “postman test rest api”I found this link, &lt;/p&gt;
&lt;p&gt;&lt;a href="https://medium.com/aubergine-solutions/api-testing-using-postman-323670c89f6d"&gt;medium.com/.../api-testing-using-postman-323670c89f6d&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I have to say that you can even test it using Curl command in Linux , &lt;/p&gt;
&lt;p&gt;curl -u [username]:[password] https://[Appian Site]/suite/webapi/[webapi path]&lt;/p&gt;
&lt;p&gt;or any tool that allows you to make a http request. &lt;/p&gt;
&lt;p&gt;Take a look &lt;/p&gt;
&lt;p&gt;Hope this helps &lt;/p&gt;
&lt;p&gt;Jose &lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>