How to create an API with Frends

Core feature of Frends is API Management, after all.

At the core of Frends are its API Management features, allowing for easy creation and management of APIs, and connecting them to your Processes.

API Management in Frends is made easy by allowing an API to be created using OpenAPI specification. Once the specification is ready and added to Frends, Processes can be attached to the endpoints to fulfill the required logic for the API.

Step by Step Tutorial Available

If you prefer more visual or interactive guidance on how to create APIs with Frends, you can find a step-by-step walkthrough from your own environment's home page, under Onboarding by selecting "Tutorial 5, Step 1: Creating an API with OpenAPI specification" tutorial.

How to create an API using OpenAPI Specification

Most API related views are located under APIs section in Frends Control Panel. To create new APIs, navigate to API Management view under APIs.

API Management can be found under APIs menu item.

Once in API Management view, make sure you are located in the default Agent Group, usually called Development, in order to find the + Create new button. APIs, like Processes, can only be created in the Development Environment and Agent Group.

Create new button appears in the Development Agent Group.

Creating and specifying an API is done using OpenAPI specification, also called a Swagger specification in older versions. Frends mainly supports the OpenAPI specification version 3.0.1, with 2.0 also supported for legacy applications.

While most OpenAPI specifications will "just work" when copy pasted into Frends, there are few key fields in the specification that Frends uses to create and display information about the API.

  • Title - This will be displayed name of the API in Frends

  • Description - The displayed description for the API

  • Version - This will increment automatically when changes are made to the API and it is deployed to other Agent Groups, using a semantic versioning scheme. Patch version will change for each specification update, and major version for each deployment.

  • Server URL - This will define the URL slug for your API, to be appended after your base URL that is Agent Group specific. It has to start with "/api/" and has to be unique for each API.

  • Paths - Any paths defined in the OpenAPI specification will come after the server URL, and will identify the API endpoints and thus Processes linked to them.

  • securitySchemes - While usually this section would be used to specify authentication method used, Frends' API Policies largely overwrite the schemes defined here, making them mostly informative only. Some advanced settings such as OAuth authorization URL should be set here, however.

Example API specification in Frends API Editor.

Enter your OpenAPI specification into the editor, and then click Save changes to save your API.

With the API created, we still need to create an API Policy for it to specify who is allowed to call it and with what authentication methods. We also need to link a Process to each API endpoint, in order to process all the requests coming in to the API. These steps will be handled in the next guides.

API has been created, but it is still missing a linked Process.

Last updated

Was this helpful?