REST Resource: properties
- 资源:属性
<ph type="x-smartling-placeholder">
- 方法
资源:属性
附加到应用的公开或私有文件的键值对。
以下限制适用于文件属性:
- 每个文件总共最多 100 个属性
- 每个应用最多 30 项专用属性
- 最多 30 个公共属性
- 单个属性的(键 + 值)字符串(采用 UTF-8 编码)的大小上限为 124 个字节
某些资源方法(例如 properties.update
)需要 propertyKey
。使用 properties.list
方法检索属性的键。
JSON 表示法 |
{
"selfLink": string,
"value": string,
"visibility": string,
"kind": string,
"etag": string,
"key": string
} |
字段 |
selfLink |
string
仅限输出。指向此媒体资源的链接。
|
value |
string
此属性的值。
|
visibility |
string
此资源的可见性。允许的值为 PRIVATE(默认)和 PUBLIC。只能使用经过身份验证的请求检索私有属性。经过身份验证的请求使用通过 OAuth 2 客户端 ID 获取的访问令牌。您无法使用 API 密钥检索私有属性。
|
kind |
string
仅限输出。始终为 drive#property 。
|
etag |
string
仅限输出。属性的 ETag。
|
key |
string
此属性的键。
|
方法 |
|
删除属性。 |
|
通过键获取属性。 |
|
向文件添加属性;如果属性已存在,则更新该属性。 |
|
列出文件的属性。 |
|
更新媒体资源。 |
|
更新媒体资源。 |
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2024-09-04。
[null,null,["最后更新时间 (UTC):2024-09-04。"],[[["File properties are key-value pairs that can be attached to a file, with limits on the total number and size."],["Properties can have either public or private visibility, impacting how they are accessed."],["The `properties` resource provides methods for managing file properties, such as adding, updating, deleting, and listing them."],["Each property is represented by a JSON object with fields like `selfLink`, `value`, `visibility`, `kind`, `etag`, and `key`."],["To retrieve the key for a property, which is needed for some operations, use the `properties.list` method."]]],["File properties are key-value pairs, either public or private, with limits: 100 total, 30 private per app, 30 public, and 124 bytes per property. Properties can be manipulated using methods such as `delete`, `get`, `insert`, `list`, `patch`, and `update`. The `visibility` field determines if the property is private or public. Private properties require OAuth 2 authentication, they can't use an API key. `properties.list` retrieves property keys, necessary for `properties.update`.\n"]]