API Gateway 11.1 | Getting Started with API Gateway | Create your first REST API | Testing a REST API
 
Testing a REST API
You can test a REST API by invoking the REST API URI in postman. Specify the REST API URI with the required method in the format as follows:
API format
You can customize or shorten the base path of the REST API URI by creating URL aliases. To know more about how to create URL aliases, see URL Aliases.
Let's test the SearchCruise REST API, which was imported using a file. In this example, to test whether the SearchCruise API is created successfully, let's search a cruise with cruise ID 00001 using the SearchCruise API. The API response should include the details of the requested cruise.
*To test a REST API using Postman
1. In the Postman UI, select the http method as GET as the search is performed using the cruise ID.
2. Invoke the endpoint, http://host_name/gateway/SearchCruise/10.2/cruises/{CrusieID}.
test API
3. In the Authorization tab, select the type as Basic Auth and provide the login credentials of the API Gateway instance.
4. Click Send.
The REST API is invoked successfully and returns the status code as 200. Also, the response contains the details of the Cruise. You can now expose the API to the consumers.