Getting started with API Gateway Management console - shephertz/App42_APIGateway_Docs GitHub Wiki

Getting started with API Gateway Management console.

To start with API Gateway, sign in first with the required details i.e. Organization, username and password.

SignInAPIGateway

After entering all the required details, click on Sign In. On successful authentication, you will be redirected to the dashboard.

Create API

To create a new API, Navigate to APIs > Manage. Click on Create API.

CreateAPI

How to create a Proxy API?

Choose API Type as Proxy and click on Create.

ChooseAPI

Enter all the mandatory information i.e. API name, version, Method (SET,PUT, POST, DELETE) , Content Type and Service Endpoint and Click on Create.

CreateProxyAPI

Manage section will show you all your created API’s with their details.

ManageAPI

How to create a JAVA API?

Select API Type as JAR and click on Create.

ChooseAPI

Enter all the mandatory information i.e. Name, Version, Add Method, Content Type and upload your jar file. To get more information on how to write Java API(jar), refer Writing Java API section

CreateJarAPI

Once you click on Create, your API will be created.

Setting Authentication on API:

Navigate to APIs> Settings to edit the settings of your API as shown below:

SettingsAPI

Select your API , enable its State (if not enabled), enable Authentication and Select Authentication Policy. (To create Policy [Refer Policy Section )] (https://github.com/shephertz/App42_APIGateway_Docs/wiki/Getting-started-with-API-Gateway-Management-console#policy)

Policy

Authentication Policy:

Navigate to Policies > Authentication and click on Create Policy.

CreatePolicy

Enter all the mandatory details and click on Create.

CreatePolicy

*The above policy is for oAuth type and Grant Type as Client ID. Select Grant Type as Authorization to create Authentication Policy with Grant Type as Authorization. Provide the redirected url which is the location where the user will be redirected after successfully login to your app. For example to get access token for your app in facebook you need to subimt redirected uri which is nothing only the app Domain that you provide when you create your facebook app.

Similarly, Select Auth Type as Key to create a Key based authentication policy, as shown below.

KeyBasedPolicy

Traffic Policy:

To create a Traffic Policy, navigate to Policies > Traffic and click on Create Policy.

CreateTrafficPolicy

Enter all the required details and click on Create.

CreateTrafficPolicy

IAM

To create an IAM, navigate to IAMs > Manage and click on Create IAM.

CreateIAM

Enter the Name of IAM and click on Create.

CreateIAM

API Mapping:

For API Mapping, navigate to IAMs > API Mapping. Select your IAM and click on Map API as shown below.

MapAPI

Select IAM, API, Traffic Policy ,Price and then Click on Submit.

SubmitIAM

Rules

Before creating a rule, you need to upload jar from Rules > Upload Jar. Choose the jar and click on Upload.(To create Rules Jar Refer Writing Rules ).

UploadJar

Once the jar has been successfully uploaded, navigate to Rules > Manage and click on Create Rule.

CreateRule

Provide Name for the Rule, Select Method on which you want to apply Rules, Provide the condition , Select your rules jar file , select your Type i.e. Pre or Post and then select the jar executor class. Click on Create.

CreateRule

To attach rules, navigate to Rules > Attach. Select API and Rules (Pre/Post) and click on Submit.

AttachRule

Generate Code

If you want to generate the code, navigate to Generate Code. Here, select the API and required platform (Android, Java, C#, Flash etc.) and click on Generate.

GenerateCode

Test API & View Specs:

After performing all the above steps, to test the created API and view its specifications, navigate to Test API & View Specs and choose API.

TestAPI

Dashboard

Navigate to Dashboard > Summary and you can view all the information related to Average request time, API Calls Report etc. on filter basis.

Dashboard