<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>post IntegrateNow: Chapter 3 (REST API Explorer) in Developer articles</title>
    <link>https://www.servicenow.com/community/developer-articles/integratenow-chapter-3-rest-api-explorer/ta-p/2322524</link>
    <description>&lt;H1&gt;&lt;A href="https://beingfluid.github.io/IntegrateNow/"&gt;IntegrateNow&lt;/A&gt;&lt;/H1&gt;
&lt;H2 id="chapter-3"&gt;Chapter 3&lt;/H2&gt;
&lt;H1 id="rest-api-explorer"&gt;REST API Explorer&lt;/H1&gt;
&lt;H2 id="a-good-api-documentation"&gt;A good API Documentation&lt;/H2&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Somehow, I cant resist myself from quoting the famous quote from "D. Brandon" :&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;Documentation is like s*x; when it’s good, it’s very, very good, and when it’s bad, it’s better than nothing.&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;The most important feature of API is it’s documentation. Rather you can say, an API is only as good as it’s documentation. If you are one of those, who did work or atleast tried to read API references for some tool and have struggled badly understanding it, you probably know it already. A bad documentation makes it hard to understand the artifacts and makes it unnecessarily difficult for you. While in other case, A good documentation explains how to effectively use the API, saves time and efforts, and enhances your development experience.&lt;/P&gt;
&lt;H3 id="what-is-api-documentation"&gt;What is API documentation?&lt;/H3&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;API documentation is a reference document that outlines how to use the API. It’s a technical manual that contains information about the services the API offers, how to use its various endpoints and parameters, and other implementation instructions. With good API documentation, developers can understand the usage of an API and incorporate it into their use cases without experiencing programming obstacles.&lt;/P&gt;
&lt;H3 id="api-documentation-best-practices"&gt;API Documentation Best Practices&lt;/H3&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Sometimes, you can see the documentions where the APIs are fully documented, but it is still terribly confusing. I would like to name few best practices that makes API documentation great :&lt;/P&gt;
&lt;UL&gt;&lt;LI&gt;A good documentation is consistent with universally accepted naming conventions and terminologies.&lt;/LI&gt;&lt;LI&gt;It uses a language that is simple and easily understandable by users.&lt;/LI&gt;&lt;LI&gt;It offers useful, human-readable information about the possible error messages a user may encounter when interacting with your API—besides just correct error codes, to allow users to learn and integrate your technology easily.It also includes explanations on how the errors can be resolved.&lt;/LI&gt;&lt;LI&gt;It allows you to test what you read in the documentation and see how it works.&lt;/LI&gt;&lt;LI&gt;It includes interactive sample codes in the most popular programming languages to reduce the friction in implementing your API.&lt;/LI&gt;&lt;LI&gt;It is constantly updated and remains accurate.&lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Another important feature that makes a documentation more better is it’s user interface, If you don’t have a visible user interface and you can’t know how to use an API just by looking at it.&lt;/P&gt;
&lt;H2 id="servicenow-rest-api-explorer"&gt;ServiceNow REST API Explorer&lt;/H2&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Though many documentations are worse, ServiceNow did a great job to maintain the documentation and following all the best practices. The REST API Explorer allows you to discover ServiceNow REST APIs, quickly construct and execute requests, and view responses from ServiceNow REST APIs within your browser.&lt;/P&gt;
&lt;P&gt;&lt;IMG src="https://beingfluid.github.io/IntegrateNow/images/stop-documentation-madness.webp" alt="Good Documentation" /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Before we step forward, let us step back a little and recall what is “Inbound REST Integration”? In an inbound request, a third-party application requests an action through a ServiceNow API. ServiceNow processes the request and returns a status code and a response body. When the response body is returned, the Client application can extracts information from the response body and take action on the extracted data. The REST API Explorer helps us to test Inbound requests. In fact, you need to always refer the documentation of destination ServiceNow instance/3rd party application or server.&lt;/P&gt;
&lt;P&gt;&lt;IMG src="https://beingfluid.github.io/IntegrateNow/images/app_store_learnv2_rest_sandiego_inbound_images_inbound_genericrequest.png" alt="Inbound" /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;To open REST API Explorer, Navigate to&amp;nbsp;&lt;STRONG&gt;System Web Services &amp;gt; REST &amp;gt; REST API Explorer&lt;/STRONG&gt;. It displays all available APIs, API versions, and methods for each API. We can use the REST API Explorer to find an end point URL, method and variables that will get us the results that we need.&lt;/P&gt;
&lt;P&gt;&lt;IMG src="https://beingfluid.github.io/IntegrateNow/images/RESTAPIExplorer1.png" alt="RESTAPIExplorer1" /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;The REST API Explorer consists of:&lt;/P&gt;
&lt;UL&gt;&lt;LI&gt;A pane to select the Namespace, API Name, API Version, and REST method&lt;/LI&gt;&lt;LI&gt;A listpane to view and configure the endpoint&lt;/LI&gt;&lt;LI&gt;A menu to access documentation for the selected API and an API analytics dashboard&lt;/LI&gt;&lt;LI&gt;
&lt;P&gt;A section to test the endpoint&lt;/P&gt;
&lt;P&gt;&lt;IMG src="https://beingfluid.github.io/IntegrateNow/images/app_store_learnv2_rest_sandiego_inbound_images_inbound_apiexploreranatomy.png" alt="REST API Explorer 2" /&gt;&lt;/P&gt;
&lt;/LI&gt;&lt;/UL&gt;
&lt;H3 id="understanding-how-to-use-the-rest-api-explorer"&gt;Understanding how to use the REST API Explorer&lt;/H3&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;There is no better way of learning something new than trying it, so let us try some simple use cases :&lt;/P&gt;
&lt;H4 id="get-request"&gt;GET request&lt;/H4&gt;
&lt;P&gt;Lets say, we want to retrieve all of the active incidents from the server instance, but we will only need a couple of the fields back in our response. We can test it within REST API Explorer :&lt;/P&gt;
&lt;UL&gt;&lt;LI&gt;Navigate to&amp;nbsp;&lt;STRONG&gt;System Web Services &amp;gt; REST &amp;gt; REST API Explorer&lt;/STRONG&gt;.&lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;&lt;IMG src="https://beingfluid.github.io/IntegrateNow/images/RESTAPIExplorer1.png" alt="RESTAPIExplorer2" /&gt;&lt;/P&gt;
&lt;UL&gt;&lt;LI&gt;
&lt;P&gt;In the top-left of the REST API Explorer, select Namespace as&amp;nbsp;&lt;STRONG&gt;now&lt;/STRONG&gt;, API Name as&amp;nbsp;&lt;STRONG&gt;Table API&lt;/STRONG&gt;&amp;nbsp;&amp;amp; API Version as&amp;nbsp;&lt;STRONG&gt;latest&lt;/STRONG&gt;.&lt;/P&gt;
&lt;UL&gt;&lt;LI&gt;
&lt;P&gt;Namespace specifies the scope of the web service :&lt;/P&gt;
&lt;UL&gt;&lt;LI&gt;global indicates Globally scoped APIs&lt;/LI&gt;&lt;LI&gt;now indicates REST APIs that are provided by ServiceNow&lt;/LI&gt;&lt;LI&gt;private_scope_name indicates APIs (scripted web services) in privately-scoped applications&lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;&lt;IMG src="https://beingfluid.github.io/IntegrateNow/images/namespace.png" alt="RESTAPIExplorer3" /&gt;&lt;/P&gt;
&lt;/LI&gt;&lt;LI&gt;
&lt;P&gt;API Name specifies API to configure and test in the REST API Explorer.&lt;/P&gt;
&lt;UL&gt;&lt;LI&gt;The Table API provides endpoints that allow you to perform create, read, update, and delete (CRUD) operations on existing tables.&lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;&lt;IMG src="https://beingfluid.github.io/IntegrateNow/images/apiname.png" alt="RESTAPIExplorer4" /&gt;&lt;/P&gt;
&lt;/LI&gt;&lt;LI&gt;
&lt;P&gt;API Version allows you to select a specific API version or use latest version.&lt;/P&gt;
&lt;UL&gt;&lt;LI&gt;Depending on the version, endpoint returns different results on a valid query.&lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;&lt;IMG src="https://beingfluid.github.io/IntegrateNow/images/apiversion.png" alt="RESTAPIExplorer5" /&gt;&lt;/P&gt;
&lt;/LI&gt;&lt;/UL&gt;
&lt;/LI&gt;&lt;LI&gt;
&lt;P&gt;Click&amp;nbsp;&lt;STRONG&gt;Retrieve records from a table (GET)&lt;/STRONG&gt;&lt;/P&gt;
&lt;UL&gt;&lt;LI&gt;“Retrieve records from a table” is a HTTP GET method that retrieves multiple records from the specified table.&lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;&lt;IMG src="https://beingfluid.github.io/IntegrateNow/images/restmethod.png" alt="RESTAPIExplorer6" /&gt;&lt;/P&gt;
&lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;STRONG&gt;The fields in the Prepare request section of the REST API Explorer form are determined by which Namespace, API Name, API Version, and REST method is selected.&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Request Parameters consist of:&lt;/P&gt;
&lt;DIV class="language-plaintext highlighter-rouge"&gt;
&lt;DIV class="highlight"&gt;
&lt;PRE class="highlight"&gt;&lt;CODE&gt;- Path parameters
- Query parameters
- Request headers
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;UL&gt;&lt;LI&gt;In the Path Parameters section, select the&amp;nbsp;&lt;STRONG&gt;Incident (incident)&lt;/STRONG&gt;&amp;nbsp;table.&amp;nbsp;&lt;IMG src="https://beingfluid.github.io/IntegrateNow/images/pathparam.png" alt="pathparam1" /&gt;
&lt;UL&gt;&lt;LI&gt;The list of path parameters depends on the endpoint URL.&lt;/LI&gt;&lt;LI&gt;Path parameters are enclosed in curly braces in the endpoint URL.&lt;/LI&gt;&lt;LI&gt;The values set in the path parameter field are substituted into the endpoint URL when a request is sent.&lt;/LI&gt;&lt;/UL&gt;
&lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;&lt;IMG src="https://beingfluid.github.io/IntegrateNow/images/app_store_learnv2_rest_sandiego_inbound_images_inbound_pathparms.png" alt="pathparam2" /&gt;&lt;/P&gt;
&lt;UL&gt;&lt;LI&gt;
&lt;P&gt;Scroll to the bottom of the page and click&amp;nbsp;&lt;STRONG&gt;Send&lt;/STRONG&gt;.&lt;/P&gt;
&lt;UL&gt;&lt;LI&gt;After configuring the REST method, one can click the Send button to send the request to the API.&lt;/LI&gt;&lt;LI&gt;The REST API Explorer constructs the request to send to the ServiceNow API using the settings configured by the developer.&lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;&lt;IMG src="https://beingfluid.github.io/IntegrateNow/images/sendget.png" alt="sendget" /&gt;&lt;/P&gt;
&lt;/LI&gt;&lt;LI&gt;
&lt;P&gt;Observe the request that is sent and recieved response.&amp;nbsp;&lt;IMG src="https://beingfluid.github.io/IntegrateNow/images/getres1.png" alt="sendget" /&gt;&amp;nbsp;&lt;IMG src="https://beingfluid.github.io/IntegrateNow/images/getres2.png" alt="sendget" /&gt;&lt;/P&gt;
&lt;UL&gt;&lt;LI&gt;The response includes incident records from the instance.&lt;/LI&gt;&lt;LI&gt;The response also indicates the Status code and Execution time (in milliseconds) of the request.&lt;/LI&gt;&lt;LI&gt;The Request section displays the HTTP Method / URI to send to the ServiceNow web service. The method is from the selected API.&lt;/LI&gt;&lt;LI&gt;
&lt;P&gt;The path parameter values are set when configuring the request.&lt;/P&gt;
&lt;P&gt;&lt;IMG src="https://beingfluid.github.io/IntegrateNow/images/path_app_store_learnv2_rest_sandiego_inbound_images_inbound_requestpopulated.png" alt="sendget" /&gt;&lt;/P&gt;
&lt;/LI&gt;&lt;/UL&gt;
&lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;The REST API Explorer limits queries to 10 records at a time. Only the first 10 incident records appear. However, you can also limit the maximum number of records returned in response when implementing a REST API using “Query parameters”, sysparm_limit. Let us change it to return only one record and click send to observe new response.&lt;/P&gt;
&lt;P&gt;&lt;IMG src="https://beingfluid.github.io/IntegrateNow/images/restlimit.png" alt="sendget" /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;As you have noticed, we have only one incident information returned in the response.&lt;/P&gt;
&lt;P&gt;&lt;IMG src="https://beingfluid.github.io/IntegrateNow/images/restlimit2.png" alt="sendget" /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Lets set our sysparm_limit Query parameters back to 10, click send again and again we should get information about 10 incidents. The response by default will return all the incident fields, but we will only need a couple of the fields back in our response, We can specify those in the sysparm_fields parameter.&lt;/P&gt;
&lt;P&gt;&lt;IMG src="https://beingfluid.github.io/IntegrateNow/images/queryparam1.png" alt="q1" /&gt;&amp;nbsp;&lt;IMG src="https://beingfluid.github.io/IntegrateNow/images/queryparam2.png" alt="q2" /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Also, we want to return only active incidents. we can fetch the filtered records based on specified encoded query for parameter sysparm_query.&amp;nbsp;&lt;IMG src="https://beingfluid.github.io/IntegrateNow/images/query2.png" alt="q3" /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Click send, the new request response should have only active incidents and specified four fields information returned :&amp;nbsp;&lt;IMG src="https://beingfluid.github.io/IntegrateNow/images/query9.png" alt="q3" /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Qury parameters are added to the endpoint URL by the REST API Explorer when the request is sent. The query parameters are specific to the selected API method. A default set of query parameters are displayed for the API. The query parameters are added to the URI in the Request after ‘?’.&lt;/P&gt;
&lt;P&gt;&lt;IMG src="https://beingfluid.github.io/IntegrateNow/images/query_app_store_learnv2_rest_sandiego_inbound_images_inbound_queryparmsuri.png" alt="q4" /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;REST headers are the meta-data associated with an API request and response E.g. format of the Request and Response.&lt;/P&gt;
&lt;P&gt;&lt;IMG src="https://beingfluid.github.io/IntegrateNow/images/rh2_app_store_learnv2_rest_sandiego_inbound_images_inbound_requestheaders.png" alt="q6" /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;The Request Header settings appear in the request.&lt;/P&gt;
&lt;P&gt;&lt;IMG src="https://beingfluid.github.io/IntegrateNow/images/rh3_app_store_learnv2_rest_sandiego_inbound_images_inbound_requestheadersrequest.png" alt="q5" /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;As you have noticed from the screenshot above, The request format corresponds to Accept header and similarly, the response format corresponds to the Content-Type header. If you can recall from first chapter, Accept or request format is the format in which client sends the data to the server or to be precise, the format in which server is expecting the data. Similarly, Content-Type or request format is the format in which server returns the data. Both the headers are expressed as the MIME Types e.g. application/json. You can read more about the MIME types&amp;nbsp;&lt;A href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types"&gt;here&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Let us do one more test, by changing the Reesponse format to application/xml and observe the response by clicking send :&lt;/P&gt;
&lt;P&gt;&lt;IMG src="https://beingfluid.github.io/IntegrateNow/images/xmlres.png" alt="xml1" /&gt;&amp;nbsp;&lt;IMG src="https://beingfluid.github.io/IntegrateNow/images/xmlres2.png" alt="xml2" /&gt;&lt;/P&gt;
&lt;H4 id="post-request"&gt;POST request&lt;/H4&gt;
&lt;H5 id="requirements-gathering"&gt;Requirements gathering&lt;/H5&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Now, we have reached the point from where we can think of the complete business use case. But before technical implementation, we need to gather the information of what needs to be done from business based on their need.&amp;nbsp;&lt;STRONG&gt;This process of understanding what you are trying to build and why you are building it is known as “Requirements gathering”.&lt;/STRONG&gt;&amp;nbsp;Requirements gathering is very very essential in any project. Don’t worry, If you are just a developer you do not need to do all that stuff. Let me tell you what is the requirement. Just for the desclaimer, The actual use case is bi-directional and involves some complex logic, So I am going to explain just a part of it here to not complicate things right away.&lt;/P&gt;
&lt;H5 id="business-use-case"&gt;Business use case&lt;/H5&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;STRONG&gt;This use case is to integrate two servicenow instances, so that when the incident is created on one instance, the incident will automatically be created on another instance.&lt;/STRONG&gt;&amp;nbsp;Why so? Let us say, Instance 1 is a Customer instance for “A” company &amp;amp; Instance 2 is a Vendor instance of company “B” that provides services to company “A”, And business want to have incident created on Vendor instance to be also replicated to customer instance. Now, using bi-directional integration, the incident can be handled by either side or can be updated on both the side, and as you can sense it can get complicated real fast. Though, later you will realise it was not so complicated as it seems now.&lt;/P&gt;
&lt;H5 id="prapare-the-pre-requisites"&gt;Prapare the pre-requisites&lt;/H5&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;For above use case, we are going to use OOTB Table APIs again and REST API explorer to perform test.&lt;/P&gt;
&lt;UL&gt;&lt;LI&gt;Navigate to&amp;nbsp;&lt;STRONG&gt;System Web Services &amp;gt; REST &amp;gt; REST API Explorer&lt;/STRONG&gt;.&lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;&lt;IMG src="https://beingfluid.github.io/IntegrateNow/images/RESTAPIExplorer1.png" alt="RESTAPIExplorer2" /&gt;&lt;/P&gt;
&lt;UL&gt;&lt;LI&gt;In the top-left of the REST API Explorer, select Namespace as&amp;nbsp;&lt;STRONG&gt;now&lt;/STRONG&gt;, API Name as&amp;nbsp;&lt;STRONG&gt;Table API&lt;/STRONG&gt;&amp;nbsp;&amp;amp; API Version as&amp;nbsp;&lt;STRONG&gt;latest&lt;/STRONG&gt;.&lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;&lt;IMG src="https://beingfluid.github.io/IntegrateNow/images/namespace.png" alt="RESTAPIExplorer3" /&gt;&amp;nbsp;&lt;IMG src="https://beingfluid.github.io/IntegrateNow/images/apiname.png" alt="RESTAPIExplorer4" /&gt;&amp;nbsp;&lt;IMG src="https://beingfluid.github.io/IntegrateNow/images/apiversion.png" alt="RESTAPIExplorer5" /&gt;&lt;/P&gt;
&lt;UL&gt;&lt;LI&gt;
&lt;P&gt;Click&amp;nbsp;&lt;STRONG&gt;Create a record (POST)&lt;/STRONG&gt;&lt;/P&gt;
&lt;UL&gt;&lt;LI&gt;“Create a record” is a HTTP POST method that Inserts one record in the specified table.&lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;&lt;IMG src="https://beingfluid.github.io/IntegrateNow/images/post1.png" alt="RESTAPIExplorer6" /&gt;&lt;/P&gt;
&lt;/LI&gt;&lt;LI&gt;
&lt;P&gt;In the Path Parameters section, set the “tableName” parameter as&amp;nbsp;&lt;STRONG&gt;Incident (incident)&lt;/STRONG&gt;&amp;nbsp;table.&lt;/P&gt;
&lt;P&gt;&lt;IMG src="https://beingfluid.github.io/IntegrateNow/images/post2.png" alt="RESTAPIExplorer6" /&gt;&lt;/P&gt;
&lt;/LI&gt;&lt;LI&gt;
&lt;P&gt;In the Request Body section, click&amp;nbsp;&lt;STRONG&gt;Add a field&lt;/STRONG&gt;.&lt;/P&gt;
&lt;P&gt;&lt;IMG src="https://beingfluid.github.io/IntegrateNow/images/post3.png" alt="RESTAPIExplorer6" /&gt;&amp;nbsp;&lt;IMG src="https://beingfluid.github.io/IntegrateNow/images/post32.png" alt="RESTAPIExplorer6" /&gt;&lt;/P&gt;
&lt;/LI&gt;&lt;LI&gt;
&lt;P&gt;Select a field and specify a value for that field. The request body updates automatically based on your entries.&lt;/P&gt;
&lt;P&gt;&lt;IMG src="https://beingfluid.github.io/IntegrateNow/images/post4.png" alt="RESTAPIExplorer6" /&gt;&amp;nbsp;&lt;IMG src="https://beingfluid.github.io/IntegrateNow/images/post42.png" alt="RESTAPIExplorer6" /&gt;&lt;/P&gt;
&lt;/LI&gt;&lt;LI&gt;
&lt;P&gt;Click the plus sign (+) and specify any additional field to assign a value to.&lt;/P&gt;
&lt;P&gt;&lt;IMG src="https://beingfluid.github.io/IntegrateNow/images/post5.png" alt="RESTAPIExplorer6" /&gt;&lt;/P&gt;
&lt;/LI&gt;&lt;LI&gt;
&lt;P&gt;After constructing the request, click&amp;nbsp;&lt;STRONG&gt;Send&lt;/STRONG&gt;&amp;nbsp;&amp;amp; Select&amp;nbsp;&lt;STRONG&gt;OK&lt;/STRONG&gt;&amp;nbsp;for the popup.&lt;/P&gt;
&lt;P&gt;&lt;IMG src="https://beingfluid.github.io/IntegrateNow/images/post52.png" alt="RESTAPIExplorer6" /&gt;&lt;/P&gt;
&lt;/LI&gt;&lt;LI&gt;
&lt;P&gt;Observe the response from the server, It returnes the information of newely created incident.&lt;/P&gt;
&lt;P&gt;&lt;IMG src="https://beingfluid.github.io/IntegrateNow/images/post6.png" alt="RESTAPIExplorer6" /&gt;&lt;/P&gt;
&lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Okay, we are not done yet with REST API explorer, But that’s it for this chapter. I am going to let you guys experiment with REST API explorer for now and in next chapter we will look at the other missing pieces. ServiceNow documentation is still the best way to learn about REST API explorer. Two of the best resources can be found&amp;nbsp;&lt;A href="https://developer.servicenow.com/dev.do#!/learn/courses/sandiego/app_store_learnv2_rest_sandiego_rest_integrations/app_store_learnv2_rest_sandiego_inbound_rest_integrations/app_store_learnv2_rest_sandiego_introduction_to_the_rest_api_explorer"&gt;here&lt;/A&gt;&amp;nbsp;&amp;amp;&amp;nbsp;&lt;A href="https://docs.servicenow.com/bundle/paris-application-development/page/integrate/inbound-rest/concept/use-REST-API-Explorer.html#use-REST-API-Explorer"&gt;here&lt;/A&gt;.&lt;/P&gt;
&lt;H6 id="what-about-other-web-services"&gt;what about other web services?&lt;/H6&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Some of you might be thinking, why we are only talking about REST and not SOAP or GraphQL? Remember, I did promise you to be able to do any kind of integrations! It is a foundation and we are starting with the most widely used and easiest web service. But bear with me, we will be there and be soon.&lt;/P&gt;
&lt;HR /&gt;
&lt;H2 id="whats-next"&gt;What’s next?&lt;/H2&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; In next chapter, we are going to build on top of information that we did gathered today, extract the useful information from the response, cover some of the missing pieces that we did not cover yet, and implement our first use case by old-school approach of script, point out some of the concerns, and start the quest for better solutions.&lt;/P&gt;</description>
    <pubDate>Tue, 15 Mar 2022 14:50:03 GMT</pubDate>
    <dc:creator>beingfluid</dc:creator>
    <dc:date>2022-03-15T14:50:03Z</dc:date>
    <item>
      <title>IntegrateNow: Chapter 3 (REST API Explorer)</title>
      <link>https://www.servicenow.com/community/developer-articles/integratenow-chapter-3-rest-api-explorer/ta-p/2322524</link>
      <description>&lt;H1&gt;&lt;A href="https://beingfluid.github.io/IntegrateNow/"&gt;IntegrateNow&lt;/A&gt;&lt;/H1&gt;
&lt;H2 id="chapter-3"&gt;Chapter 3&lt;/H2&gt;
&lt;H1 id="rest-api-explorer"&gt;REST API Explorer&lt;/H1&gt;
&lt;H2 id="a-good-api-documentation"&gt;A good API Documentation&lt;/H2&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Somehow, I cant resist myself from quoting the famous quote from "D. Brandon" :&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;Documentation is like s*x; when it’s good, it’s very, very good, and when it’s bad, it’s better than nothing.&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;The most important feature of API is it’s documentation. Rather you can say, an API is only as good as it’s documentation. If you are one of those, who did work or atleast tried to read API references for some tool and have struggled badly understanding it, you probably know it already. A bad documentation makes it hard to understand the artifacts and makes it unnecessarily difficult for you. While in other case, A good documentation explains how to effectively use the API, saves time and efforts, and enhances your development experience.&lt;/P&gt;
&lt;H3 id="what-is-api-documentation"&gt;What is API documentation?&lt;/H3&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;API documentation is a reference document that outlines how to use the API. It’s a technical manual that contains information about the services the API offers, how to use its various endpoints and parameters, and other implementation instructions. With good API documentation, developers can understand the usage of an API and incorporate it into their use cases without experiencing programming obstacles.&lt;/P&gt;
&lt;H3 id="api-documentation-best-practices"&gt;API Documentation Best Practices&lt;/H3&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Sometimes, you can see the documentions where the APIs are fully documented, but it is still terribly confusing. I would like to name few best practices that makes API documentation great :&lt;/P&gt;
&lt;UL&gt;&lt;LI&gt;A good documentation is consistent with universally accepted naming conventions and terminologies.&lt;/LI&gt;&lt;LI&gt;It uses a language that is simple and easily understandable by users.&lt;/LI&gt;&lt;LI&gt;It offers useful, human-readable information about the possible error messages a user may encounter when interacting with your API—besides just correct error codes, to allow users to learn and integrate your technology easily.It also includes explanations on how the errors can be resolved.&lt;/LI&gt;&lt;LI&gt;It allows you to test what you read in the documentation and see how it works.&lt;/LI&gt;&lt;LI&gt;It includes interactive sample codes in the most popular programming languages to reduce the friction in implementing your API.&lt;/LI&gt;&lt;LI&gt;It is constantly updated and remains accurate.&lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Another important feature that makes a documentation more better is it’s user interface, If you don’t have a visible user interface and you can’t know how to use an API just by looking at it.&lt;/P&gt;
&lt;H2 id="servicenow-rest-api-explorer"&gt;ServiceNow REST API Explorer&lt;/H2&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Though many documentations are worse, ServiceNow did a great job to maintain the documentation and following all the best practices. The REST API Explorer allows you to discover ServiceNow REST APIs, quickly construct and execute requests, and view responses from ServiceNow REST APIs within your browser.&lt;/P&gt;
&lt;P&gt;&lt;IMG src="https://beingfluid.github.io/IntegrateNow/images/stop-documentation-madness.webp" alt="Good Documentation" /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Before we step forward, let us step back a little and recall what is “Inbound REST Integration”? In an inbound request, a third-party application requests an action through a ServiceNow API. ServiceNow processes the request and returns a status code and a response body. When the response body is returned, the Client application can extracts information from the response body and take action on the extracted data. The REST API Explorer helps us to test Inbound requests. In fact, you need to always refer the documentation of destination ServiceNow instance/3rd party application or server.&lt;/P&gt;
&lt;P&gt;&lt;IMG src="https://beingfluid.github.io/IntegrateNow/images/app_store_learnv2_rest_sandiego_inbound_images_inbound_genericrequest.png" alt="Inbound" /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;To open REST API Explorer, Navigate to&amp;nbsp;&lt;STRONG&gt;System Web Services &amp;gt; REST &amp;gt; REST API Explorer&lt;/STRONG&gt;. It displays all available APIs, API versions, and methods for each API. We can use the REST API Explorer to find an end point URL, method and variables that will get us the results that we need.&lt;/P&gt;
&lt;P&gt;&lt;IMG src="https://beingfluid.github.io/IntegrateNow/images/RESTAPIExplorer1.png" alt="RESTAPIExplorer1" /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;The REST API Explorer consists of:&lt;/P&gt;
&lt;UL&gt;&lt;LI&gt;A pane to select the Namespace, API Name, API Version, and REST method&lt;/LI&gt;&lt;LI&gt;A listpane to view and configure the endpoint&lt;/LI&gt;&lt;LI&gt;A menu to access documentation for the selected API and an API analytics dashboard&lt;/LI&gt;&lt;LI&gt;
&lt;P&gt;A section to test the endpoint&lt;/P&gt;
&lt;P&gt;&lt;IMG src="https://beingfluid.github.io/IntegrateNow/images/app_store_learnv2_rest_sandiego_inbound_images_inbound_apiexploreranatomy.png" alt="REST API Explorer 2" /&gt;&lt;/P&gt;
&lt;/LI&gt;&lt;/UL&gt;
&lt;H3 id="understanding-how-to-use-the-rest-api-explorer"&gt;Understanding how to use the REST API Explorer&lt;/H3&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;There is no better way of learning something new than trying it, so let us try some simple use cases :&lt;/P&gt;
&lt;H4 id="get-request"&gt;GET request&lt;/H4&gt;
&lt;P&gt;Lets say, we want to retrieve all of the active incidents from the server instance, but we will only need a couple of the fields back in our response. We can test it within REST API Explorer :&lt;/P&gt;
&lt;UL&gt;&lt;LI&gt;Navigate to&amp;nbsp;&lt;STRONG&gt;System Web Services &amp;gt; REST &amp;gt; REST API Explorer&lt;/STRONG&gt;.&lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;&lt;IMG src="https://beingfluid.github.io/IntegrateNow/images/RESTAPIExplorer1.png" alt="RESTAPIExplorer2" /&gt;&lt;/P&gt;
&lt;UL&gt;&lt;LI&gt;
&lt;P&gt;In the top-left of the REST API Explorer, select Namespace as&amp;nbsp;&lt;STRONG&gt;now&lt;/STRONG&gt;, API Name as&amp;nbsp;&lt;STRONG&gt;Table API&lt;/STRONG&gt;&amp;nbsp;&amp;amp; API Version as&amp;nbsp;&lt;STRONG&gt;latest&lt;/STRONG&gt;.&lt;/P&gt;
&lt;UL&gt;&lt;LI&gt;
&lt;P&gt;Namespace specifies the scope of the web service :&lt;/P&gt;
&lt;UL&gt;&lt;LI&gt;global indicates Globally scoped APIs&lt;/LI&gt;&lt;LI&gt;now indicates REST APIs that are provided by ServiceNow&lt;/LI&gt;&lt;LI&gt;private_scope_name indicates APIs (scripted web services) in privately-scoped applications&lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;&lt;IMG src="https://beingfluid.github.io/IntegrateNow/images/namespace.png" alt="RESTAPIExplorer3" /&gt;&lt;/P&gt;
&lt;/LI&gt;&lt;LI&gt;
&lt;P&gt;API Name specifies API to configure and test in the REST API Explorer.&lt;/P&gt;
&lt;UL&gt;&lt;LI&gt;The Table API provides endpoints that allow you to perform create, read, update, and delete (CRUD) operations on existing tables.&lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;&lt;IMG src="https://beingfluid.github.io/IntegrateNow/images/apiname.png" alt="RESTAPIExplorer4" /&gt;&lt;/P&gt;
&lt;/LI&gt;&lt;LI&gt;
&lt;P&gt;API Version allows you to select a specific API version or use latest version.&lt;/P&gt;
&lt;UL&gt;&lt;LI&gt;Depending on the version, endpoint returns different results on a valid query.&lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;&lt;IMG src="https://beingfluid.github.io/IntegrateNow/images/apiversion.png" alt="RESTAPIExplorer5" /&gt;&lt;/P&gt;
&lt;/LI&gt;&lt;/UL&gt;
&lt;/LI&gt;&lt;LI&gt;
&lt;P&gt;Click&amp;nbsp;&lt;STRONG&gt;Retrieve records from a table (GET)&lt;/STRONG&gt;&lt;/P&gt;
&lt;UL&gt;&lt;LI&gt;“Retrieve records from a table” is a HTTP GET method that retrieves multiple records from the specified table.&lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;&lt;IMG src="https://beingfluid.github.io/IntegrateNow/images/restmethod.png" alt="RESTAPIExplorer6" /&gt;&lt;/P&gt;
&lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;STRONG&gt;The fields in the Prepare request section of the REST API Explorer form are determined by which Namespace, API Name, API Version, and REST method is selected.&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Request Parameters consist of:&lt;/P&gt;
&lt;DIV class="language-plaintext highlighter-rouge"&gt;
&lt;DIV class="highlight"&gt;
&lt;PRE class="highlight"&gt;&lt;CODE&gt;- Path parameters
- Query parameters
- Request headers
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;UL&gt;&lt;LI&gt;In the Path Parameters section, select the&amp;nbsp;&lt;STRONG&gt;Incident (incident)&lt;/STRONG&gt;&amp;nbsp;table.&amp;nbsp;&lt;IMG src="https://beingfluid.github.io/IntegrateNow/images/pathparam.png" alt="pathparam1" /&gt;
&lt;UL&gt;&lt;LI&gt;The list of path parameters depends on the endpoint URL.&lt;/LI&gt;&lt;LI&gt;Path parameters are enclosed in curly braces in the endpoint URL.&lt;/LI&gt;&lt;LI&gt;The values set in the path parameter field are substituted into the endpoint URL when a request is sent.&lt;/LI&gt;&lt;/UL&gt;
&lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;&lt;IMG src="https://beingfluid.github.io/IntegrateNow/images/app_store_learnv2_rest_sandiego_inbound_images_inbound_pathparms.png" alt="pathparam2" /&gt;&lt;/P&gt;
&lt;UL&gt;&lt;LI&gt;
&lt;P&gt;Scroll to the bottom of the page and click&amp;nbsp;&lt;STRONG&gt;Send&lt;/STRONG&gt;.&lt;/P&gt;
&lt;UL&gt;&lt;LI&gt;After configuring the REST method, one can click the Send button to send the request to the API.&lt;/LI&gt;&lt;LI&gt;The REST API Explorer constructs the request to send to the ServiceNow API using the settings configured by the developer.&lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;&lt;IMG src="https://beingfluid.github.io/IntegrateNow/images/sendget.png" alt="sendget" /&gt;&lt;/P&gt;
&lt;/LI&gt;&lt;LI&gt;
&lt;P&gt;Observe the request that is sent and recieved response.&amp;nbsp;&lt;IMG src="https://beingfluid.github.io/IntegrateNow/images/getres1.png" alt="sendget" /&gt;&amp;nbsp;&lt;IMG src="https://beingfluid.github.io/IntegrateNow/images/getres2.png" alt="sendget" /&gt;&lt;/P&gt;
&lt;UL&gt;&lt;LI&gt;The response includes incident records from the instance.&lt;/LI&gt;&lt;LI&gt;The response also indicates the Status code and Execution time (in milliseconds) of the request.&lt;/LI&gt;&lt;LI&gt;The Request section displays the HTTP Method / URI to send to the ServiceNow web service. The method is from the selected API.&lt;/LI&gt;&lt;LI&gt;
&lt;P&gt;The path parameter values are set when configuring the request.&lt;/P&gt;
&lt;P&gt;&lt;IMG src="https://beingfluid.github.io/IntegrateNow/images/path_app_store_learnv2_rest_sandiego_inbound_images_inbound_requestpopulated.png" alt="sendget" /&gt;&lt;/P&gt;
&lt;/LI&gt;&lt;/UL&gt;
&lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;The REST API Explorer limits queries to 10 records at a time. Only the first 10 incident records appear. However, you can also limit the maximum number of records returned in response when implementing a REST API using “Query parameters”, sysparm_limit. Let us change it to return only one record and click send to observe new response.&lt;/P&gt;
&lt;P&gt;&lt;IMG src="https://beingfluid.github.io/IntegrateNow/images/restlimit.png" alt="sendget" /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;As you have noticed, we have only one incident information returned in the response.&lt;/P&gt;
&lt;P&gt;&lt;IMG src="https://beingfluid.github.io/IntegrateNow/images/restlimit2.png" alt="sendget" /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Lets set our sysparm_limit Query parameters back to 10, click send again and again we should get information about 10 incidents. The response by default will return all the incident fields, but we will only need a couple of the fields back in our response, We can specify those in the sysparm_fields parameter.&lt;/P&gt;
&lt;P&gt;&lt;IMG src="https://beingfluid.github.io/IntegrateNow/images/queryparam1.png" alt="q1" /&gt;&amp;nbsp;&lt;IMG src="https://beingfluid.github.io/IntegrateNow/images/queryparam2.png" alt="q2" /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Also, we want to return only active incidents. we can fetch the filtered records based on specified encoded query for parameter sysparm_query.&amp;nbsp;&lt;IMG src="https://beingfluid.github.io/IntegrateNow/images/query2.png" alt="q3" /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Click send, the new request response should have only active incidents and specified four fields information returned :&amp;nbsp;&lt;IMG src="https://beingfluid.github.io/IntegrateNow/images/query9.png" alt="q3" /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Qury parameters are added to the endpoint URL by the REST API Explorer when the request is sent. The query parameters are specific to the selected API method. A default set of query parameters are displayed for the API. The query parameters are added to the URI in the Request after ‘?’.&lt;/P&gt;
&lt;P&gt;&lt;IMG src="https://beingfluid.github.io/IntegrateNow/images/query_app_store_learnv2_rest_sandiego_inbound_images_inbound_queryparmsuri.png" alt="q4" /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;REST headers are the meta-data associated with an API request and response E.g. format of the Request and Response.&lt;/P&gt;
&lt;P&gt;&lt;IMG src="https://beingfluid.github.io/IntegrateNow/images/rh2_app_store_learnv2_rest_sandiego_inbound_images_inbound_requestheaders.png" alt="q6" /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;The Request Header settings appear in the request.&lt;/P&gt;
&lt;P&gt;&lt;IMG src="https://beingfluid.github.io/IntegrateNow/images/rh3_app_store_learnv2_rest_sandiego_inbound_images_inbound_requestheadersrequest.png" alt="q5" /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;As you have noticed from the screenshot above, The request format corresponds to Accept header and similarly, the response format corresponds to the Content-Type header. If you can recall from first chapter, Accept or request format is the format in which client sends the data to the server or to be precise, the format in which server is expecting the data. Similarly, Content-Type or request format is the format in which server returns the data. Both the headers are expressed as the MIME Types e.g. application/json. You can read more about the MIME types&amp;nbsp;&lt;A href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types"&gt;here&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Let us do one more test, by changing the Reesponse format to application/xml and observe the response by clicking send :&lt;/P&gt;
&lt;P&gt;&lt;IMG src="https://beingfluid.github.io/IntegrateNow/images/xmlres.png" alt="xml1" /&gt;&amp;nbsp;&lt;IMG src="https://beingfluid.github.io/IntegrateNow/images/xmlres2.png" alt="xml2" /&gt;&lt;/P&gt;
&lt;H4 id="post-request"&gt;POST request&lt;/H4&gt;
&lt;H5 id="requirements-gathering"&gt;Requirements gathering&lt;/H5&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Now, we have reached the point from where we can think of the complete business use case. But before technical implementation, we need to gather the information of what needs to be done from business based on their need.&amp;nbsp;&lt;STRONG&gt;This process of understanding what you are trying to build and why you are building it is known as “Requirements gathering”.&lt;/STRONG&gt;&amp;nbsp;Requirements gathering is very very essential in any project. Don’t worry, If you are just a developer you do not need to do all that stuff. Let me tell you what is the requirement. Just for the desclaimer, The actual use case is bi-directional and involves some complex logic, So I am going to explain just a part of it here to not complicate things right away.&lt;/P&gt;
&lt;H5 id="business-use-case"&gt;Business use case&lt;/H5&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;STRONG&gt;This use case is to integrate two servicenow instances, so that when the incident is created on one instance, the incident will automatically be created on another instance.&lt;/STRONG&gt;&amp;nbsp;Why so? Let us say, Instance 1 is a Customer instance for “A” company &amp;amp; Instance 2 is a Vendor instance of company “B” that provides services to company “A”, And business want to have incident created on Vendor instance to be also replicated to customer instance. Now, using bi-directional integration, the incident can be handled by either side or can be updated on both the side, and as you can sense it can get complicated real fast. Though, later you will realise it was not so complicated as it seems now.&lt;/P&gt;
&lt;H5 id="prapare-the-pre-requisites"&gt;Prapare the pre-requisites&lt;/H5&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;For above use case, we are going to use OOTB Table APIs again and REST API explorer to perform test.&lt;/P&gt;
&lt;UL&gt;&lt;LI&gt;Navigate to&amp;nbsp;&lt;STRONG&gt;System Web Services &amp;gt; REST &amp;gt; REST API Explorer&lt;/STRONG&gt;.&lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;&lt;IMG src="https://beingfluid.github.io/IntegrateNow/images/RESTAPIExplorer1.png" alt="RESTAPIExplorer2" /&gt;&lt;/P&gt;
&lt;UL&gt;&lt;LI&gt;In the top-left of the REST API Explorer, select Namespace as&amp;nbsp;&lt;STRONG&gt;now&lt;/STRONG&gt;, API Name as&amp;nbsp;&lt;STRONG&gt;Table API&lt;/STRONG&gt;&amp;nbsp;&amp;amp; API Version as&amp;nbsp;&lt;STRONG&gt;latest&lt;/STRONG&gt;.&lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;&lt;IMG src="https://beingfluid.github.io/IntegrateNow/images/namespace.png" alt="RESTAPIExplorer3" /&gt;&amp;nbsp;&lt;IMG src="https://beingfluid.github.io/IntegrateNow/images/apiname.png" alt="RESTAPIExplorer4" /&gt;&amp;nbsp;&lt;IMG src="https://beingfluid.github.io/IntegrateNow/images/apiversion.png" alt="RESTAPIExplorer5" /&gt;&lt;/P&gt;
&lt;UL&gt;&lt;LI&gt;
&lt;P&gt;Click&amp;nbsp;&lt;STRONG&gt;Create a record (POST)&lt;/STRONG&gt;&lt;/P&gt;
&lt;UL&gt;&lt;LI&gt;“Create a record” is a HTTP POST method that Inserts one record in the specified table.&lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;&lt;IMG src="https://beingfluid.github.io/IntegrateNow/images/post1.png" alt="RESTAPIExplorer6" /&gt;&lt;/P&gt;
&lt;/LI&gt;&lt;LI&gt;
&lt;P&gt;In the Path Parameters section, set the “tableName” parameter as&amp;nbsp;&lt;STRONG&gt;Incident (incident)&lt;/STRONG&gt;&amp;nbsp;table.&lt;/P&gt;
&lt;P&gt;&lt;IMG src="https://beingfluid.github.io/IntegrateNow/images/post2.png" alt="RESTAPIExplorer6" /&gt;&lt;/P&gt;
&lt;/LI&gt;&lt;LI&gt;
&lt;P&gt;In the Request Body section, click&amp;nbsp;&lt;STRONG&gt;Add a field&lt;/STRONG&gt;.&lt;/P&gt;
&lt;P&gt;&lt;IMG src="https://beingfluid.github.io/IntegrateNow/images/post3.png" alt="RESTAPIExplorer6" /&gt;&amp;nbsp;&lt;IMG src="https://beingfluid.github.io/IntegrateNow/images/post32.png" alt="RESTAPIExplorer6" /&gt;&lt;/P&gt;
&lt;/LI&gt;&lt;LI&gt;
&lt;P&gt;Select a field and specify a value for that field. The request body updates automatically based on your entries.&lt;/P&gt;
&lt;P&gt;&lt;IMG src="https://beingfluid.github.io/IntegrateNow/images/post4.png" alt="RESTAPIExplorer6" /&gt;&amp;nbsp;&lt;IMG src="https://beingfluid.github.io/IntegrateNow/images/post42.png" alt="RESTAPIExplorer6" /&gt;&lt;/P&gt;
&lt;/LI&gt;&lt;LI&gt;
&lt;P&gt;Click the plus sign (+) and specify any additional field to assign a value to.&lt;/P&gt;
&lt;P&gt;&lt;IMG src="https://beingfluid.github.io/IntegrateNow/images/post5.png" alt="RESTAPIExplorer6" /&gt;&lt;/P&gt;
&lt;/LI&gt;&lt;LI&gt;
&lt;P&gt;After constructing the request, click&amp;nbsp;&lt;STRONG&gt;Send&lt;/STRONG&gt;&amp;nbsp;&amp;amp; Select&amp;nbsp;&lt;STRONG&gt;OK&lt;/STRONG&gt;&amp;nbsp;for the popup.&lt;/P&gt;
&lt;P&gt;&lt;IMG src="https://beingfluid.github.io/IntegrateNow/images/post52.png" alt="RESTAPIExplorer6" /&gt;&lt;/P&gt;
&lt;/LI&gt;&lt;LI&gt;
&lt;P&gt;Observe the response from the server, It returnes the information of newely created incident.&lt;/P&gt;
&lt;P&gt;&lt;IMG src="https://beingfluid.github.io/IntegrateNow/images/post6.png" alt="RESTAPIExplorer6" /&gt;&lt;/P&gt;
&lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Okay, we are not done yet with REST API explorer, But that’s it for this chapter. I am going to let you guys experiment with REST API explorer for now and in next chapter we will look at the other missing pieces. ServiceNow documentation is still the best way to learn about REST API explorer. Two of the best resources can be found&amp;nbsp;&lt;A href="https://developer.servicenow.com/dev.do#!/learn/courses/sandiego/app_store_learnv2_rest_sandiego_rest_integrations/app_store_learnv2_rest_sandiego_inbound_rest_integrations/app_store_learnv2_rest_sandiego_introduction_to_the_rest_api_explorer"&gt;here&lt;/A&gt;&amp;nbsp;&amp;amp;&amp;nbsp;&lt;A href="https://docs.servicenow.com/bundle/paris-application-development/page/integrate/inbound-rest/concept/use-REST-API-Explorer.html#use-REST-API-Explorer"&gt;here&lt;/A&gt;.&lt;/P&gt;
&lt;H6 id="what-about-other-web-services"&gt;what about other web services?&lt;/H6&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Some of you might be thinking, why we are only talking about REST and not SOAP or GraphQL? Remember, I did promise you to be able to do any kind of integrations! It is a foundation and we are starting with the most widely used and easiest web service. But bear with me, we will be there and be soon.&lt;/P&gt;
&lt;HR /&gt;
&lt;H2 id="whats-next"&gt;What’s next?&lt;/H2&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; In next chapter, we are going to build on top of information that we did gathered today, extract the useful information from the response, cover some of the missing pieces that we did not cover yet, and implement our first use case by old-school approach of script, point out some of the concerns, and start the quest for better solutions.&lt;/P&gt;</description>
      <pubDate>Tue, 15 Mar 2022 14:50:03 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-articles/integratenow-chapter-3-rest-api-explorer/ta-p/2322524</guid>
      <dc:creator>beingfluid</dc:creator>
      <dc:date>2022-03-15T14:50:03Z</dc:date>
    </item>
    <item>
      <title>Re: IntegrateNow: Chapter 3 (REST API Explorer)</title>
      <link>https://www.servicenow.com/community/developer-articles/integratenow-chapter-3-rest-api-explorer/tac-p/2322525#M4314</link>
      <description>&lt;P&gt;Again, yet another nice documentation that went without acknowledgement! Well done.&lt;/P&gt;</description>
      <pubDate>Sat, 09 Apr 2022 15:03:09 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-articles/integratenow-chapter-3-rest-api-explorer/tac-p/2322525#M4314</guid>
      <dc:creator>Anish Reghu</dc:creator>
      <dc:date>2022-04-09T15:03:09Z</dc:date>
    </item>
    <item>
      <title>Re: IntegrateNow: Chapter 3 (REST API Explorer)</title>
      <link>https://www.servicenow.com/community/developer-articles/integratenow-chapter-3-rest-api-explorer/tac-p/2400412#M6692</link>
      <description>&lt;P&gt;Thanks Anish.&lt;/P&gt;</description>
      <pubDate>Wed, 30 Nov 2022 14:14:57 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-articles/integratenow-chapter-3-rest-api-explorer/tac-p/2400412#M6692</guid>
      <dc:creator>Community Alums</dc:creator>
      <dc:date>2022-11-30T14:14:57Z</dc:date>
    </item>
    <item>
      <title>Re: IntegrateNow: Chapter 3 (REST API Explorer)</title>
      <link>https://www.servicenow.com/community/developer-articles/integratenow-chapter-3-rest-api-explorer/tac-p/2511576#M7202</link>
      <description>&lt;P&gt;This was incredibly useful. Thanks Anish!&lt;/P&gt;</description>
      <pubDate>Mon, 20 Mar 2023 21:55:58 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-articles/integratenow-chapter-3-rest-api-explorer/tac-p/2511576#M7202</guid>
      <dc:creator>jefferywent</dc:creator>
      <dc:date>2023-03-20T21:55:58Z</dc:date>
    </item>
    <item>
      <title>Re: IntegrateNow: Chapter 3 (REST API Explorer)</title>
      <link>https://www.servicenow.com/community/developer-articles/integratenow-chapter-3-rest-api-explorer/tac-p/2511646#M7203</link>
      <description>&lt;P&gt;Thanks Jeff, I am glad that this helped.&lt;/P&gt;
&lt;P&gt;~ Vishal&lt;/P&gt;</description>
      <pubDate>Tue, 21 Mar 2023 01:40:43 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-articles/integratenow-chapter-3-rest-api-explorer/tac-p/2511646#M7203</guid>
      <dc:creator>beingfluid</dc:creator>
      <dc:date>2023-03-21T01:40:43Z</dc:date>
    </item>
    <item>
      <title>Re: IntegrateNow: Chapter 3 (REST API Explorer)</title>
      <link>https://www.servicenow.com/community/developer-articles/integratenow-chapter-3-rest-api-explorer/tac-p/2595355#M7634</link>
      <description>&lt;P&gt;Hi, I have created a rest api through rest api explorer and now i would like to edit it. Where can i find it&lt;/P&gt;</description>
      <pubDate>Thu, 22 Jun 2023 08:31:37 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-articles/integratenow-chapter-3-rest-api-explorer/tac-p/2595355#M7634</guid>
      <dc:creator>kishorkk</dc:creator>
      <dc:date>2023-06-22T08:31:37Z</dc:date>
    </item>
    <item>
      <title>Re: IntegrateNow: Chapter 3 (REST API Explorer)</title>
      <link>https://www.servicenow.com/community/developer-articles/integratenow-chapter-3-rest-api-explorer/tac-p/2601814#M7674</link>
      <description>&lt;P&gt;Sorry kishor, can you elaborate more?&lt;/P&gt;</description>
      <pubDate>Thu, 29 Jun 2023 20:46:26 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-articles/integratenow-chapter-3-rest-api-explorer/tac-p/2601814#M7674</guid>
      <dc:creator>beingfluid</dc:creator>
      <dc:date>2023-06-29T20:46:26Z</dc:date>
    </item>
    <item>
      <title>Re: IntegrateNow: Chapter 3 (REST API Explorer)</title>
      <link>https://www.servicenow.com/community/developer-articles/integratenow-chapter-3-rest-api-explorer/tac-p/2611008#M7734</link>
      <description>&lt;P&gt;How to use the rest api to get values in different languages, such as English or Chinese&lt;/P&gt;</description>
      <pubDate>Wed, 12 Jul 2023 03:39:19 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-articles/integratenow-chapter-3-rest-api-explorer/tac-p/2611008#M7734</guid>
      <dc:creator>Time1990</dc:creator>
      <dc:date>2023-07-12T03:39:19Z</dc:date>
    </item>
    <item>
      <title>Re: IntegrateNow: Chapter 3 (REST API Explorer)</title>
      <link>https://www.servicenow.com/community/developer-articles/integratenow-chapter-3-rest-api-explorer/tac-p/2625854#M7796</link>
      <description>&lt;P&gt;Great documentation!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm looking for information about &lt;EM&gt;sysparm_view&lt;/EM&gt; query parameter. Do you know how does it work?&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="DiogoSoares_1-1690451981218.png" style="width: 400px;"&gt;&lt;img src="https://www.servicenow.com/community/image/serverpage/image-id/276402iC3845C6D3EAC6633/image-size/medium/is-moderation-mode/true?v=v2&amp;amp;px=400" role="button" title="DiogoSoares_1-1690451981218.png" alt="DiogoSoares_1-1690451981218.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&amp;nbsp;I only have 3 fields in that view but the response returns all the fields&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="DiogoSoares_2-1690452218943.png" style="width: 400px;"&gt;&lt;img src="https://www.servicenow.com/community/image/serverpage/image-id/276403i26F1DCE17A5030B0/image-size/medium/is-moderation-mode/true?v=v2&amp;amp;px=400" role="button" title="DiogoSoares_2-1690452218943.png" alt="DiogoSoares_2-1690452218943.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Do you know what could it be?&lt;/P&gt;</description>
      <pubDate>Thu, 27 Jul 2023 10:05:06 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-articles/integratenow-chapter-3-rest-api-explorer/tac-p/2625854#M7796</guid>
      <dc:creator>Community Alums</dc:creator>
      <dc:date>2023-07-27T10:05:06Z</dc:date>
    </item>
    <item>
      <title>Re: IntegrateNow: Chapter 3 (REST API Explorer)</title>
      <link>https://www.servicenow.com/community/developer-articles/integratenow-chapter-3-rest-api-explorer/tac-p/2706546#M8085</link>
      <description>&lt;P&gt;Is there any way to find which RestAPI is in an active state?&lt;/P&gt;&lt;P&gt;Actually, for my restAPI, I'm getting 503 in some time. Earlier it was working and giving results as well. I wanted to know if any REST API is taking too long we can optimize that.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ashish_dadhich_0-1697642131767.png" style="width: 400px;"&gt;&lt;img src="https://www.servicenow.com/community/image/serverpage/image-id/298361iC5167B8251210D75/image-size/medium/is-moderation-mode/true?v=v2&amp;amp;px=400" role="button" title="ashish_dadhich_0-1697642131767.png" alt="ashish_dadhich_0-1697642131767.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 18 Oct 2023 15:17:06 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-articles/integratenow-chapter-3-rest-api-explorer/tac-p/2706546#M8085</guid>
      <dc:creator>ashish_dadhich</dc:creator>
      <dc:date>2023-10-18T15:17:06Z</dc:date>
    </item>
  </channel>
</rss>

