Method: users.update
संग्रह की मदद से व्यवस्थित रहें
अपनी प्राथमिकताओं के आधार पर, कॉन्टेंट को सेव करें और कैटगरी में बांटें.
किसी उपयोगकर्ता की जानकारी अपडेट करता है.
यह तरीका पैच सेमेंटेक्स के साथ काम करता है. इसका मतलब है कि आपको सिर्फ़ उन फ़ील्ड को शामिल करना होगा जिन्हें अपडेट करना है. अनुरोध में मौजूद नहीं होने वाले फ़ील्ड को बरकरार रखा जाएगा. साथ ही, null
पर सेट किए गए फ़ील्ड हटा दिए जाएंगे.
दोहराए जाने वाले फ़ील्ड में मौजूद कलेक्शन के लिए, कलेक्शन के अलग-अलग आइटम को अलग-अलग पैच नहीं किया जा सकता. इन्हें अनुरोध के मुख्य हिस्से में, सभी आइटम के लिए सही वैल्यू के साथ दिया जाना चाहिए. ज़्यादा जानकारी के लिए, उपयोगकर्ता खातों की गाइड देखें.
एचटीटीपी अनुरोध
PUT https://admin.googleapis.com/admin/directory/v1/users/{userKey}
यूआरएल में gRPC ट्रांसकोडिंग सिंटैक्स का इस्तेमाल किया गया है.
पाथ पैरामीटर
पैरामीटर |
userKey |
string
एपीआई अनुरोध में उपयोगकर्ता की पहचान करता है. वैल्यू, उपयोगकर्ता का मुख्य ईमेल पता, उपनाम वाला ईमेल पता या यूनीक उपयोगकर्ता आईडी हो सकता है.
|
अनुरोध का मुख्य भाग
अनुरोध के मुख्य भाग में User
का उदाहरण है.
जवाब का मुख्य भाग
कामयाब रहने पर, जवाब के मुख्य हिस्से में User
का एक इंस्टेंस शामिल किया जाता है.
अनुमति के दायरे
नीचे दिए गए OAuth के लिंक की ज़रूरत हाेती है:
https://www.googleapis.com/auth/admin.directory.user
ज़्यादा जानकारी के लिए, अनुमति से जुड़ी गाइड देखें.
जब तक कुछ अलग से न बताया जाए, तब तक इस पेज की सामग्री को Creative Commons Attribution 4.0 License के तहत और कोड के नमूनों को Apache 2.0 License के तहत लाइसेंस मिला है. ज़्यादा जानकारी के लिए, Google Developers साइट नीतियां देखें. Oracle और/या इससे जुड़ी हुई कंपनियों का, Java एक रजिस्टर किया हुआ ट्रेडमार्क है.
आखिरी बार 2025-07-25 (UTC) को अपडेट किया गया.
[null,null,["आखिरी बार 2025-07-25 (UTC) को अपडेट किया गया."],[],[],null,["# Method: users.update\n\nUpdates a user.\n\nThis method supports patch semantics, meaning that you only need to include the fields you wish to update. Fields that are not present in the request will be preserved, and fields set to `null` will be cleared.\n\nFor repeating fields that contain arrays, individual items in the array can't be patched piecemeal; they must be supplied in the request body with the desired values for all items. See the [user accounts guide](https://developers.google.com/workspace/admin/directory/v1/guides/manage-users#update_user) for more information.\n\n### HTTP request\n\n`PUT https://admin.googleapis.com/admin/directory/v1/users/{userKey}`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Path parameters\n\n| Parameters ||\n|-----------|---------------------------------------------------------------------------------------------------------------------------------------------|\n| `userKey` | `string` Identifies the user in the API request. The value can be the user's primary email address, alias email address, or unique user ID. |\n\n### Request body\n\nThe request body contains an instance of [User](/workspace/admin/directory/reference/rest/v1/users#User).\n\n### Response body\n\nIf successful, the response body contains an instance of [User](/workspace/admin/directory/reference/rest/v1/users#User).\n\n### Authorization scopes\n\nRequires the following OAuth scope:\n\n- `https://www.googleapis.com/auth/admin.directory.user`\n\nFor more information, see the [Authorization guide](/workspace/guides/configure-oauth-consent)."]]