Contact Us 1-800-596-4880

Search Inside Your API Specification Dependencies

When you import your API specifications from Exchange or Maven as dependencies of your projects, those dependencies relocate from src/resources/api/ to a ZIP file in your project’s classpath. This change means that you cannot search for your API dependencies by using the File Search option in Studio. To enable you to search for specific text inside your API dependencies, Studio introduces the API Search feature.

You can access the API Search menu from the taskbar at the top of the Anypoint Studio display, either by selecting Search > Search…​ or by using the control and H keys on your keyboard simultaneously:

api search

To search inside of your API specification dependencies:

  1. Type the text that you want to search for, following these conventions:

    • Use * to search for any chain of characters in your search criteria.
      For example, /*customer matches both possible endpoints /customers and /{customerId}.

    • Append ? to search for any character after a specific pattern.
      For example, /?customer matches /{customerId} but not /customers because there must be a character between the search criteria that you defined between the ? literal.

    • Use \ to escape any of the reserved literals used in search patterns.
      For example, if you want to search for strings containing *, ?, or \ you must escape them: \*, \?, and \\.

  2. If you want to specify a specific name pattern for the files you want to search through, type the pattern in the File name patterns field, following these conventions:

    • Use * to search for any chain of characters in your search criteria.
      For example, *.raml searches in all file names that end with the .raml extension.

    • Use ? to allow any character after a specific pattern.
      For example, customer?1.raml searches inside file such as customer01.raml, customer11.raml, or customer21.raml.

    • Use ! to exclude certain filenames or patterns.
      For example, !examples.raml searches inside all files except examples.raml.

  3. Click the Choose…​ button to filter per file type.

  4. Select one of the following types of API specifications in your project:

    • API dependencies searches inside API specifications imported from Exchange or Maven.

    • Local API Files searches inside API specifications added from a local file or from Anypoint Design Center.

  5. Click Search.

You can also search for all API specifications inside your open projects either by selecting Navigate > Open API Resource in the taskbar at the top of the Anypoint Studio display, or by using cmd+Shift+P (MacOS) or control+shift+P (Windows/Linux) keyboard shortcuts:

open api resource
  1. Type the name of the API resource that you are looking for:

    open api resource result

    Studio displays all possible matches for the API resource that you typed.

  2. Select the resource you were looking for and click OK.