Method: files.modifyLabels
সেভ করা পৃষ্ঠা গুছিয়ে রাখতে 'সংগ্রহ' ব্যবহার করুন
আপনার পছন্দ অনুযায়ী কন্টেন্ট সেভ করুন ও সঠিক বিভাগে রাখুন।
HTTP অনুরোধ
POST https://www.googleapis.com/drive/v3/files/{fileId}/modifyLabels
URL gRPC ট্রান্সকোডিং সিনট্যাক্স ব্যবহার করে।
পাথ প্যারামিটার
পরামিতি |
---|
fileId | string লেবেলগুলি যে ফাইলের সাথে সম্পর্কিত তার আইডি৷ |
শরীরের অনুরোধ
অনুরোধের মূল অংশে ModifyLabelsRequest
এর একটি উদাহরণ রয়েছে।
প্রতিক্রিয়া শরীর
একটি files.modifyLabels
অনুরোধের প্রতিক্রিয়া। এতে শুধুমাত্র সেই লেবেলগুলি রয়েছে যা অনুরোধের দ্বারা যুক্ত বা আপডেট করা হয়েছে৷
সফল হলে, প্রতিক্রিয়া বডিতে নিম্নলিখিত কাঠামোর সাথে ডেটা থাকে:
JSON প্রতিনিধিত্ব |
---|
{
"modifiedLabels": [
{
object (Label )
}
],
"kind": string
} |
ক্ষেত্র |
---|
modifiedLabels[] | object ( Label ) অনুরোধের মাধ্যমে যোগ করা বা আপডেট করা লেবেলের তালিকা। |
kind | string এটি সর্বদা "drive#modifyLabelsResponse" । |
অনুমোদনের সুযোগ
নিম্নলিখিত OAuth সুযোগগুলির মধ্যে একটি প্রয়োজন:
-
https://www.googleapis.com/auth/drive
-
https://www.googleapis.com/auth/drive.file
-
https://www.googleapis.com/auth/drive.metadata
কিছু সুযোগ সীমাবদ্ধ এবং সেগুলি ব্যবহার করার জন্য আপনার অ্যাপের নিরাপত্তা মূল্যায়ন প্রয়োজন। আরও তথ্যের জন্য, অনুমোদন নির্দেশিকা দেখুন।
লেবেল রিকোয়েস্ট পরিবর্তন করুন
একটি ফাইলের লেবেল সেট পরিবর্তন করার জন্য একটি অনুরোধ. এই অনুরোধে অনেক পরিবর্তন থাকতে পারে যা হয় সব সফল হবে বা সব পারমাণবিকভাবে ব্যর্থ হবে।
JSON প্রতিনিধিত্ব |
---|
{
"labelModifications": [
{
object (LabelModification )
}
],
"kind": string
} |
ক্ষেত্র |
---|
labelModifications[] | object ( LabelModification ) ফাইলের লেবেলে প্রয়োগ করার জন্য পরিবর্তনের তালিকা। |
kind | string এটি সর্বদা "drive#modifyLabelsRequest" । |
লেবেল পরিবর্তন
একটি ফাইলের একটি লেবেলে একটি পরিবর্তন৷ একটি LabelModification
একটি ফাইলে একটি লেবেল প্রয়োগ করতে, একটি ফাইলে একটি বিদ্যমান লেবেল আপডেট করতে বা একটি ফাইল থেকে একটি লেবেল সরাতে ব্যবহার করা যেতে পারে।
JSON প্রতিনিধিত্ব |
---|
{
"fieldModifications": [
{
object (FieldModification )
}
],
"labelId": string,
"removeLabel": boolean,
"kind": string
} |
ক্ষেত্র |
---|
fieldModifications[] | object ( FieldModification ) এই লেবেলের ক্ষেত্রের পরিবর্তনের তালিকা। |
labelId | string লেবেলের আইডি পরিবর্তন করতে হবে। |
removeLabel | boolean সত্য হলে, লেবেলটি ফাইল থেকে সরানো হবে। |
kind | string এটি সর্বদা "drive#labelModification" । |
ক্ষেত্র পরিবর্তন
একটি লেবেলের ক্ষেত্রের একটি পরিবর্তন৷
JSON প্রতিনিধিত্ব |
---|
{
"setDateValues": [
string
],
"setTextValues": [
string
],
"setSelectionValues": [
string
],
"setIntegerValues": [
string
],
"setUserValues": [
string
],
"fieldId": string,
"kind": string,
"unsetValues": boolean
} |
ক্ষেত্র |
---|
setDateValues[] | string এই নতুন মানগুলির সাথে একটি date ক্ষেত্রের মান প্রতিস্থাপন করে। স্ট্রিংটি অবশ্যই RFC 3339 পূর্ণ-তারিখ বিন্যাসে হতে হবে: YYYY-MM-DD৷ |
setTextValues[] | string একটি text ক্ষেত্রের মান সেট করে। |
setSelectionValues[] | string এই নতুন মানগুলির সাথে একটি selection ক্ষেত্র প্রতিস্থাপন করে। |
setIntegerValues[] | string ( int64 format) এই নতুন মানগুলির সাথে একটি integer ক্ষেত্রের মান প্রতিস্থাপন করে। |
setUserValues[] | string এই নতুন মানগুলির সাথে একটি user ক্ষেত্র প্রতিস্থাপন করে। মান একটি বৈধ ইমেল ঠিকানা হতে হবে. |
fieldId | string ফিল্ডের আইডি পরিবর্তন করতে হবে। |
kind | string এটি সর্বদা "drive#labelFieldModification" । |
unsetValues | boolean এই ক্ষেত্রের মান আনসেট করে। |
অন্য কিছু উল্লেখ না করা থাকলে, এই পৃষ্ঠার কন্টেন্ট Creative Commons Attribution 4.0 License-এর অধীনে এবং কোডের নমুনাগুলি Apache 2.0 License-এর অধীনে লাইসেন্স প্রাপ্ত। আরও জানতে, Google Developers সাইট নীতি দেখুন। Java হল Oracle এবং/অথবা তার অ্যাফিলিয়েট সংস্থার রেজিস্টার্ড ট্রেডমার্ক।
2025-08-26 UTC-তে শেষবার আপডেট করা হয়েছে।
[null,null,["2025-08-26 UTC-তে শেষবার আপডেট করা হয়েছে।"],[],[],null,["# Method: files.modifyLabels\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 - [JSON representation](#body.ModifyLabelsResponse.SCHEMA_REPRESENTATION)\n- [Authorization scopes](#body.aspect)\n- [ModifyLabelsRequest](#ModifyLabelsRequest)\n - [JSON representation](#ModifyLabelsRequest.SCHEMA_REPRESENTATION)\n- [LabelModification](#LabelModification)\n - [JSON representation](#LabelModification.SCHEMA_REPRESENTATION)\n- [FieldModification](#FieldModification)\n - [JSON representation](#FieldModification.SCHEMA_REPRESENTATION)\n- [Try it!](#try-it)\n\nModifies the set of labels applied to a file. Returns a list of the labels that were added or modified.\n\n### HTTP request\n\n`POST https://www.googleapis.com/drive/v3/files/{fileId}/modifyLabels`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Path parameters\n\n| Parameters ||\n|----------|---------------------------------------------------------|\n| `fileId` | `string` The ID of the file to which the labels belong. |\n\n### Request body\n\nThe request body contains an instance of [ModifyLabelsRequest](/workspace/drive/api/reference/rest/v3/files/modifyLabels#ModifyLabelsRequest).\n\n### Response body\n\nResponse to a files.modifyLabels request. This contains only those labels which were added or updated by the request.\n\nIf successful, the response body contains data with the following structure:\n\n| JSON representation |\n|-------------------------------------------------------------------------------------------------------------|\n| ``` { \"modifiedLabels\": [ { object (/workspace/drive/api/reference/rest/v3/Label) } ], \"kind\": string } ``` |\n\n| Fields ||\n|--------------------|-----------------------------------------------------------------------------------------------------------------------------------|\n| `modifiedLabels[]` | `object (`[Label](/workspace/drive/api/reference/rest/v3/Label)`)` The list of labels which were added or updated by the request. |\n| `kind` | `string` This is always drive#modifyLabelsResponse |\n\n### Authorization scopes\n\nRequires one of the following OAuth scopes:\n\n- `https://www.googleapis.com/auth/drive`\n- `\n https://www.googleapis.com/auth/drive.file`\n- `\n https://www.googleapis.com/auth/drive.metadata`\n\nSome scopes are restricted and require a security assessment for your app to use them. For more information, see the [Authorization guide](/workspace/guides/configure-oauth-consent).\n\nModifyLabelsRequest\n-------------------\n\nA request to modify the set of labels on a file. This request may contain many modifications that will either all succeed or all fail atomically.\n\n| JSON representation |\n|------------------------------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"labelModifications\": [ { object (/workspace/drive/api/reference/rest/v3/files/modifyLabels#LabelModification) } ], \"kind\": string } ``` |\n\n| Fields ||\n|------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `labelModifications[]` | `object (`[LabelModification](/workspace/drive/api/reference/rest/v3/files/modifyLabels#LabelModification)`)` The list of modifications to apply to the labels on the file. |\n| `kind` | `string` This is always drive#modifyLabelsRequest. |\n\nLabelModification\n-----------------\n\nA modification to a label on a file. A LabelModification can be used to apply a label to a file, update an existing label on a file, or remove a label from a file.\n\n| JSON representation |\n|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"fieldModifications\": [ { object (/workspace/drive/api/reference/rest/v3/files/modifyLabels#FieldModification) } ], \"labelId\": string, \"removeLabel\": boolean, \"kind\": string } ``` |\n\n| Fields ||\n|------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `fieldModifications[]` | `object (`[FieldModification](/workspace/drive/api/reference/rest/v3/files/modifyLabels#FieldModification)`)` The list of modifications to this label's fields. |\n| `labelId` | `string` The ID of the label to modify. |\n| `removeLabel` | `boolean` If true, the label will be removed from the file. |\n| `kind` | `string` This is always drive#labelModification. |\n\nFieldModification\n-----------------\n\nA modification to a label's field.\n\n| JSON representation |\n|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"setDateValues\": [ string ], \"setTextValues\": [ string ], \"setSelectionValues\": [ string ], \"setIntegerValues\": [ string ], \"setUserValues\": [ string ], \"fieldId\": string, \"kind\": string, \"unsetValues\": boolean } ``` |\n\n| Fields ||\n|------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------|\n| `setDateValues[]` | `string` Replaces the value of a `date` field with these new values. The string must be in the RFC 3339 full-date format: YYYY-MM-DD. |\n| `setTextValues[]` | `string` Sets the value of a `text` field. |\n| `setSelectionValues[]` | `string` Replaces a `selection` field with these new values. |\n| `setIntegerValues[]` | `string (`[int64](https://developers.google.com/discovery/v1/type-format)` format)` Replaces the value of an `integer` field with these new values. |\n| `setUserValues[]` | `string` Replaces a `user` field with these new values. The values must be valid email addresses. |\n| `fieldId` | `string` The ID of the field to be modified. |\n| `kind` | `string` This is always drive#labelFieldModification. |\n| `unsetValues` | `boolean` Unsets the values for this field. |"]]