Creating an API by importing an API from a URL

Before you begin

You must have the Manage APIs or activate/deactivate APIs functional privilege to perform this task.

Procedure

  1. Open the menu options and select APIs.
    A list of available APIs appears.
  2. Click Create API.
  3. Select Importing API from URL.
  4. Type the URL from where the API is to be imported.
  5. Select Protected to make the API a protected API.
  6. Type a name for the API name in the Name field.
    • If you provide an API name, it overwrites the API name that is mentioned in the uploaded file. The API is then displayed with the name provided.
    • If you do not provide an API name, the API name that is mentioned in the uploaded file is picked up. The API is then displayed with the name that is mentioned in the uploaded file.
    • If you do not provide an API name and the uploaded file does not have an API name that is mentioned, then the API is displayed as Untitled.
  7. Provide a description for the API in the Description field.
  8. Select the type.
    The available types are OpenAPI, RAML, Swagger, WSDL, and GraphQL SDL.
  9. Provide a version for the API in the Version field.
  10. Select the team to which the API must be assigned in the Team field.
    The Team field appears only when the Team feature is enabled. It displays only the teams that you are a part of. If you have the User Management functional privilege, all teams are displayed. You can select more than one team. To remove a team, click the delete icon next to the team.
  11. Click Create. An API is created with default policies.
    Note:
    • Importing an API fails for an invalid WSDL file.
    • Creating an API by importing swagger files from an HTTPS URL that is using self-signed certificates might fail. To workaround this issue, you can set the system environment variable as export TRUST\_ALL=true so that the invalid certificates are ignored. Use the workaround with caution as setting the variable makes the swagger-parser ignore all invalid certificates too.
    • As the GraphQL API schema does not contain a native endpoint, you must manually update the Native endpoint URL in the API details section and the Endpoint URI in the routing policy after you create a GraphQL API.