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.
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.
How to create a Proxy API?
Choose API Type as Proxy and click on Create.
Enter all the mandatory information i.e. API name, version, Method (SET,PUT, POST, DELETE) , Content Type and Service Endpoint and Click on Create.
Manage section will show you all your created API’s with their details.
How to create a JAVA API?
Select API Type as JAR and click on Create.
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
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:
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.
Enter all the mandatory details and click on Create.
*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.
Traffic Policy:
To create a Traffic Policy, navigate to Policies > Traffic and click on Create Policy.
Enter all the required details and click on Create.
IAM
To create an IAM, navigate to IAMs > Manage and click on Create IAM.
Enter the Name of IAM and click on Create.
API Mapping:
For API Mapping, navigate to IAMs > API Mapping. Select your IAM and click on Map API as shown below.
Select IAM, API, Traffic Policy ,Price and then Click on Submit.
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 ).
Once the jar has been successfully uploaded, navigate to Rules > Manage and click on Create Rule.
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.
To attach rules, navigate to Rules > Attach. Select API and Rules (Pre/Post) and click on Submit.
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.
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.
Dashboard
Navigate to Dashboard > Summary and you can view all the information related to Average request time, API Calls Report etc. on filter basis.