July 12, 2018
REST Playground in ColdFusion (2018 release)
Comments
(0)
July 12, 2018
REST Playground in ColdFusion (2018 release)
Followers: 0 people
(0)
[flexislideshow slideshowtitle=true lightbox=true lboxtitle=true imagesize=blog-full]

About REST Playground

REST Playground is an application bundled with ColdFusion 2018 to help visualize REST services registered in ColdFusion 2018. All the REST Applications that are registered in ColdFusion are shown here. REST Playground acts like is a client for the REST services. It helps developers and testers in development of REST Applications and provide platform to test and debug REST services as and when required.

Enable/Disable developer Profile

You need to enable Developer Profile setting present under Debugging & Logging > Developer Profile in CF Administrator in order to use REST Playground. You can enable/disable REST Playground application by changing this setting. In development profile of CF installation this setting is enabled by default. It is not recommended to keep this setting enabled in Production / Production Secure Profile installation, but you can still enable it for quick debugging purpose.


1

 

Launch REST Playground

REST Playground is present in CF webroot in a folder named ‘restplay’. You can either browse to this location in the browser or click ‘Launch REST Playground’ button in the REST Services page of ColdFusion 2018 Administrator to access REST Playground.


Launch RESTPlay

 

Registering Applications in REST Playground

You can register a REST Application in ColdFusion2018 from REST Playground as well.

Just click on (+) button and a modal asking for REST Service details comes. You can hover over each of the ‘i’ s to know further information. Fill in the details and click on ‘Register’ button. These input fields are same as that we have in REST service page of CF Administrator.

REST Play

Register REST Application

 

Registered REST Application

Any REST application registered in ColdFusion (registered via CF Administrator, REST Playground, AdminAPI etc) is shown in REST Playground.

REST Playground application has two panels. The first panel (in the left) shows all the registered REST applications. This is collapsible to provide maximum room for the second panel. The second panel (to the right) has separate sections for request & response. Request section prefills all the relevant information (like Headers, Description, Parameters) of the selected application, from the REST enabled CFC. Response section shows the response sent by the web service.

Below is a screenshot of an application named ‘ArtGalleryApplication’ as shown in REST Playground.

 Registered REST Application

 

Trying / Testing a Registered REST Service

REST Playground allows you to try any registered REST Application. Make sure you pass the headers & Parameters in the Request section before clicking ‘Send’ button.

Below shows the response of hitting an endpoint of the registered REST Application ‘ArtGalleryApplication’.


Test REST Application

 

Identifying error

  1. Error in REST Application

Any registered application which has error is shown with an error marker. Say during debugging an already registered REST application you have introduced some error in the application then the application shown in REST Playground will be marked with error symbol on page refresh. You can click on the application to know more about the error.

Identifying Error in REST Application

2. Error in passing parameter to Request

HTML formatted response is shown.

Below screenshot shows coldfusion error in response body as ARTID was not provided in the request.

 Runtime Error

 

Searching an Application

In case you have multiple REST applications registered in ColdFusion, you can search for an application in the REST Playground

Search REST Application

 

Deleting an Application

You can delete any registered REST Application from REST Playground by clicking ‘trash’ icon. This will ask you for confirmation. Once confirmed this REST application will be deleted.

Delete Application

 

0 Comments
Add Comment