Adding More APIs to Existing Projects

A ReadyAPI project usually contains at least one API, but you can add additional APIs at any time.

You can add APIs to a project in the following ways:

  • Import from Definition

    Import an API definition such as Swagger/OpenAPI, GraphQL, AsyncAPI, gRPC, or WSDL from a local file, URL, or Swagger Studio.

  • Create API Definition

    Create a REST or Kafka API definition from scratch.

  • Discover API

    Record requests while interacting with a service to automatically generate an API definition.

Import from Definition

To import the API from the definition:

  • Click next to the APIs node and select Import API Definition, or

  • Right-click the APIs section in the Navigator and select Import API Definition.

The Import API Definition dialog provides the following import options:

Table 43. Import options

Tab

Description

My Computer or URL

Import the definition from a definition file: Swagger/OpenAPI, GraphQL, AsyncAPI (Kafka), gRPC, WSDL, or WADL.

Swagger

Import the definition from Swagger Studio.

OAS 3.1

Displays OpenAPI Specification version 3.1 definitions.



Note

ReadyAPI replaces special characters like {,} in automatically generated test case names derived from request URLs due to compatibility issues with Groovy scripts.

Import from file

To import an API from a definition file, specify the path to a local file or its URL in the Source field and click Import API:

RAPI_Screenshot_Import_API_Definition.png

ReadyAPI detects the definition type automatically. To configure advanced options, enter the required definition type manually in the Default media type field.

Advanced Options

Below, you can find descriptions of the advanced options for different definition types:

Swagger/OpenAPI Definition (REST)
  • Default Media Type - Specifies the media type that ReadyAPI uses when a request does not define one.

Important

When you load a large definition, ReadyAPI may fail to save the project because of the lack of Java heap space. To fix the issue, you can disable creating request samples.

GraphQL schema
WSDL Definition (SOAP)
  • Create sample requests for all operations - Creates sample requests for all WSDL operations.

    Adding WSDL definition to ReadyAPI: Generated sample request
  • Create a test case for the imported WSDL - Generate test cases for each operation in WSDL.

  • Create a virtual service for the imported WSDL - Creates a virtual API based on the imported WSDL.

WADL Definition (REST)
  • Create a test case for the imported WADL - Select this option if you want ReadyAPI to generate test cases

AsyncAPI Definition

There are currently no advanced options for AsyncAPI definitions.

gRPC Definition

There are currently no advanced options for gRPC definitions.

Working with Callbacks

Callbacks describe asynchronous responses in your REST APIs, such as webhook events sent after a request completes. These callback definitions often come embedded within API definition files (like OpenAPI 3.0+ files) that you import from your computer, a URL, or API hubs. ReadyAPI displays these asynchronous interactions as part of the imported API structure.

Key Callback Behavior
  • Each API method can have multiple callbacks defined.

  • Callbacks are read-only: you cannot send requests to them or modify them directly.

  • Each callback inherits the endpoint from its parent method.

  • ReadyAPI organizes and displays callbacks automatically when you import an API definition that includes them.

Note

To view callbacks, first import an API definition that includes callback objects (for example, OpenAPI 3.0+ files with callbacks defined). ReadyAPI places them in the Navigator under the corresponding method and in the Specifications tab.

Import an API Definition with Callbacks

Importing API definitions with callbacks allows you to test and explore asynchronous interactions, such as webhooks, directly in ReadyAPI.

  1. In the Navigator tree, hover over the APIs node and click .

  2. From the context menu, select Import API Definition.

  3. In the Import API Definition dialog, choose one of the tabs - My Computer, URL, or SwaggerHub - to import an API definition that includes callbacks. You can import from a local file (such as a .json or .yaml), a URL, or SwaggerHub. Click Import API to load it into ReadyAPI.

    ReadyAPI Import API Definition dialog with tabs for My Computer, URL, and SwaggerHub and a sample file selected for import

    ReadyAPI displays the callbacks below the related REST methods in the Navigator. You can also view them in the Specifications tab.

    Callbacks shown under REST methods in ReadyAPI's Navigator after importing an API with callback definitions

Import from Swagger Studio

Important

ReadyAPI supports Swagger Studio SaaS and Swagger Studio On‑Premise 1.23.0-46 or later.

Use the Swagger tab to import public or private API definitions from Swagger Studio:

  1. Select the API definition that you want to add to your project.

    Swagger Studio import dialog in ReadyAPI showing API search filters, available API definitions, and the Import API button.
    • The My API option contains APIs created by or shared with your connected Swagger Studio account. If you have not connected an account yet, click Log In to Swagger Studio.

    • The Public API option contains all accessible APIs in Swagger Studio.

      Tip

      Use search and filters to quickly locate APIs.

  2. Select versions of definitions that will be imported. The default version (marked with ) of the definition is selected by default:

    Version selection menu in the Swagger Studio import dialog showing available API definition versions.
  3. Click Import API.

You can also publish your API definition to Swagger Studio or Swagger Studio On-Premises. See Export to Swagger Studiofor details.

Swagger Studio connection issue

If you cannot connect to Swagger Studio with your current credentials, regenerate your API key in Swagger Studio and update it in ReadyAPI.

  1. Sign in to Swagger Studio.

  2. Click the My Profile icon, and then API Key.

    Swagger Studio user profile menu showing the API Key option.
  3. Click More options and select Regenerate API Key.

    Swagger Studio API Key page showing the Regenerate API Key option.
  4. In ReadyAPI, update your Swagger Studio account information with the new API key, then click Connect.

    ReadyAPI Preferences dialog showing Swagger Studio account settings and API key configuration.

Important

If you use this API key to access the Swagger Studio Public API, update the key in your applications and scripts as well.

Import GraphQL API from Introspection Query

Import a GraphQL API directly from a running service by providing the GraphQL endpoint URL. You do not need a predefined schema file.

  1. Enter the GraphQL endpoint URL. By default, GraphQL services commonly use the /graphql endpoint.

    Import API Definition dialog in ReadyAPI showing a GraphQL endpoint URL entered in the Source field.
  2. Ensure that introspection queries are enabled on the server. ReadyAPI uses introspection to automatically generate the schema.

    add-graphql-schema.webp
  3. Click Import API.

    ReadyAPI generates the GraphQL schema automatically and adds the endpoint URL to the API definition.

    Endpoints tab in ReadyAPI showing a GraphQL endpoint URL added to the imported API definition.

Create API Definition (For REST and Kafka services)

  1. In the Navigator, click next to the APIs node and select Create API Definition.

    Alternatively, in the Navigator, right-click the APIs node and select Create API Definition from the context menu.

  2. In the Create API Definition dialog, enter a name in the API name field, select REST or Kafka from the Protocol dropdown, and click Create API.

    Create API Definition dialog with API Name field set to "My API" and Protocol dropdown set to REST.

Tip

To populate the new API, see Managing REST APIs or Managing Kafka APIs.

Other ways to add APIs

New XML-RPC service from URL

Add an XML-RPC service to your project.

  1. In the Navigator, right-click the APIs node and select New XML-RPC Service from URL.

  2. In the New XML-RPC Service from URL dialog, enter the service .rem URL in the XML-RPC Location field.

    New XML-RPC Service from URL dialog with an empty XML-RPC Location field and an unchecked Create Requests checkbox.
  3. Optional: To create sample requests, select Create Requests.

  4. Click OK.

See Also

Publication date: