F5 XC EMEA Workshop > Class 4 - API Protection > Expose the API Application Source |
Start Protecting the modern API application with F5XC¶
Assign OpenAPI spec file to the LB¶
Copy Paste the SWAGGER File¶
Go to the link below and copy the OpenAPI Spec file on your laptop with extension .yaml. It defines the Sentence API app without the COLORS API endpoint.
https://app.swaggerhub.com/apis/F5EMEASSA/API-Sentence-2022/v1-auth
Upload the file¶
In your Namespace, goto Web and API Protection > Manage > Files > OpenAPI Files and click Add OpenAPI Files on the top. The OpenAPI Files button in the middle may not work currently due to a GUI bug.
Create the API Definition¶
You can’t assign an OAS spec file to a Load Balancer or a listener (Virtual Server in BIG-IP, Server or Location in Nginx). You must create an API Definition object.
In your Namespace, create a new API Definition into Web and API Protection > Manage > API Security > API Definition
Create a new API Definition and select the file you just created in the step before. Select the version (so far, we have only one version) as shown in the screenshot below and click on Save and Exit.
Note
The API Definition is now created, and can be assigned to a Load Balancer
