Die Produktsuche befindet sich im Wartungsmodus. Für eine bessere Skalierbarkeit und dieselben Funktionen wie bei der Produktsuche können Sie das Vision Warehouse verwenden.
Mit Sammlungen den Überblick behalten
Sie können Inhalte basierend auf Ihren Einstellungen speichern und kategorisieren.
Mehrere durch Ihre Anfragen gestartete Vorgänge sind lang andauernde Vorgänge wie das Erstellen von Produktgruppen über den Bulk-Import, das Löschen einer Produktgruppe und das Löschen verwaister Produkte. Bei diesen Anfragetypen wird eine JSON-Datei mit einer Vorgangs-ID zurückgegeben, mit der Sie den Status des Vorgangs abrufen können.
Beispiel: Eine Anfrage zum Löschen eines Batches (purge) gibt die folgende JSON-Datei zurück:
[[["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: 2024-12-06 (UTC)."],[],[],null,["# Getting an operation's status\n\nSeveral operations you request are long-running, such as product set creation via bulk\nimport, purging a product set, and purging orphaned products. These types of requests will\nreturn a JSON with an operation ID that you can use to get the status of the\noperation.\n\nFor example, a batch delete (`purge`) request returns the following JSON: \n\n```\n{\n\"name\": \"projects/project-id/locations/location-id/operations/bc4e1d412863e626\"\n}\n```\n\nIn this case, the operation ID is `bc4e1d412863e626`. The following samples\nshow how to get the status of this operation with this ID. \n\n### REST\n\n\nBefore using any of the request data,\nmake the following replacements:\n\n- \u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e: Your Google Cloud project ID.\n- \u003cvar translate=\"no\"\u003eLOCATION_ID\u003c/var\u003e: A valid location identifier. Valid location identifiers are: `us-west1`, `us-east1`, `europe-west1`, and `asia-east1`.\n- \u003cvar translate=\"no\"\u003eOPERATION_ID\u003c/var\u003e: The ID of your operation. The ID is the last element of the name of your operation. For example:\n - operation name: `projects/`\u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e`/locations/`\u003cvar translate=\"no\"\u003eLOCATION_ID\u003c/var\u003e`/operations/`**bc4e1d412863e626**\n - operation id: **bc4e1d412863e626**\n\n\nHTTP method and URL:\n\n```\nGET https://vision.googleapis.com/v1/locations/location-id/operations/operation-id\n```\n\nTo send your request, choose one of these options: \n\n#### curl\n\n| **Note:** The following command assumes that you have logged in to the `gcloud` CLI with your user account by running [`gcloud init`](/sdk/gcloud/reference/init) or [`gcloud auth login`](/sdk/gcloud/reference/auth/login) , or by using [Cloud Shell](/shell/docs), which automatically logs you into the `gcloud` CLI . You can check the currently active account by running [`gcloud auth list`](/sdk/gcloud/reference/auth/list).\n\n\nExecute the following command:\n\n```\ncurl -X GET \\\n -H \"Authorization: Bearer $(gcloud auth print-access-token)\" \\\n -H \"x-goog-user-project: project-id\" \\\n \"https://vision.googleapis.com/v1/locations/location-id/operations/operation-id\"\n```\n\n#### PowerShell\n\n| **Note:** The following command assumes that you have logged in to the `gcloud` CLI with your user account by running [`gcloud init`](/sdk/gcloud/reference/init) or [`gcloud auth login`](/sdk/gcloud/reference/auth/login) . You can check the currently active account by running [`gcloud auth list`](/sdk/gcloud/reference/auth/list).\n\n\nExecute the following command:\n\n```\n$cred = gcloud auth print-access-token\n$headers = @{ \"Authorization\" = \"Bearer $cred\"; \"x-goog-user-project\" = \"project-id\" }\n\nInvoke-WebRequest `\n -Method GET `\n -Headers $headers `\n -Uri \"https://vision.googleapis.com/v1/locations/location-id/operations/operation-id\" | Select-Object -Expand Content\n```\nYou should see output similar to the following for a completed **product set purge operation** : \n\n```\n{\n \"name\": \"locations/location-id/operations/operation-id\",\n \"metadata\": {\n \"@type\": \"type.googleapis.com/google.cloud.vision.v1.BatchOperationMetadata\",\n \"state\": \"SUCCESSFUL\",\n \"submitTime\": \"2019-09-04T15:58:39.131591882Z\",\n \"endTime\": \"2019-09-04T15:58:43.099020580Z\"\n },\n \"done\": true,\n \"response\": {\n \"@type\": \"type.googleapis.com/google.cloud.vision.v1.PurgeProductsRequest\",\n \"parent\": \"projects/project-id/locations/location-id\",\n \"productSetPurgeConfig\": {\n \"productSetId\": \"\u003cvar translate=\"no\"\u003eproject-set-id\u003c/var\u003e\"\n },\n \"force\": true\n }\n}\n```\n\nYou should see output similar to the following for a completed **purge orphaned products\noperation**:\n\n```\n{\n \"name\": \"locations/location-id/operations/operation-id\",\n \"metadata\": {\n \"@type\": \"type.googleapis.com/google.cloud.vision.v1.BatchOperationMetadata\",\n \"state\": \"SUCCESSFUL\",\n \"submitTime\": \"2019-09-04T16:08:38.278197397Z\",\n \"endTime\": \"2019-09-04T16:08:45.075778639Z\"\n },\n \"done\": true,\n \"response\": {\n \"@type\": \"type.googleapis.com/google.cloud.vision.v1.PurgeProductsRequest\",\n \"parent\": \"projects/project-id/locations/location-id\",\n \"deleteOrphanProducts\": true,\n \"force\": true\n }\n}\n```"]]