Lấy trạng thái mới nhất của một thao tác chạy trong thời gian dài. Ứng dụng có thể sử dụng phương thức này để thăm dò kết quả thao tác theo các khoảng thời gian mà dịch vụ API đề xuất.
Yêu cầu HTTP
GET https://cloudaicompanion.googleapis.com/v1/{name=projects/*/locations/*/operations/*}
[[["Dễ hiểu","easyToUnderstand","thumb-up"],["Giúp tôi giải quyết được vấn đề","solvedMyProblem","thumb-up"],["Khác","otherUp","thumb-up"]],[["Khó hiểu","hardToUnderstand","thumb-down"],["Thông tin hoặc mã mẫu không chính xác","incorrectInformationOrSampleCode","thumb-down"],["Thiếu thông tin/mẫu tôi cần","missingTheInformationSamplesINeed","thumb-down"],["Vấn đề về bản dịch","translationIssue","thumb-down"],["Khác","otherDown","thumb-down"]],["Cập nhật lần gần đây nhất: 2025-06-09 UTC."],[[["\u003cp\u003eThis endpoint retrieves the latest status of a long-running operation using a GET request.\u003c/p\u003e\n"],["\u003cp\u003eThe operation is identified by its \u003ccode\u003ename\u003c/code\u003e path parameter in the URL.\u003c/p\u003e\n"],["\u003cp\u003eThe request body must be empty to use this endpoint.\u003c/p\u003e\n"],["\u003cp\u003eA successful request returns an Operation resource in the response body.\u003c/p\u003e\n"],["\u003cp\u003eAuthorization for this endpoint requires the \u003ccode\u003ehttps://www.googleapis.com/auth/cloud-platform\u003c/code\u003e OAuth scope and the \u003ccode\u003ecloudaicompanion.operations.get\u003c/code\u003e IAM permission.\u003c/p\u003e\n"]]],[],null,["# Method: projects.locations.operations.get\n\n- [HTTP request](#body.HTTP_TEMPLATE)\n- [Path parameters](#body.PATH_PARAMETERS)\n- [Request body](#body.request_body)\n- [Response body](#body.response_body)\n- [Authorization scopes](#body.aspect)\n- [IAM Permissions](#body.aspect_1)\n\nGets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.\n\n### HTTP request\n\n`GET https://cloudaicompanion.googleapis.com/v1/{name=projects/*/locations/*/operations/*}`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Path parameters\n\n### Request body\n\nThe request body must be empty.\n\n### Response body\n\nIf successful, the response body contains an instance of [Operation](/gemini/docs/api/reference/rest/v1/projects.locations.operations#Operation).\n\n### Authorization scopes\n\nRequires the following OAuth scope:\n\n- `https://www.googleapis.com/auth/cloud-platform`\n\nFor more information, see the [Authentication Overview](/docs/authentication#authorization-gcp).\n\n### IAM Permissions\n\nRequires the following [IAM](https://cloud.google.com/iam/docs) permission on the `name` resource:\n\n- `cloudaicompanion.operations.get`\n\nFor more information, see the [IAM documentation](https://cloud.google.com/iam/docs)."]]