Create an api with an inline script

Create an api with an inline script slide 0
Download Create an api with an inline script

Post on 13-Apr-2017




0 download


Create an API with an Inline ScriptCreate an API with an Inline Script Download the API Manager form here in to the API Publisher.Select the option to design a new API and clickStart Creating.Give the information in the table below. To add resources, click theAddbuttonFill the fields with following data.Name : City_NameContext: /locationVersion: 1.0.0Resources URL pattern{town}Request typesGET Click on {twon} Click on Next: Implement > Select Prototype API in Implement phase Select Inline option.Expand the GET method. Copy the following script in the Script'CONTENT_TYPE', 'application/json');var town = mc.getProperty('');mc.setPayloadJSON('{ "Town" : "'+town+'"}'); Click on Deploy as a Prototype Select Go to API StoreLogin in API Store as admin Select Prototyped APIThen select your API (City_Name) Select API Console optionExpand GET methodType the City Name (Any)Click on Try it out button. This is the Final Response of your API


View more >