Mit Sammlungen den Überblick behalten
Sie können Inhalte basierend auf Ihren Einstellungen speichern und kategorisieren.
Vorgänge mit langer Ausführungszeit
Die Submission API ist asynchron und gibt einen Vorgang mit langer Ausführungszeit zurück. Der Vorgang ist möglicherweise noch nicht abgeschlossen, wenn die Methode eine Antwort zurückgibt.
Vorgangsstatus abrufen
Das folgende Beispiel zeigt, wie Sie den Status eines Vorgangs abrufen.
Rufen Sie die Methode GET für den Typ Vorgänge auf.
Ersetzen Sie diese Werte in den folgenden Anfragedaten:
project-number: Ihre Google Cloud-Projektnummer.
operation-id: Ihre Vorgangs-ID
HTTP-Methode und URL:
GET https://webrisk.googleapis.com/v1/projects/project-number/operations/operation-id
Senden Sie die Anfrage mithilfe einer der folgenden Optionen:
Wenn der Vorgang abgeschlossen ist, wird für state einer der folgenden Werte zurückgegeben:
SUCCEEDED: gibt an, dass die eingereichte URL der Safe Browsing-Blockliste hinzugefügt wurde.
CLOSED: gibt an, dass die eingereichte URL nicht gegen die Safe Browsing-Richtlinien verstößt und in den letzten 24 Stunden nicht der Safe Browsing-Sperrliste hinzugefügt wurde.
[[["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-09-03 (UTC)."],[],[],null,["# Long-running Operations\n=======================\n\nThe Submission API is asynchronous and returns a long-running operation. The\noperation may not be completed when the method returns a response.\n\nGet an operation status\n-----------------------\n\nThe following shows how to poll an operation's status.\n\nCall the `GET` method for the Operations type.\n\n\nBefore using any of the request data,\nmake the following replacements:\n\n- \u003cvar translate=\"no\"\u003eproject-number\u003c/var\u003e: your Google Cloud project number\n- \u003cvar translate=\"no\"\u003eoperation-id\u003c/var\u003e: your operation ID\n\n\nHTTP method and URL:\n\n```\nGET https://webrisk.googleapis.com/v1/projects/project-number/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 \"https://webrisk.googleapis.com/v1/projects/project-number/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\" }\n\nInvoke-WebRequest `\n -Method GET `\n -Headers $headers `\n -Uri \"https://webrisk.googleapis.com/v1/projects/project-number/operations/operation-id\" | Select-Object -Expand Content\n```\n\nYou should receive a JSON response similar to the following:\n\n```\n{\n \"name\": \"projects/project-number/operations/operation-id\",\n \"metadata\": {\n \"@type\": \"type.googleapis.com/google.cloud.webrisk.v1.SubmitUriMetadata\",\n \"state\": \"RUNNING\"\n }\n \"done\": false,\n ...\n}\n```\n\nWhen the operation is completed, one of the following values is returned for\n`state`:\n\n- `SUCCEEDED`: indicates that the submitted URL was added to the Safe Browsing\n Blocklist.\n\n- `CLOSED`: indicates that the submitted URL was not detected to violate the\n Safe Browsing Policies and was not added to the Safe Browsing Blocklist in the last 24 hours."]]