Querying the Switch and Quota of a Specified Feature of the Current User
Function
This API is used to query the switch status and quota information of a specified feature of the current user. This API is used when you need to know whether a specific feature is enabled, check the quota limit, or monitor the used resources. Before using this API, ensure that you have logged in and have the query permission, and the specified feature must exist. After this API is called, the system returns the details, such as whether the feature is enabled, total quota, and used resources. If you do not have the required permission, the feature does not exist, or the system is abnormal, the API will return an error message.
Debugging
You can debug this API through automatic authentication in API Explorer or use the SDK sample code generated by API Explorer.
URI
GET /v1/{project_id}/authoring/features/{feature}
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
project_id |
Yes |
String |
Definition: Project ID. For details, see Obtaining a Project ID and Name. Constraints: The value can contain 1 to 64 characters. Letters, digits, and hyphens (-) are allowed. Range: N/A Default Value: N/A |
|
feature |
Yes |
String |
Definition: Feature name. Constraints: N/A Range
Default Value: NOTEBOOK |
Request Parameters
None
Response Parameters
Status code: 200
|
Parameter |
Type |
Description |
|---|---|---|
|
create_at |
Long |
Definition: UTC time when the instance is created, accurate to millisecond. Range: N/A |
|
enabled |
Boolean |
Definition: Feature switch. Range: Boolean
|
|
id |
String |
Definition: Feature ID. Range: N/A |
|
name |
String |
Definition: Feature name. Range:
|
|
quota |
Integer |
Definition: Feature quota. Range: N/A |
|
used |
Integer |
Definition: Feature quota used. Range: N/A |
|
update_at |
Long |
Definition: Time (UTC) when the instance was last updated, accurate to millisecond. Range: N/A |
|
user_id |
String |
Definition: User ID. Range: N/A |
Status code: 401
|
Parameter |
Type |
Description |
|---|---|---|
|
error_code |
String |
Range: N/A |
|
error_msg |
String |
Definition: Error message. Range: N/A |
Status code: 403
|
Parameter |
Type |
Description |
|---|---|---|
|
error_code |
String |
Range: N/A |
|
error_msg |
String |
Definition: Error message. Range: N/A |
Status code: 404
|
Parameter |
Type |
Description |
|---|---|---|
|
error_code |
String |
Range: N/A |
|
error_msg |
String |
Definition: Error message. Range: N/A |
Example Requests
None
Example Responses
Status code: 200
Request succeeded.
{
"create_at" : 1597119549430,
"enabled" : true,
"id" : "432hkjk3424kh432nb432km543m423m32",
"name" : "NOTEBOOK",
"quota" : 1000,
"update_at" : 1735818559236,
"used" : 300,
"user_id" : "43278947598432457983257243532"
}
Status Codes
|
Status Code |
Description |
|---|---|
|
200 |
Request succeeded. |
|
401 |
Unauthorized. |
|
403 |
Forbidden. |
|
404 |
Not found. |
Error Codes
See Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot