tencent cloud

Smart Media Hosting

Product Introduction
Product Overview
Feature Description
Product Strengths
Use Cases
Basic Concept
Purchase Guide
Quick Start
Create Media Library
Initiate request
Service Level API Document
History
Introduction
API Category
Making API Requests
PaaS Service APIs
Official Cloud Disk APIs
Data Types
Error Codes
Business Level API Document
Introduction
Access Token Operation API
Tenant Space Operation API
File Operation API
Directory or Album Operation API
Recycle Bin Operation API
Quota Operation API
Query Task Operation API
Search Operation API
Historical Version Operations API
Directory and File Batch Operation API
Collection Operation API
Error Codes
SDK Documentation
Android SDK
iOS SDK
HarmonyOS SDK
FAQs
Enterprise Network Disk
Product Introduction
Purchase Guide
Quick Start
FAQs
Service Level Agreement
Glossary

Modifying the Quota

PDF
フォーカスモード
フォントサイズ
最終更新日: 2026-01-07 14:27:59

Description

Used to modify the quota.
Note:
Required permission: admin. For details about permissions, see Generate Access Token API.

Request

Request Example

PUT /api/v1/quota/{LibraryId}/{SpaceId}?access_token={AccessToken}&user_id={UserId}

Request Parameter

Request parameters.
Description
Type
Required or Not
LibraryId
Media Library ID, obtained after creating a media library in the media hosting console. Please refer to Create Media Library
String
Yes
SpaceId
Space ID. Please see Create Tenant Space
String
Yes
AccessToken
Access token. Please see Generate Access Token
String
Yes
UserId
User identity recognition. When the access token corresponds to admin privileges and the user identity recognition during token application is empty, it is used to temporarily specify user identity. For details, see Generate Access Token API
String
No

Request Body

application/json, specify the quota value.
Request body example:
{
"capacity": "1099511627776",
"removeWhenExceed": true,
"removeAfterDays": 30,
"removeNewest": false
}
Request body field description:
Request parameters.
Description
Type
Required or Not
capacity
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 recommended to specify this field in string form.
String
No
removeWhenExceed
When set to false, the quota is only used to determine whether there is sufficient space for uploading, and no deletion cleanup will be performed for space that has already exceeded the limit.
When set to true, creating a quota will check the current storage capacity. If the stored amount has already exceeded the limit, then it will start deleting files after reaching the number of days in removeAfterDays to ensure the stored amount stays under the quota. By default, it removes the earliest file. If removeNewest is set to true, it deletes the latest file.
Boolean
No
removeAfterDays
The number of days to wait before deleting files when the stored amount exceeds the limit
Int
No
removeNewest
Whether to start deleting from the latest file. The default is false, meaning deletion starts from the oldest file.
Boolean
No

Response

Response code

Modification succeeded. Return HTTP 204 No Content.

Response Body

This request has no response body.

Error Codes

This request operation has no special error messages. For common error messages, see Error Codes.

ヘルプとサポート

この記事はお役に立ちましたか?

フィードバック