Organízate con las colecciones
Guarda y clasifica el contenido según tus preferencias.
Operaciones de larga duración
La API Submission es asíncrona y devuelve una operación de larga duración. Es posible que la operación no se complete cuando el método devuelva una respuesta.
Obtener el estado de una operación
A continuación, se muestra cómo sondear el estado de una operación.
Llama al método GET para el tipo Operations.
Antes de usar los datos de la solicitud, haz las siguientes sustituciones:
project-number: tu número de proyecto de Google Cloud
operation-id: el ID de la operación
Método HTTP y URL:
GET https://webrisk.googleapis.com/v1/projects/project-number/operations/operation-id
Para enviar tu solicitud, elige una de estas opciones:
Cuando se completa la operación, se devuelve uno de los siguientes valores para state:
SUCCEEDED: indica que la URL enviada se ha añadido a la lista de bloqueo de Navegación segura.
CLOSED: indica que no se ha detectado que la URL enviada infrinja las políticas de Navegación segura y que no se ha añadido a la lista de bloqueados de Navegación segura en las últimas 24 horas.
[[["Es fácil de entender","easyToUnderstand","thumb-up"],["Me ofreció una solución al problema","solvedMyProblem","thumb-up"],["Otro","otherUp","thumb-up"]],[["Es difícil de entender","hardToUnderstand","thumb-down"],["La información o el código de muestra no son correctos","incorrectInformationOrSampleCode","thumb-down"],["Me faltan las muestras o la información que necesito","missingTheInformationSamplesINeed","thumb-down"],["Problema de traducción","translationIssue","thumb-down"],["Otro","otherDown","thumb-down"]],["Última actualización: 2025-08-19 (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."]]