透過集合功能整理內容
你可以依據偏好儲存及分類內容。
使用 Submission API
使用 Submission API
本頁面說明如何使用 Submission API,將您懷疑不安全的網址提交給安全瀏覽進行分析。如果網址確實違反安全瀏覽政策,系統會將其加入安全瀏覽服務。
事前準備
如要使用這項功能,請與銷售團隊或客戶工程師聯絡。
提交網址
如要提交網址,請對 projects.submissions.create
方法發出 HTTP POST
要求。
API 要求
使用任何要求資料之前,請先替換以下項目:
PROJECT_ID:您的 Google Cloud 專案 ID
HTTP 方法和網址:
POST https://webrisk.googleapis.com/v1/projects/PROJECT-ID/submissions
JSON 要求主體:
{
"uri": "https://www.phishingsite.com/",
}
如要傳送要求,請選擇以下其中一個選項:
curl
將要求主體儲存在名為 request.json
的檔案中,然後執行下列指令:
curl -X POST \
-H "Authorization: Bearer $(gcloud auth print-access-token)" \
-H "Content-Type: application/json; charset=utf-8" \
-d @request.json \
"https://webrisk.googleapis.com/v1/projects/PROJECT-ID/submissions"
PowerShell
將要求主體儲存在名為 request.json
的檔案中,然後執行下列指令:
$cred = gcloud auth print-access-token
$headers = @{ "Authorization" = "Bearer $cred" }
Invoke-WebRequest `
-Method POST `
-Headers $headers `
-ContentType: "application/json; charset=utf-8" `
-InFile request.json `
-Uri "https://webrisk.googleapis.com/v1/projects/PROJECT-ID/submissions" | Select-Object -Expand Content
您應該會收到如下的 JSON 回應:
{
"uri": "https://www.phishingsite.com/",
}
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2025-09-04 (世界標準時間)。
[[["容易理解","easyToUnderstand","thumb-up"],["確實解決了我的問題","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["難以理解","hardToUnderstand","thumb-down"],["資訊或程式碼範例有誤","incorrectInformationOrSampleCode","thumb-down"],["缺少我需要的資訊/範例","missingTheInformationSamplesINeed","thumb-down"],["翻譯問題","translationIssue","thumb-down"],["其他","otherDown","thumb-down"]],["上次更新時間:2025-09-04 (世界標準時間)。"],[],[],null,["Using the Submission API\n\nUsing the Submission API\n========================\n\n|\n| **Preview**\n|\n|\n| This feature is subject to the \"Pre-GA Offerings Terms\" in the General Service Terms section\n| of the [Service Specific Terms](/terms/service-terms#1).\n|\n| Pre-GA features are available \"as is\" and might have limited support.\n|\n| For more information, see the\n| [launch stage descriptions](/products#product-launch-stages).\n\nThis page explains how to use the Submission API to submit URLs that you suspect\nare unsafe to Safe Browsing for analysis. Any URLs that are confirmed to match\nthe [Safe Browsing policies](https://safebrowsing.google.com/#policies) are\nadded to the Safe Browsing service.\n\nBefore you begin\n----------------\n\n[Contact our sales team](https://go.chronicle.security/webriskapi) or your customer\nengineer to obtain access to this feature.\n\nSubmitting URLs\n---------------\n\nTo submit a URL, send an HTTP `POST` request to\nthe [`projects.submissions.create`](/web-risk/docs/reference/rest/v1/projects.submissions/create)\nmethod.\n\n### API request\n\n\nBefore using any of the request data,\nmake the following replacements:\n\u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e: your Google Cloud project ID\n\n\nHTTP method and URL:\n\n```\nPOST https://webrisk.googleapis.com/v1/projects/PROJECT-ID/submissions\n```\n\n\nRequest JSON body:\n\n```\n{\n \"uri\": \"https://www.phishingsite.com/\",\n}\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\nSave the request body in a file named `request.json`,\nand execute the following command:\n\n```\ncurl -X POST \\\n -H \"Authorization: Bearer $(gcloud auth print-access-token)\" \\\n -H \"Content-Type: application/json; charset=utf-8\" \\\n -d @request.json \\\n \"https://webrisk.googleapis.com/v1/projects/PROJECT-ID/submissions\"\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\nSave the request body in a file named `request.json`,\nand execute the following command:\n\n```\n$cred = gcloud auth print-access-token\n$headers = @{ \"Authorization\" = \"Bearer $cred\" }\n\nInvoke-WebRequest `\n -Method POST `\n -Headers $headers `\n -ContentType: \"application/json; charset=utf-8\" `\n -InFile request.json `\n -Uri \"https://webrisk.googleapis.com/v1/projects/PROJECT-ID/submissions\" | Select-Object -Expand Content\n```\n\nYou should receive a JSON response similar to the following:\n\n```\n{\n \"uri\": \"https://www.phishingsite.com/\",\n}\n```"]]