Astera lets the user view their API deployments in a Swagger UI from the deployment section of the Server Browser.
For our use case, we already have deployments created, as evident in the Server Browser panel:
To view the swagger options, right-click on the deployment node and hover over Swagger Options.
Selecting View Swagger UI is going to present us with a new window where we can see Swagger for our deployed APIs.
The user can authorize, test, copy the response layout, and do a lot more within this UI.
Note: For deployments made on the local server, users would need to install the machine name certificate of the client to the server directory separately, to be able to test APIs from the Swagger UI.
You can expand each endpoint to view its details and you can also provide authorization for when consuming these endpoints.
This concludes working with the Swagger UI feature in Astera.
In Astera, users can troubleshoot runtime issues by monitoring live tracing for any APIs deployed on the server.
To configure logging, create a new server profile by right-clicking on the cluster node in the Server Explorer and selecting Server Profiles from the context menu.
This will open a new window.
Create a new profile by selecting the Add a new server profile option.
As you can see, we already have a server profile created.
Select the Publishing Settings tab and scroll down to the API Runtime logging and tracing section.
Here, the user can select the level of logs to be traced, including information, warnings, errors, or all-inclusive. The logging stages include,
Request Validator Logs: It includes pre-validating the request context before sending it through the runtime processor by validating the server availability, and deployment activity, and inspecting if the request has the supported formats.
Processor Logs: Processor logs include runtime components of the request, including information about a cached request pipeline, the concurrent pipelines in execution, and runtime capacity.
Purge Event Logs After: This counter shows the number of days after which the logs will be purged/removed since a lot of them can accumulate at runtime.
Once the server profile is configured and saved, the next step is to select this profile in the Server Properties.
After logging and tracing have been configured, users can now view the live runtime traces generated for all deployed APIs.
Next, go to the Server Browser and open the Deployed Endpoint View. To view the tracing for any deployed API, right-click and select Show Runtime Trace for any API deployment listed.
You can now see the trace.
This concludes logging and tracing in Astera.
The Server Browser in Astera can be used to see all the Deployments/APIs/API services that the user has deployed onto the Astera Server.
Once we have deployed our API flows, we can see the deployment in the Server Browser,
We can select a different view if we click on the Select Deployment View - Filter option (the filter icon on the left) in the Server Browser toolbar.
Let's select API Deployments from the drop-down menu.
This will open a new view for the user. Here, you can directly see the deployments that have been made by the user(s). If we expand a deployment, we can see all the available endpoints under it.
When we deploy the API flow, a description is automatically added, for each endpoint/API flow. This is with respect to the action performed by the API flow.
Note: We can see two entries for each endpoint because each endpoint can be processed Synchronously and Asynchronously.
Synchronously processed endpoints can be seen with the HTTP method on its own and Asynchronously processed endpoints can be seen with the HTTP method encircled with blue curves.
We can see a consolidated view containing only the active endpoints from each deployment using the following option.
This will show the user a different view,
We can see the endpoints in a tree-like or hierarchical structure. Each endpoint is characterized based on its resource.
Upon hovering over each endpoint, their Request URL can be seen,
If we move back to the API Deployment View, we can see some options in the context menu of each of the deployments.
View Deployment: Selecting this option will let the user view the deployment in the deployment manager.
Next, there are a few options present under Swagger Options,
View Swagger UI - Lets the user view the endpoint within a Swagger UI, in Astera Data Stack.
Export as OpenAPI file: Selecting this option will allow the user to generate an Open API specification JSON file which we can export/save to the desired location, be it local or on a network.
Note: This file can be used to import the API collection to any third-party tool i.e., Postman, Insomnia, etc., for consumption.
Copy Swagger URL: This option lets the user copy the Swagger URL for the deployment. We can use this URL to generate the swagger definition file for the API collection.
Delete Deployment: Selecting this option will remove the selected deployment from the Server Browser.
Generate Testflow for All Endpoints - This option generates test flows for all endpoints present in the deployment.
Each deployment can either have a single endpoint or multiple ones. Similar to deployment, a context menu is available for each endpoint as well.
Copy URL to Clipboard: This option allows the user to copy the endpoint’s request URL to the clipboard.
Show Runtime Trace: Selecting this option will show the runtime trace for that endpoint.
Deactivate: Selecting this option will deactivate a particular endpoint.
Note: Select the Activate option to re-activate the service.
Do Not Require Authentication: Selecting this option will disable the authentication required by this endpoint. To enable the authentication, open the context menu again and select the Authentication Required option.
Generate Test Flow - Select this option to generate a test flow for the selected endpoint.
In terms of security, Astera gives the user the ability to define roles and provide resources to each role.
The security view in the Server Browser can be selected from the Server Browser drop-down menu,
This will open a new view,
Expanding the User and Roles nodes shows us the Astera client’s users and the available roles respectively.
Resources of each role can be allocated by right-clicking on the role and selecting Edit Role Resources from the context menu.
Note:
New users can be added by right-clicking on the User option and selecting Register User from the context menu.
New roles can be added by right-clicking on the Roles option and selecting Add New Role from the context menu.
Here, the resources available below are,
URL
Cmd
REST – Publishing and Publishing Async
Note: A user needs to have the resources enabled for the deployed API to avail the API services. Otherwise, they might never be able to use the deployed APIs.
Note: Users will only be able to access the resources that have been allocated to their role.
To assign a role to a user, right-click on the user and select Edit User Roles from the context menu.
Note: Selecting the specific role and then clicking the right-facing arrow will assign the role to the user. Clicking the left-facing arrow after checking a role will remove the role from the user.
We can also view the details of our Resource Catalog in the Server Browser. Simply hover over the Resource Catalog View option from the drop-down menu.
Here, you will be able to see the following options,
View by Artifact Type - Gives the user a catalog view based on artifacts.
View by Namespace - Gives the user a catalog view based on namespace.
Apart from the deployment view options, these are the following options also present on the main menu bar of the Server Browser.
Add Deployment: Adds a new deployment
Remove All Deployments: Removes all deployments present on the Server Browser
Expand All: Expands each of the nodes of all the deployments.
Search Bar: Here, you can write a name to search for any specific deployment or an endpoint.
This concludes the Server Browser functionalities for API Publishing in Astera.
Astera lets users monitor live metrics for all deployed APIs using a Visualization Dashboard.
Select the Plots Explorer view in the Server Browser.
This will open a new view.
Right-click on the option present underneath the Dashboard node and select Open Dashboard from the context menu.
Selecting this will open the dashboard window.
The dashboard shows various performance metrics and graphs which can be used to monitor the deployed APIs. These include,
Total number of requests
Requests per second - Measures the throughput of the API server, gauging the number of requests the server can handle in a time unit of a second.
Average response duration - This is a critical KPI that signifies the average time taken for an API to respond.
Most Recent Logs Record - Lists the 10 most recent requests catered along with detailed information about the server and client.
Requests by Response Status - This shows the percentage of each of the different responses for the deployed APIs.
Requests by Timespan - A bar graph that highlights the traffic received as per the number of requests received with time.
Average Response Duration by Timespan - A line graph showing the average response durations with time.
Using the Data Range filter, all these metrics and graphs can also be filtered by a data view.
Note: The source table for the dashboard can be configured to purge.
From the Server Explorer, right-click on the cluster node and open Cluster Settings. Here, you can set the Purge REST Request Info After value to enable purging the source table.
A value of 0 signifies that the table would never be purged.
This concludes API Monitoring in Astera.