Creating an API by Importing an API from a file

About this task

When you work with APIs, you can import an API definition from a file to simplify creation, maintain consistency, and reduce errors. API definition files typically follow the OpenAPI (Swagger) standard and include details about endpoints, request and response formats, authentication methods, and other specifications. This approach eliminates manual configuration and helps maintain standardized API structures.

Procedure

  1. From the home page, select an existing project. If no project exists, create a new project.
    The project opens in the Development tab.
  2. In the quick access page, click Add an API > Import.
    The Import API from file page is displayed.
  3. On the Import API from file page, upload or drag your YAML or JSON API definition file in the Upload API file section.
  4. Provide the following details:
    • API name. Provide a name for the API.
    • Namespace. Define a domain for the API to avoid conflicts with other APIs.
    • API version. Specify the version of the API to manage changes over time. The default value is 1.0.
    • API type. The API type is set to REST by default.
    • Maturity state. Indicate the API's development stage, such as Draft, Published, or Deprecated.
    • API grouping. Organize related APIs under a common group for better management.
    • Tags. Add labels to categorize the API for improved search and filtering.
  5. Click Create.
    Two files are created:
    • An API file with kind: api.
    • An API specification file.

What to do next

  1. Author policies. Define and apply policies to manage security, rate limit, caching, and other API behaviors. For more information, see Author policies.
  2. Deploy the API. Publish the API to the gateway and make it accessible for consumers. For more information, see Deploy an API to webMethods API Gateway.
  3. Test the API. Verify that endpoints work as expected. For more information, see Testing a deployed API.