Mit Sammlungen den Überblick behalten
Sie können Inhalte basierend auf Ihren Einstellungen speichern und kategorisieren.
Diese Seite gilt für Apigee und Apigee Hybrid.
In diesem Thema wird beschrieben, wie Sie mit der semantischen Suche auf Basis von Vertex AI und filterbasierten Suchoptionen nach bestimmten Ressourcen im API-Hub suchen.
Abbildung 1. Der API-Hub bietet leistungsstarke Such- und Filterfunktionen in natürlicher Sprache.
Search API-Hub mit der semantischen Suche
Mit der semantischen Suche können Sie die in Ihrem API-Hub registrierten API-Ressourcen ganz einfach finden und aufrufen. Mit der semantischen Suche können Sie alle verfügbaren API-Ressourcen in Ihrer Instanz mit einer Freitext-Suchanfrage durchsuchen. Sie können in allen Entitätstypen (APIs, API-Vorgänge, Spezifikationen usw.) suchen,
oder Sie den Entitätstyp angeben, den Sie abfragen möchten.
Dank der Vertex AI-Suchmaschine geht die semantische Suche über den Begriffsangleich hinaus. Die semantische Suche gibt Ergebnisse mit Begriffen zurück, die an einer beliebigen Stelle in den detaillierten API-Ressourceneinträgen enthalten sind, die semantisch den eingegebenen Freitextsuchanfragen ähneln.
Bei der Freitextsuche werden die folgenden Ergebniskategorien zurückgegeben:
APIs: Eine Liste der APIs, die der Suche entsprechen. Für jede API werden die folgenden Details bereitgestellt:
Der Name der API mit einem Link zur Detailseite der API.
Eine kurze Beschreibung der Ressource.
Der Name und die E-Mail-Adresse des Ressourceninhabers.
Versionen: Eine Liste der API-Versionen, die der Suche entsprechen. Pro Version werden die folgenden Details bereitgestellt:
Die Namen der mit der Version verknüpften APIs mit einem Link zur Detailseite der API.
Der Name der API-Version mit einem Link zur Seite mit den Versionsdetails.
Die Beschreibung der Version und die zugehörigen Metadaten.
Spezifikationen: Eine Liste der API-Spezifikationen, die der Suche entsprechen. Pro Spezifikation werden die folgenden Details bereitgestellt:
Die Namen der mit der Spezifikation verknüpften API mit einem Link zur Detailseite der API.
Der Name der API-Spezifikation mit einem Link zur Seite mit den Versionsdetails, die mit der Spezifikation verknüpft ist.
Die Beschreibung der Spezifikation.
Ein Link zum Spezifikationsdokument.
Der Typ der Spezifikation, z. B. OpenAPI-Spezifikation.
Vorgänge: Eine Liste der API-Vorgänge, die mit der Suche übereinstimmen. Pro Vorgang werden die folgenden Details bereitgestellt:
Die Namen der mit dem Vorgang verknüpften API mit einem Link zur API-Detailseite.
Der Name des Vorgangs mit einem Link zur Seite mit den Versionsdetails, die mit dem Vorgang verknüpft sind.
Die Beschreibung der Spezifikation.
Ein Link zum Spezifikationsdokument, in dem der Vorgang definiert ist.
Ein Link zur Version, die den Vorgang enthält.
Bereitstellungen: Eine Liste der Bereitstellungen, die der Suche entsprechen. Pro Bereitstellung werden die folgenden Details bereitgestellt:
Der Name der Bereitstellung.
Die Beschreibung der Bereitstellung.
Der Bereitstellungstyp. Beispiel: Apigee Hybrid.
Ein Link zur Version, die die Bereitstellung enthält.
So suchen Sie nach APIs, die einen bestimmten Begriff enthalten:
Rufen Sie in der Google Cloud Console die Seite Semantische Suche des API-Hubs auf.
Sie können z. B. „APIs für die Bestellverwaltung“ oder „Spezifikationsdatei für die Einstellungen des Mobilfunkanbieters“ eingeben.
Sie können Ihre Suche verfeinern, indem Sie Systemattribute im Suchanfrage-Prompt verwenden. Wenn Sie bei der Registrierung Ihrer APIs im API-Hub benutzerdefinierte Attribute erstellt haben, können Sie diese Attribute auch in Ihre Suchanfragen einbeziehen.
Die Suchergebnisse sind auf den folgenden Tabs kategorisiert: APIs, Versionen, Spezifikationen, Vorgänge und Bereitstellungen. Klicken Sie auf einen der Tabs, um Ergebnisse für eine Kategorie aufzurufen. Die Ergebnisse enthalten API-Ressourcen, die Begriffe enthalten, die semantisch der von Ihnen eingegebenen Suchanfrage ähneln.
Klicken Sie auf den API-Ressourcennamen, um die Detailseite für die Ressource aufzurufen.
Klicken Sie zum Löschen der aktuellen Abfrage auf Ergebnisse löschen.
Search API-Hub mit der API
Sie können Ihre API-Hub-Ressourcen auch mit der API Hub API durchsuchen. Mit der Methode searchResources können Sie Ihre API-Hub-Ressourcen mithilfe von Freitextabfragen und Filtern abfragen.
Mit dem folgenden API-Aufruf können Sie in Ihren API-Hub-Ressourcen suchen:
PROJECT_ID ist die ID des Hostprojekts für Ihre API-Hub-Instanz.
LOCATION ist der Standort, an dem Ihre API-Hub-Instanz gehostet wird.
QUERY ist die Freitextabfrage, die in der Suche verwendet werden soll. Die Abfrage kann Schlüsselwörter enthalten, die sich auf beliebige Details der API-Hub-Ressource beziehen, einschließlich Anzeigenamen, Beschreibungen oder anderer Metadaten.
RESOURCE_TYPE ist der optionale Filter, der für Ihre Suche angegeben wurde. Sie können einen der folgenden API-Hub-Ressourcentypen als Filter angeben:
Api
ApiOperation
Deployment
Definition
Spec
Version
Beispiel:
curl-XPOSThttps://apihub.googleapis.com/v1/projects/{project-id}/locations/{location}:searchResources \-H"Authorization: Bearer $(gcloud auth print-access-token)"-H"Content-Type: application/json"\
-d'{"query":"dog status in the store","filter":"resource_type = SPEC"}'
Dieser Aufruf gibt eine paginierte Liste von API-Hub-Ressourcen mit ressourcenspezifischen Metadaten zurück.
Sie können die Liste der auf der Seite APIs angezeigten APIs verfeinern, indem Sie Systemattribute als Suchparameter verwenden.
Passen Sie die Liste der API-Ressourcen mit einer der folgenden Optionen an:
Mit der filterbasierten Listensuche können Sie Ihre API-Liste auf der Grundlage einer Reihe vordefinierter Parameter und Systemattribute optimieren, die der Ressource zugeordnet sind. Mit der Option Match ALL oder Match ANY können Sie die gefilterte Ansicht anpassen.
So geben Sie Filteroptionen an:
Rufen Sie in der Google Cloud Console die Seite API-Hub APIs auf.
Klicken Sie in das Feld Tabelle filtern, um die Tabelle zu filtern. Der Filterbereich wird geöffnet.
Geben Sie Filteroptionen an oder wählen Sie sie aus. Wenn Sie den Bereich "Filter" eingeben, wird ein Menü mit Filteroptionen angezeigt, das eine Liste von Systemattributen enthält, die für den aktuellen Kontext relevant sind. Das sind beispielsweise Systemattribute, die angezeigt werden, wenn Sie die APIs auf der Seite APIs filtern:
API-Name: Der Anzeigename der API
Geschäftseinheit: Die für eine API zuständige Geschäftseinheit
Team: Das für eine API zuständige Produktionsteam
Dokumentation: Ein kurzer Link zur API-Dokumentation.
Systemattribute werden in der Filterliste in den Tabellen APIs, Versionen und Spezifikationen angezeigt.
Nachdem Sie eine Filteroption ausgewählt haben, wählen Sie einen Filterwert aus der Liste Werte aus. Alternativ können Sie einen Wert für das ausgewählte Filterattribut eingeben.
Wenn Sie einen weiteren Filter hinzufügen möchten, klicken Sie in das Feld Filtertabelle, um aus den verfügbaren Operatoren auszuwählen, und wählen Sie dann ein anderes Filterattribut und einen anderen Filterwert aus.
Die ausgewählten Filterattribute zeigen die bedingte Logik an, die von der Filterabfrage verwendet wird. Sie können OR als Operator auswählen. Wenn kein Operator ausgewählt ist, ist der Standardwert AND.
Wenn Sie einen einzelnen Filter löschen möchten, klicken Sie auf das X des Filters.
Klicken Sie im Bereich Filter auf Alle löschen, um alle Filter zu löschen.
Seitenumbruch
Wenn mehrere API-Ressourcen vorhanden sind, werden diese möglicherweise auf mehreren Seiten angezeigt.
So passen Sie die Listenanzeige an und wechseln zwischen Seiten:
Rufen Sie in der Google Cloud Console die Seite API-Hub APIs auf.
[[["Leicht verständlich","easyToUnderstand","thumb-up"],["Mein Problem wurde gelöst","solvedMyProblem","thumb-up"],["Sonstiges","otherUp","thumb-up"]],[["Schwer verständlich","hardToUnderstand","thumb-down"],["Informationen oder Beispielcode falsch","incorrectInformationOrSampleCode","thumb-down"],["Benötigte Informationen/Beispiele nicht gefunden","missingTheInformationSamplesINeed","thumb-down"],["Problem mit der Übersetzung","translationIssue","thumb-down"],["Sonstiges","otherDown","thumb-down"]],["Zuletzt aktualisiert: 2025-08-28 (UTC)."],[[["\u003cp\u003eThis page outlines how to use Semantic Search, powered by Vertex AI, and filter-based options to efficiently search for resources within Apigee and Apigee hybrid's API hub.\u003c/p\u003e\n"],["\u003cp\u003eSemantic Search enables free-text queries to find APIs, versions, specifications, operations, and deployments based on semantically similar terms found in the API resource entries.\u003c/p\u003e\n"],["\u003cp\u003eUsers can search using system or user attributes and refine search results by filtering and clicking on categories in the results, such as APIs, Versions, Specifications, Operations, and Deployments.\u003c/p\u003e\n"],["\u003cp\u003eYou can also use an API call to search resources, where you can specify a query and filter the results by resource type.\u003c/p\u003e\n"],["\u003cp\u003eFilter options allow you to narrow the displayed APIs based on attributes like API name, business unit, team, and documentation, with the ability to use \u003ccode\u003eMatch ALL\u003c/code\u003e or \u003ccode\u003eMatch ANY\u003c/code\u003e criteria.\u003c/p\u003e\n"]]],[],null,["# Search for and filter APIs\n\n*This page\napplies to **Apigee** and **Apigee hybrid**.*\n\nThis topic describes how to use Semantic Search powered by [Vertex AI](/vertex-ai/docs) and filter-based search options to search\nfor specific resources in API hub.\n**Figure 1.** API hub provides powerful natural language search and filter features.\n\nSearch API hub using Semantic Search\n------------------------------------\n\nYou can easily find and view API resources registered in your API hub using Semantic Search. Semantic Search allows\nyou to search all available API resources in your instance using a *free-text search query*. You can search across all entity types (APIs, API operations, specifications, and more.),\nor specify the entity type that you want to query.\n\nWith its Vertex AI search engine, Semantic Search can go beyond term \"matching.\" Semantic Search returns results\ncontaining terms found anywhere in the detailed API resource entries that are semantically similar to the free text search queries entered.\n\nFree-text search returns the following categories of results:\n\n- **APIs** : A list of APIs that match the search. For each API, the following details are provided:\n - The name of the API with a link to the API details page.\n - A brief description of the resource.\n - The name and email address of the resource owner.\n- **Versions** : A list of API versions that match the search. For each version, the following details are provided:\n - The names of the APIs associated with the version, with a link that takes you to the API details page.\n - The name of the API version, with a link that takes you to the version details page.\n - The description of the version and related metadata.\n- **Specifications** : A list of API specifications that match the search. For each specification, the following details are provided:\n - The names of the API associated with the specification, with a link that takes you to the API details page.\n - The name of the API specification, with a link that takes you to the version details page associated with the specification.\n - The description of the specification.\n - A link to the specification document.\n - The type of specification, such as OpenAPI spec.\n- **Operations** : A list of API operations that match the search. For each operation, the following details are provided:\n - The names of the API associated with the operation, with a link that takes you to the API details page.\n - The name of the operation, with a link that takes you to the version details page associated with the operation.\n - The description of the specification.\n - A link to the specification document that defines the operation.\n - A link to the version that includes the operation.\n- **Deployments** : A list of deployments that match the search. For each deployment, the following details are provided:\n - The name of the deployment.\n - The description of the deployment.\n - The deployment type. For example, Apigee hybrid.\n - A link to the version that includes the deployment.\n\n\u003cbr /\u003e\n\nTo search for APIs containing a specific term:\n\n1. In the Google Cloud console, go to the API hub **Semantic search** page.\n\n [Go to API hub](https://console.cloud.google.com//apigee/api-hub/search)\n2. Type a search query in the search box.\n\n For example, you could enter \"Order management APIs\" or \"Spec file for wireless carrier settings\".\n\n You can refine your search by using [system attributes](/apigee/docs/apihub/manage-attributes#system-attributes) within your search query prompt. If you created\n [user attributes](/apigee/docs/apihub/manage-attributes#user-attributes) when registering your APIs in API hub, you can also incorporate these attributes in your search query prompts.\n3. The **Search results** are categorized under the following tabs: APIs, Versions, Specifications, Operations, and Deployments. Click one of the tabs to see results for a category. The results display API resources that contain terms semantically similar to the search query you entered.\n4. Click the API resource name to view the detail page for the resource.\n5. To clear the current query, click **Clear results**.\n\nSearch API hub using the API\n----------------------------\n\nYou can also search your API hub resources using the API hub API. The `searchResources` method\nallows you to query your API hub resources using free text queries and filters.\n\nYou can use the following API call to search across your API hub resources: \n\n```carbon\ncurl -X POST https://apihub.googleapis.com/v1/projects/\u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e/locations/\u003cvar translate=\"no\"\u003eLOCATION\u003c/var\u003e:searchResources \\\n -H \"Authorization: Bearer $(gcloud auth print-access-token)\" -H \"Content-Type: application/json\" \\\n -d '{\n \"query\":\"\u003cvar translate=\"no\"\u003eQUERY\u003c/var\u003e\",\n \"filter\":\"resource_type = \u003cvar translate=\"no\"\u003eRESOURCE_TYPE\u003c/var\u003e\"\n }'\n```\n\nWhere:\n\n- **PROJECT_ID** is the ID of the host project for your API hub instance.\n- **LOCATION** is the location where your API hub instance is hosted.\n- **QUERY** is the free text query to be used in the search. The query can contain keywords related to any detail of the API hub resource, including display names, descriptions, or other metadata..\n- **RESOURCE_TYPE** is the optional filter specified for your search. You can specify one of the following API hub resource types as a filter:\n - `Api`\n - `ApiOperation`\n - `Deployment`\n - `Definition`\n - `Spec`\n - `Version`\n\n\u003cbr /\u003e\n\nFor example: \n\n```carbon\ncurl -X POST https://apihub.googleapis.com/v1/projects/{project-id}/locations/{location}:searchResources \\\n -H \"Authorization: Bearer $(gcloud auth print-access-token)\" -H \"Content-Type: application/json\" \\\n -d '{\n \"query\":\"dog status in the store\",\n \"filter\":\"resource_type = SPEC\"\n }'\n```\n\nThis call returns a paginated list of API hub resources, with resource-specific metadata.\n\nFor more information on free-text search with the API hub API, see the API reference documentation for\n[`Method:project.locations.searchResources`](/apigee/docs/reference/apis/apihub/rest/v1/projects.locations/searchResources).\n\nFilter-based search options\n---------------------------\n\n\u003cbr /\u003e\n\nYou can refine the list of APIs displayed on the **APIs** page by using system attributes as search parameters.\nCustomize\nthe list of API resources displayed using one of the following:\n\n- [Filter](#filter)\n- [Pagination](#pagination)\n\n### Filter\n\nUsing the filter-based list search, you can streamline your APIs list based on a number of predefined parameters and\nsystem attributes associated with the resource. You can use the `Match ALL` or `Match ANY` options\nto customize your filtered view.\n| **Note:** The filter options available are configured by a user with [administrator permissions](/apigee/docs/apihub/iam-roles). For more information, see [Manage API hub settings](/apigee/docs/apihub/settings-overview) and [Manage attributes](/apigee/docs/apihub/manage-attributes).\n\n\nTo specify filter options:\n\n1. In the Google Cloud console, go to the API hub **APIs** page.\n\n [Go to API hub APIs](https://console.cloud.google.com//apigee/api-hub/apis)\n2. Click in the **Filter table** field to filter the table. The **Filter** pane opens. **Tip:**You can show or hide columns in the APIs table. Use the action menu in the Filter row to select and unselect row names.\n3. Specify or select filter options. When you type in the Filter pane, a menu with filter options pops up that includes a list of [system attributes](/apigee/docs/apihub/manage-attributes#system-attributes) that are relevant to the current context. For example, these are system attributes that you may see when filtering the APIs in the **APIs** page:\n - **API name**: The display name of the API\n - **Business unit:** The business unit responsible for an API\n - **Team:** The producing team responsible for an API\n - **Documentation**: A short link to the API documentation.\n | **Note:** There may be additional attributes listed as filter options. For more information, see [Manage API attributes](/apigee/docs/apihub/manage-attributes).\n - You'll see system attributes in the filter list in the **APIs** , **Versions** , and **Specifications** tables.\n4. After selecting a filter option, select a filter value from the **Values** list. Alternatively, you can enter a value for the filter attribute you select.\n5. To add an additional filter, click in the **Filter table** field to select from the available **Operators** and then select another filter attribute and value.\n6. The selected filter properties display the conditional\n logic that the filter query is using. You can select `OR` as an operator. If no\n operator is selected, the default is `AND`.\n\n7. To clear an individual filter, click the **X** on the filter. To clear all filters, click **Clear all** in the **Filter** pane.\n\n### Pagination\n\nWhen there are multiple API resources, they may be displayed across multiple pages.\n\nTo customize the list display and navigate between pages:\n\n1. In the Google Cloud console, go to the API hub **APIs** page.\n\n [Go to API hub APIs](https://console.cloud.google.com//apigee/api-hub/apis)\n\n The **APIs** list page is displayed by default.\n2. From the **APIs** list, locate the pagination tools\n as shown in Figure 2:\n\n **Figure 2.** Move back and forth through paginated results.\n3. Select the number of APIs to display per page.\n4. Click **\\\u003e Forward**to go to the next page.\n5. Click**\\\u003c Back**to go to the previous page.\n\nWhat's next?\n------------\n\n- Learn how to [Manage deployments](/apigee/docs/apihub/manage-api-deployments)."]]