Resources Endpoint Flow
In Fiorano API Framework, data flows in the following manner:
- App to Target
- Proxy Request: Request passes from App to API Proxy.
- Target Request: Request passes from API Proxy to Target.
- Target to App
- Target Response: Response passes from Target to API Proxy.
- Proxy Response: Response passes from API Proxy to App.
Every resource that gets added for various purposes has the above structure and policies can be attached to any part (endpoints) of the flow, as per requirement.
Figure 1: Resources endpoints and the flow
Click the Resources icon on the left side of the API Projects screen to manage resources.
Adding a Resource
A new resource can be added by clicking the Add icon. Attributes that need to be added are described below.
Figure 2: Dialog box to add new resource
Attribute | Description |
Resource ID | Provide a unique resource name. |
Path | Context path to the resource. |
Method | Click to select one of the methods: Get, Post, Put, and Delete. |
The new resource will be added with Resource Configuration screen displayed (see the figure below).
Resources can be configured using the four screens below:
Resource Configuration
Configuring Context Variable on App
A rule will be created by default with the base path and method (Get/Post/Put/Delete) as chosen (see the figure under the Adding a Resource section above) while adding the resource.
Enable the following as required:
- Forward base path to target
When the resource base path, which includes path parameter values, has to be passed to the target as input, it can be appended to the target URL by selecting this option. - Accept child paths
When multiple resources have URLs starting with the same context path, the resource with the exact match of the resource base path is fetched by default. But if a particular resource, for example, base path is /accounts/{accountId} needs to be chosen for any of its branched resources with resource base path as /accounts/{accountId}/balance, select the Accept child paths option.
Refer to the Configuring Rule section to attach a rule to the application by setting the Identifier Type and variable.
Target Configuration
Configuring Load Balancing and Streaming on Target
The targets that are configured in the Targets section appear here.
Rules section
Target rules section renders dynamic selection of the endpoints, from among the list of selected targets for a given resource, based on the target-specific preconfigured rules.
One or more targets could be added against each unique rule. The target group against the first rule entry that's satisfied will be selected and executed in a round-robin or weighted round-robin fashion. In other words, the rule entries have a decreasing order of precedence from top to bottom. The rule entries could be moved up or down with the arrows to adjust the target group priority. But the default "NoRule" entry is always at the bottom, which cannot be modified or deleted. The Target group against this would be considered when all the other rules fail to be satisfied. Each of the targets under the Selected Targets section must be assigned to at least one rule.
Figure 10: Configuring Load Balancing
Policy Configuration
Policies that are configured can be added to the resource to any endpoint in this section.
Viewing the policy execution order
Click the View policy execution order Expand icon to see the graphical representation of policy execution order.
Adding policy to a resource
Perform the following in the Policy Configuration section:
- Click the Add icon.
- Click the resource to view four editors on the right side - Resource Configuration, Target Configuration, Policy Configuration, and Open API Paths.
- Go to Policy Configuration, select the endpoint to which the policy needs to be added and click the Add icon to add the policy.
- Add the required policies (already added policies) from the list of policies and click OK.
Policies will be added and get displayed under Policy Configuration. Click the Save icon to apply the changes and to attach the policy to the required resource endpoint.
Open API Paths
WAF Configuration
To configure Web Application Firewall, select the Enable Web Application Firewall (WAF) option and follow the instructions in the Configuring Web Application Firewall section.