<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>REST on DecipherMiddleware</title><link>https://blog.deciphermiddleware.in/tags/rest/</link><description>Recent content in REST on DecipherMiddleware</description><generator>Hugo -- gohugo.io</generator><language>en-us</language><lastBuildDate>Sun, 20 Jun 2021 06:10:00 +0000</lastBuildDate><atom:link href="https://blog.deciphermiddleware.in/tags/rest/index.xml" rel="self" type="application/rss+xml"/><item><title>Using REST APIs to manage Connections in OIC</title><link>https://blog.deciphermiddleware.in/posts/using-rest-apis-to-manage-connections/</link><pubDate>Sun, 20 Jun 2021 06:10:00 +0000</pubDate><guid>https://blog.deciphermiddleware.in/posts/using-rest-apis-to-manage-connections/</guid><description>&lt;p&gt;In cases, when we have many connections created on the OIC instance, it becomes hard to manage connections using the OIC console. Also, to achieve automation, manually going and updating each and every connection is never a feasible task. OIC provides various REST APIs to fetch connection details, update connection properties and delete connections. With the help of these APIs, we can overcome such scenarios.&lt;/p&gt;
&lt;p&gt;In this blog, we will be discussing how to use various OIC connections REST APIs. A postman collection in the public workspace, which contains some of the use cases for this and can be forked, updated, and used accordingly.&lt;/p&gt;
&lt;p&gt;Below are various REST APIs, that are covered in this blog.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;a href="#1-retrieve-connections"&gt;Retrieve Connections&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#2-retrieve-a-connection"&gt;Retrieve a Connection&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#3-update-a-connection"&gt;Update a Connection&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#4-test-a-connection"&gt;Test a Connection&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#5-refresh-metadata-for-a-connection"&gt;Refresh Metadata for a Connection&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#6-delete-a-connection"&gt;Delete a Connection&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;In this blog, we will be using &lt;a href="https://www.postman.com/"&gt;Postman &lt;/a&gt;to test and run various APIs. Below is the link to the Postman collection, which will be helpful to try and test different REST APIs.&lt;/p&gt;
&lt;h2 id="authentication-for-rest-apis"&gt;Authentication for REST APIs &lt;a href="#authentication-for-rest-apis" class="anchor"&gt;🔗&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;To invoke OIC connections REST APIs, &lt;strong&gt;BASIC AUTH&lt;/strong&gt; can be used to authenticate and authorize calls. The user whose credentials are used to call these APIs must have access to edit the connection.&lt;/p&gt;
&lt;p&gt;OAuth can also be used to authenticate to REST APIs. In this blog, we will be using Basic Auth to authenticate/authorize API calls.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjbB20aiRsLpta90EDf6T57FdlAOCMM3-5WS50OyVFjhYooENmuwo2wU_9z_j11WOZGtWxZSF_BtBcmd601rV9h7hBZvtVrIyg5N408YTCayDcCViw9ARXG78Ep7q59OfrE2cl8ggS7ecA/"&gt;&lt;img src="https://blog.deciphermiddleware.in/images/blogger/cc515387d2.png" alt=""&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2 id="1-retrieve-connections"&gt;1. Retrieve Connections &lt;a href="#1-retrieve-connections" class="anchor"&gt;🔗&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;&lt;strong&gt;[GET]&lt;/strong&gt; {oic_host}&lt;em&gt;/ic/api/integration/v1/connections&lt;/em&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;&lt;strong&gt;{oic_host} -&lt;/strong&gt; Host URL for OIC instance&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;This API lets to get all available connections available on the OIC instance. This API provides support for pagination also. The default number of connection information returned without using the &lt;strong&gt;limit&lt;/strong&gt; query parameter is &lt;strong&gt;101&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;We can use the &lt;strong&gt;limit&lt;/strong&gt; query parameter to limit the number of records returned. For example:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi8Pfe4D8tzXniqUpHLfFvbuO3o0DMcf2CW1V2W1s_2X7jZfCR5H_bBCNrA8-D6diH_syN22hKHvJq2vTcOKce_5iq8jW8XSRKNr05gJ9maFXg4xgbqKhYJbdYsnWs9w0v_Ts0V3-Il_iU/"&gt;&lt;img src="https://blog.deciphermiddleware.in/images/blogger/d49d1b677f.png" alt=""&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;As in the above example, we have kept the limit as 5, if we want to get the next 5 connection details, we need to update the request as below&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;[GET]&lt;/strong&gt; {oic_host}&lt;em&gt;/ic/api/integration/v1/connections?limit=5 &amp;amp;offset=5&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;This will return the connections 6-10.&lt;/p&gt;
&lt;p&gt;To make this response even more readable, we have added a Visual table using the Postman visualizer. Once you click the Visualize under the response the section after sending the request from &lt;a href="https://www.postman.com/deciphermiddleware/workspace/deciphermiddleware/collection/1913239-659e77cf-2c07-423b-a15f-d0157426c8f0?ctx=documentation"&gt;this Postman collection&lt;/a&gt;, the below tabular representation is shown.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgjIH5kszjc6H-GYKXaP-39IXR-CCbr9vVFlHcnm7ir1-XxWDWzhLYzhhR1F2yBDso_1L5cnFizdJY4Agsa_e6K-l7xUz6EqANH6qFGT32jd7M6ujcsMqECz46K97Vs2-1YVa2m2NhBmw8/"&gt;&lt;img src="https://blog.deciphermiddleware.in/images/blogger/73d31855f1.png" alt=""&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2 id="2-retrieve-a-connection"&gt;2. Retrieve a Connection &lt;a href="#2-retrieve-a-connection" class="anchor"&gt;🔗&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;&lt;strong&gt;[GET]&lt;/strong&gt;{oic_host}&lt;em&gt;/ic/api/integration/v1/connections/ :id&lt;/em&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;&lt;strong&gt;{oic_host} -&lt;/strong&gt; Host URL for OIC instance.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;&lt;strong&gt;:id -&lt;/strong&gt; Connection ID of the connection in OIC instance, to be passed as the path parameter.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;This API lets you fetch connection details of a specific connection by adding Connection ID as a path parameter to the request URL.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgc-KQVTFVscCQE2OfCzodR27Qi4t-Jam8CbXavKYhjByHbW9f910Vh8RnXMOfnl6JLI19JFBka73FdiANMWBr_darElmr58OpQBmfXPwecGwdZ_kWbMmAtmqSu4_2OakRd6wbJ6zAqqLA/"&gt;&lt;img src="https://blog.deciphermiddleware.in/images/blogger/2d9d4dba07.png" alt=""&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;To make this response even more readable, we have added a Visual table using the Postman visualizer. Once you click the Visualize under the response section after sending the request from &lt;a href="https://www.postman.com/deciphermiddleware/workspace/deciphermiddleware/collection/1913239-659e77cf-2c07-423b-a15f-d0157426c8f0?ctx=documentation"&gt;this Postman collection&lt;/a&gt;, the below tabular representation is shown.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjgNa4P9CK-2kszuwmTgkaABcvjVRNrJYaxCeAw0zaOIvzjvreHTw0fNtYRDJSuFVbiEejNeKQv-DXFleLV_2mkYUe92v2PuX51pv7n9Wg1sc2XpQ4oIOknzdO0WG4KFj7-JGa6A6XvgiI/"&gt;&lt;img src="https://blog.deciphermiddleware.in/images/blogger/740fe95a8a.png" alt=""&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2 id="3-update-a-connection"&gt;3. Update a Connection &lt;a href="#3-update-a-connection" class="anchor"&gt;🔗&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;&lt;strong&gt;[POST]&lt;/strong&gt;{oic_host}/&lt;em&gt;ic/api/integration/v1/connections/ :id&lt;/em&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;{oic_host} -&lt;/strong&gt; Host URL for OIC instance.&lt;br&gt;
&lt;em&gt;&lt;strong&gt;:id -&lt;/strong&gt; Connection ID of the connection in OIC instance, to be passed as the path parameter.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;This API helps to update the connection properties of a particular connection in the OIC instance. Let&amp;rsquo;s take an example to update the REST Connection properties that include &lt;strong&gt;Base path&lt;/strong&gt; and &lt;strong&gt;Basic Auth user credentials&lt;/strong&gt;.&lt;/p&gt;
&lt;h3 id="request-headers"&gt;Request Headers: &lt;a href="#request-headers" class="anchor"&gt;🔗&lt;/a&gt;&lt;/h3&gt;&lt;p&gt;&lt;strong&gt;X-HTTP-Method-Override:&lt;/strong&gt; PATCH&lt;/p&gt;
&lt;p&gt;&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiQRmIAWcoNAe3lOBA15O01FrHaJTnBS8xhoqoxCqz-OM_Hl1SLAeByBi6J7zuEMUzKqSfTcsrgKM-tsIaCMUuqsCjjWUZU7cs3LOIDoEdazVV28wbkOYnAciSN-jIoAdwJ7mWQv9NmDwo/"&gt;&lt;img src="https://blog.deciphermiddleware.in/images/blogger/52cba83a25.png" alt=""&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;em&gt;Request:&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-json" data-lang="json"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="p"&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="nt"&gt;&amp;#34;connectionProperties&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="nt"&gt;&amp;#34;propertyGroup&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;&amp;#34;CONNECTION_PROPS&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="nt"&gt;&amp;#34;propertyName&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;&amp;#34;connectionUrl&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="nt"&gt;&amp;#34;propertyType&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;&amp;#34;URL&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="nt"&gt;&amp;#34;propertyValue&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;&amp;#34;{{CONN_REST_URL}}&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="p"&gt;},&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="nt"&gt;&amp;#34;securityPolicy&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;&amp;#34;BASIC_AUTH&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="nt"&gt;&amp;#34;securityProperties&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="p"&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="nt"&gt;&amp;#34;propertyGroup&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;&amp;#34;CREDENTIALS&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="nt"&gt;&amp;#34;propertyName&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;&amp;#34;username&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="nt"&gt;&amp;#34;propertyValue&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;&amp;#34;{{CONN_USERNAME}}&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="p"&gt;},&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="p"&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="nt"&gt;&amp;#34;propertyGroup&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;&amp;#34;CREDENTIALS&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="nt"&gt;&amp;#34;propertyName&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;&amp;#34;password&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="nt"&gt;&amp;#34;propertyValue&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;&amp;#34;{{CONN_PASSWORD}}&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="p"&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="p"&gt;]&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Here, &lt;strong&gt;{{CONN_REST_URL}}&lt;/strong&gt; will be the base URL of the REST endpoint. &lt;strong&gt;{{CONN_USERNAME}}&lt;/strong&gt; and &lt;strong&gt;{{CONN_PASSWORD}}&lt;/strong&gt; will be the credentials for BASIC Authentication for invoking the REST endpoint.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg1PAIKg0LDwQUtcaEGHcsn3ByeUvB70N-YvJhblSL6J8_6xuRsS3eCtVLnoeNhPOvUrLHEVCRucGa75vZPjnydo-w14pPb1mabyR09EmbrNEQ-rSulxJOZslU70-aKl2Bu7jnncDe6KiE/"&gt;&lt;img src="https://blog.deciphermiddleware.in/images/blogger/4a87985b23.png" alt=""&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2 id="4-test-a-connection"&gt;4. Test a Connection &lt;a href="#4-test-a-connection" class="anchor"&gt;🔗&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;&lt;strong&gt;[POST]&lt;/strong&gt;{oic_host}&lt;em&gt;/ic/api/integration/v1/connections/:id/test&lt;/em&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;{oic_host} -&lt;/strong&gt; Host URL for OIC instance.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;&lt;strong&gt;:id -&lt;/strong&gt; Connection ID of the connection in OIC instance, to be passed as the path parameter.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;This API is an alternative to the TEST button on OIC Connection page for a particular connection. Below is an example of successful testing of a Connection.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgjFKLD2MDiTGHtttBhDWSAq74BrPNsn3jWBaF1EkAsU6v1TqgFYrzi7M3vrodedpjHekHRbjHU01D4GV8_udj4p7V_VGZ0JBwYwqjdRXBdrNhFkzdrolJ8zpCDL8LBrtSAEi_42u23ciE/"&gt;&lt;img src="https://blog.deciphermiddleware.in/images/blogger/442a20e2ef.png" alt=""&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2 id="5-refresh-metadata-for-a-connection"&gt;5. Refresh Metadata for a connection. &lt;a href="#5-refresh-metadata-for-a-connection" class="anchor"&gt;🔗&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;&lt;strong&gt;[POST]&lt;/strong&gt; {oic_host}&lt;em&gt;/ic/api/integration/v1/connections/:id/metadata&lt;/em&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;{oic_host} -&lt;/strong&gt; Host URL for OIC instance.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;&lt;strong&gt;:id -&lt;/strong&gt; Connection ID of the connection in OIC instance, to be passed as the path parameter.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Sometimes, we may cache metadata for a connection, and if for some reason metadata is changed but our connection is still referring to old metadata. This API can come in handy. Below is the sample invocation of REST API in postman to refresh the metadata of a connection.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgoC4PgPPIVDupBmaQKsi2Hyf3XO2nFzC7USaBgp1p97Fw7HLTlWTdzs1kc6WYgtkI4dEPKdMbdbt0fhRMwuiaX7GgxINAe8SqMLsfKJn4818qLXWc7SHB09hFsy-ulmt0IFyxZis37mxE/"&gt;&lt;img src="https://blog.deciphermiddleware.in/images/blogger/a380508a0f.png" alt=""&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2 id="6-delete-a-connection"&gt;6. Delete a Connection &lt;a href="#6-delete-a-connection" class="anchor"&gt;🔗&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;&lt;strong&gt;[DELETE]&lt;/strong&gt; {oic_host}/&lt;em&gt;ic/api/integration/v1/connections/ :id&lt;/em&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;{oic_host} -&lt;/strong&gt; Host URL for OIC instance.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;&lt;strong&gt;:id -&lt;/strong&gt; Connection ID of the connection in OIC instance, to be passed as the path parameter.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;This API can be used to delete a connection available on the OIC instance. This API saves a lot of time to perform delete operations rather than going to UI and manually deleting a connection. All you need to know is the connection id of the connection. Below is an example of the successful deletion of Connection by triggering the API using Postman.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj_8AEnw3CyhmzkroErcPz47GM_2pijSSfJ49Fn4ox625LK3w5zsBY95-KfrbPabNvgfRnJpDXgI_YwYuyFx4c7CNwrRlTbe0Pu9W6uQSCSs7B3q-F57IX57AWHrNxPTo-21pXxjRi084E/"&gt;&lt;img src="https://blog.deciphermiddleware.in/images/blogger/5f414fe1fe.png" alt=""&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;To Validate if the Connection is deleted or not we can use a &lt;a href="https://blog.deciphermiddleware.in/feeds/posts/default?alt=rss&amp;amp;max-results=150#2"&gt;retrieve a connection&lt;/a&gt; API and check if the connection is available or not.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEilnOKx05DLNZK74fj1b5rxRB82z9PqlxV_9W1RdXf4-4R23QN2bZYEmfg_iRuRKFx-LDSeNh56modOQzPVnFLpC4uUV3oKojGWPUCTP1OM5hdpOB5P6w2JjYVhP-jvPnlMBixI8Htbiu8/"&gt;&lt;img src="https://blog.deciphermiddleware.in/images/blogger/2d6f78ce9b.png" alt=""&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2 id="references"&gt;References: &lt;a href="#references" class="anchor"&gt;🔗&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;&lt;a href="https://docs.oracle.com/en/cloud/paas/integration-cloud/rest-api/api-integrations-connections.html"&gt;https://docs.oracle.com/en/cloud/paas/integration-cloud/rest-api/api-integrations-connections.html&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Please share your valuable feedback in the comments section below 😊&lt;/p&gt;</description></item><item><title>Mock a REST Service using SOAPUI with JSON response</title><link>https://blog.deciphermiddleware.in/posts/mock-rest-service-using-soapui-with/</link><pubDate>Sun, 04 Oct 2020 00:00:00 +0000</pubDate><guid>https://blog.deciphermiddleware.in/posts/mock-rest-service-using-soapui-with/</guid><description>&lt;p&gt;Sometimes, backend service is not ready to receive requests and we may want to mock the service. In such cases we have sample request and response but integration cannot be tested unless we actually hit the service. Mocking the services is a good option to continue and progress.&lt;/p&gt;
&lt;p&gt;In this tutorial, we will use &lt;strong&gt;SOAP UI&lt;/strong&gt; to mock a &lt;strong&gt;REST&lt;/strong&gt; service with &lt;strong&gt;POST&lt;/strong&gt; method and &lt;strong&gt;JSON&lt;/strong&gt; response(static in nature). This is the basic tutorial to configure static response with no request validation. We can use the SOAP UI to test the created mock service also before, we try to hit from any Integration service.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Sample URL(for actual service):&lt;/strong&gt; &lt;strong&gt;http://localhost:8080/api/test&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;Sample JSON Response:&lt;/strong&gt;&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-json" data-lang="json"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="p"&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="nt"&gt;&amp;#34;name&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;&amp;#34;John&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="nt"&gt;&amp;#34;age&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;30&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="nt"&gt;&amp;#34;car&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;null&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="nt"&gt;&amp;#34;regitered&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id="steps"&gt;Steps: &lt;a href="#steps" class="anchor"&gt;🔗&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;1. Open &lt;strong&gt;SOAP UI&lt;/strong&gt; and click on &lt;strong&gt;REST&lt;/strong&gt; to create a New REST Project.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://blog.deciphermiddleware.in/images/blogger/5b2588ea0c.png"&gt;&lt;img src="https://blog.deciphermiddleware.in/images/blogger/5b2588ea0c.png" alt=""&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;2. Provide the url for the api you want to create a mock service.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://blog.deciphermiddleware.in/images/blogger/b74fdde6e8.png"&gt;&lt;img src="https://blog.deciphermiddleware.in/images/blogger/b74fdde6e8.png" alt=""&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;3. Once the project is created, right click on host name(http://locatlhost:8080) under &lt;strong&gt;REST Project 1&lt;/strong&gt; and then click on &lt;strong&gt;Generate REST Mock Service.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://blog.deciphermiddleware.in/images/blogger/a72aea8a3e.png"&gt;&lt;img src="https://blog.deciphermiddleware.in/images/blogger/a72aea8a3e.png" alt=""&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;4. Specify the name for mock service and click on &lt;strong&gt;OK&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://blog.deciphermiddleware.in/images/blogger/d81ff9fe7a.png"&gt;&lt;img src="https://blog.deciphermiddleware.in/images/blogger/d81ff9fe7a.png" alt=""&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;5. A window will open showing that mock service **GET _&lt;em&gt;/api/test&lt;/em&gt; _**has been started at port &lt;strong&gt;8089&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://blog.deciphermiddleware.in/images/blogger/310e8529d1.png"&gt;&lt;img src="https://blog.deciphermiddleware.in/images/blogger/310e8529d1.png" alt=""&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;6. Click on stop button to stop the mock service. Click on &lt;strong&gt;/api/test&lt;/strong&gt; under &lt;strong&gt;REST MockService 1&lt;/strong&gt;. Change method from &lt;strong&gt;GET&lt;/strong&gt; to &lt;strong&gt;POST&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://blog.deciphermiddleware.in/images/blogger/d71a6d042c.png"&gt;&lt;img src="https://blog.deciphermiddleware.in/images/blogger/d71a6d042c.png" alt=""&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;7. Mock response is specified as &lt;strong&gt;Response1&lt;/strong&gt; which was automatically created. Double click &lt;strong&gt;Response 1&lt;/strong&gt; from this window or navigator window.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://blog.deciphermiddleware.in/images/blogger/a35ea2fa7f.png"&gt;&lt;img src="https://blog.deciphermiddleware.in/images/blogger/a35ea2fa7f.png" alt=""&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;8. Keep HTTP Status Code to be &lt;strong&gt;200 - OK&lt;/strong&gt; , if your back end application sends the status code &lt;strong&gt;200&lt;/strong&gt; else change to the code which backend application sends. Update the sample response under content window editor. Specify media type to &lt;strong&gt;application/json&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://blog.deciphermiddleware.in/images/blogger/f64c5fc0ac.png"&gt;&lt;img src="https://blog.deciphermiddleware.in/images/blogger/f64c5fc0ac.png" alt=""&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;9. Start the mock service. You will see the mock service &lt;strong&gt;POST &lt;strong&gt;/api/test&lt;/strong&gt;&lt;/strong&gt; is started at port &lt;strong&gt;8089&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://blog.deciphermiddleware.in/images/blogger/0255b87c6f.png"&gt;&lt;img src="https://blog.deciphermiddleware.in/images/blogger/0255b87c6f.png" alt=""&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;10. To test this service, open the request under &lt;strong&gt;REST Project 1&lt;/strong&gt;. Update the &lt;strong&gt;hostname:port&lt;/strong&gt; with the value for mock service. Here in this case will be &lt;strong&gt;&lt;strong&gt;http://localhost:8089&lt;/strong&gt;&lt;/strong&gt;. Click on run.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://blog.deciphermiddleware.in/images/blogger/4554e62268.png"&gt;&lt;img src="https://blog.deciphermiddleware.in/images/blogger/4554e62268.png" alt=""&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;You will see the response is received. And also we can see in logs that request triggered and is successful.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://blog.deciphermiddleware.in/images/blogger/e6ba0ef6ce.png"&gt;&lt;/a&gt;&lt;a href="https://blog.deciphermiddleware.in/images/blogger/e6ba0ef6ce.png"&gt;&lt;img src="https://blog.deciphermiddleware.in/images/blogger/e6ba0ef6ce.png" alt=""&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;&lt;strong&gt;Note:&lt;/strong&gt; In SOAP UI, we can also configure dynamic response using groovy script.&lt;/em&gt;&lt;/p&gt;</description></item></channel></rss>