How to Publish RAML-Based API To Anypoint Exchange and Consume Using Anypoint APIKit

16
HOW TO PUBLISH RAML-BASED API TO ANYPOINT EXCHANGE AND CONSUME USING ANYPOINT APIKIT

Transcript of How to Publish RAML-Based API To Anypoint Exchange and Consume Using Anypoint APIKit

Page 1: How to Publish RAML-Based API To Anypoint Exchange and Consume Using Anypoint APIKit

HOW TO PUBLISH RAML-BASED API TO ANYPOINT EXCHANGE AND CONSUME USING ANYPOINT APIKIT

Page 2: How to Publish RAML-Based API To Anypoint Exchange and Consume Using Anypoint APIKit

ANYPOINT EXCHANGE

Anypoint Exchange is home to complete listing of your connectors, API's,

templates and examples. Anypoint Exchange is hub where you can find

connectors, API's, examples and many more. You can connect to Exchange with

Anypoint Studio to download and install connectors, consume API's etc.

Page 3: How to Publish RAML-Based API To Anypoint Exchange and Consume Using Anypoint APIKit

PUBLISH API TO ANYPOINT EXCHANGE

Sign-in to Anypoint Mulesoft Platform and go to Exchange. Make sure you have

access to Exchange and it can be verify under Access Management < Users.

Now, click on Add item and select Rest API from drop down list and it will

navigate you to other page.

Page 4: How to Publish RAML-Based API To Anypoint Exchange and Consume Using Anypoint APIKit

PUBLISH API TO ANYPOINT EXCHANGE

Provide details like Item Name and Item Id (auto generated). Other fields are

optional. Click on Add Version at the end of page and it will ask to

provide details like Rest API Spec Version, API Version, API Portal and Rest

API url. You can get API Portal and Rest API url from your Live Portal. Click on

Done.

Page 5: How to Publish RAML-Based API To Anypoint Exchange and Consume Using Anypoint APIKit

PUBLISH API TO ANYPOINT EXCHANGE

Finally click on Save new item and it will navigate you to new page from there

you can publish Rest API to Exchange.

Page 6: How to Publish RAML-Based API To Anypoint Exchange and Consume Using Anypoint APIKit

PUBLISH API TO ANYPOINT EXCHANGE

Now, Click on Request to publish and it will publish your API to Exchange.

Page 7: How to Publish RAML-Based API To Anypoint Exchange and Consume Using Anypoint APIKit

PUBLISH API TO ANYPOINT EXCHANGE

This is how you can publish your API and any other item to Exchange.

Page 8: How to Publish RAML-Based API To Anypoint Exchange and Consume Using Anypoint APIKit

CONSUME REST API USING ANYPOINT APIKIT

Go to Anypoint Studio and go to File < New < Mule Project and it will open

pop-up window. Provide the Project Name and checked Add APIKit

Component. Click on ellipsis button near API Definition, it will show Drop Down

list and select Anypoint Platform, it will open new pop-up window.

Page 9: How to Publish RAML-Based API To Anypoint Exchange and Consume Using Anypoint APIKit

CONSUME REST API USING ANYPOINT APIKIT

Now click on Add Credentials and sign in with Anypoint Platform account.

Page 10: How to Publish RAML-Based API To Anypoint Exchange and Consume Using Anypoint APIKit

CONSUME REST API USING ANYPOINT APIKIT

Now click on Add Credentials and sign in with Anypoint Platform account.

Page 11: How to Publish RAML-Based API To Anypoint Exchange and Consume Using Anypoint APIKit

CONSUME REST API USING ANYPOINT APIKIT

Once you will sign in then you can see list of all API's associated with your

account and select API which you want to consume and Press OK. Finally, click on

Finish.

Page 12: How to Publish RAML-Based API To Anypoint Exchange and Consume Using Anypoint APIKit

CONSUME REST API USING ANYPOINT APIKIT

Once you will sign in then you can see list of all API's associated with your

account and select API which you want to consume and Press OK. Finally, click on

Finish. This will generate various flows like API Main, API Console, Exception

Strategy and various flows depending on HTTP method defined in your API.

Page 13: How to Publish RAML-Based API To Anypoint Exchange and Consume Using Anypoint APIKit

API MAIN AND CONSOLE FLOW

• Main Flow performs below function

• Exposes API using HTTP or jetty.

• Routes request between interface and backed flows depending on a HTTP

request.

• References exception strategies that produce HTTP-status-code responses.

Page 14: How to Publish RAML-Based API To Anypoint Exchange and Consume Using Anypoint APIKit

BACKEND FLOWS

APIKit generates the backend flows for each request-action pairing in RAML.

Page 15: How to Publish RAML-Based API To Anypoint Exchange and Consume Using Anypoint APIKit

EXCEPTION STRATEGY

APIKit generate the Exception Strategy flow for various response code.

Page 16: How to Publish RAML-Based API To Anypoint Exchange and Consume Using Anypoint APIKit

THANK YOU.