Product Overview
Feature Description
Product Strengths
Use Cases
Basic Concept
PUT /api/v1/quota/{LibraryId}/{QuotaId}?access_token={AccessToken}&user_id={UserId}
Request parameters. | Description | Type | Required or Not |
LibraryId | Media Library ID, obtained after creating a media library in the media hosting console. See Create Media Library | String | Yes |
QuotaId | Quota ID | String | Yes |
AccessToken | Access token. For Public Read Media Library or tenant space, this parameter is not specified, otherwise you must specify this parameter. Please refer to Generate Access Token | String | No |
UserId | User identity recognition. When the access token corresponds to administrator permissions and the user identity recognition during access token application is empty, it is used to temporarily specify user identity. For details, see Generate Access Token API | String | No |
{"spaces": [ "space111", "space222" ],"capacity": "1099511627776","removeWhenExceed": true,"removeAfterDays": 30,"removeNewest": false}
Response Parameters | Description | Type | Optional or Not |
spaces | For multi-tenant space media libraries, modify the quota to cover tenant spaces (independent addition or removal is not currently supported) so as to simultaneously control quotas for multiple tenant spaces. Empty arrays are not supported. If this field is not specified, the tenant spaces covered by the quota will not be modified. For single-tenant spaces, this field cannot be specified. | Array | No |
capacity | Optional fields. The specific value of the quota, in bytes (Byte), can be specified in digital form or string form. To avoid precision loss with large numbers, it is advisable to specify this field in string form. If not specified, the specific value of the quota will not be modified. | String | No |
removeWhenExceed | When set to false, the quota is only used to determine whether there is sufficient space for uploading, and deletion cleanup will not be performed for any space that has already exceeded the limit. When set to true, creating a quota will check the current storage capacity. If the storage has already exceeded the limit, it will start deleting files after the number of days specified in removeAfterDays to ensure the storage remains under the quota. By default, the earliest files are deleted. If removeNewest is set to true, the latest files will be deleted. This is a required parameter. | Boolean | No |
removeAfterDays | The number of days to wait before performing file deletion when the stored amount exceeds the limit | Int | No |
removeNewest | Whether to start deleting from the latest file. The default is false, starting from the oldest file. | Boolean | No |
フィードバック