how to publish raml-based api to anypoint exchange and consume using anypoint apikit
TRANSCRIPT
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.
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.
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.
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.
PUBLISH API TO ANYPOINT EXCHANGE
Now, Click on Request to publish and it will publish your API to Exchange.
PUBLISH API TO ANYPOINT EXCHANGE
This is how you can publish your API and any other item to Exchange.
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.
CONSUME REST API USING ANYPOINT APIKIT
Now click on Add Credentials and sign in with Anypoint Platform account.
CONSUME REST API USING ANYPOINT APIKIT
Now click on Add Credentials and sign in with Anypoint Platform account.
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.
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.
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.
BACKEND FLOWS
APIKit generates the backend flows for each request-action pairing in RAML.
EXCEPTION STRATEGY
APIKit generate the Exception Strategy flow for various response code.
THANK YOU.