If you have an existing API definition in a file, you can import the API definition to quickly import multiple operations to the REST API on the REST API page.
When you import an API definition, you select either the file that contains the definition or the URL that points to the definition. You can import an API definition from the following sources:
•OpenAPI 3.0 JSON
•OpenAPI 3.0 YAML
•Swagger 2.0 JSON
•Swagger 2.0 YAML
After you specify the source file or URL, API Center parses the source and loads the operations. You select the operations to import.
Importing an API definition
Import an API definition to the REST API on the REST API page.
1On the right panel of the REST API page, click Import an API Definition, or click Import.
2Select the API definition type to import.
3In the Source field, select one of the following source types:
- File. Select an API definition file from your local system.
- URL. Specify a URL that contains the location of the API definition file.
Note: If the URL points to a specification that requires authentication, you can't select the URL option. You must download the specification as a file by providing the authentication details, save it as local file, and then import it as a file.
4Click Next.
API Center parses the file and displays the operations on the Select Operations tab. If there are any conflicts between the operations and the API, or any issue with the source file, API Center displays the warning details. Fix the API definition file and try again.
5Select the operations to import and click Next.
6Click Import.
API Center imports the selected policies and operations. You can update the policies and operations if needed. For more information, see Creating an API operation.