API Gateway 10.15 | Getting Started with API Gateway | Create your first REST API | Creating a REST API by importing an API from a file
 
Creating a REST API by importing an API from a file
Let's look at a sample scenario, where you are creating a REST API by importing the SearchCruise file.
Before you begin
Ensure that you have
*Downloaded the REST API file with the required specifications.
*Manage APIs or Activate / Deactivate APIs functional privilege. If you are an Administrator you would have this privilege by default.
*To create a REST API by importing an API from a file
1. Click APIs in the title navigation bar.
2. Click Create API.
3. Select Import from file.
Import API from file
4. Click Browse and select the SearchCruise.zip file.
5. Click Open
If the Swagger parser is a self-contained file with no external references, you can upload directly. If the imported REST API file contains external references, the entire set of files must be uploaded as a ZIP file with a structure as referenced by the imported file. In such case, API Gateway displays the Root File Name field. Provide the root file name in the ZIP folder that you want to import. In this example, the root file name is SearchCruise.json.
6. Provide the API name as Search Cruise in the Name field.
7. Provide the version number as 1.0 in the Version field.
8. Select the Type as Swagger as the imported Search Cruise API is a swagger file.
9. Provide a description as Import search cruise API in the Description field.
10. Select the team as Administrator for which you want to assign the Search Cruise in the Team field.
This field appears only when the Team feature is enabled. It displays only the teams that you are a part of.
11. Click Create.
The Search Cruise API is created and the API details screen displays.
REST API details
Next Steps
Now that you have created the REST API, you must
*Check whether the Petstore API is imported properly by using any of the API testing tools. For details on how to test the API, see Testing a REST API