Authorizing or De-authorizing an Asset
Function
This API is used to set the authorization status of an asset. You can grant or cancel the access permission of a specified asset type.
Calling Method
For details, see Calling APIs.
URI
PUT /v1/{project_id}/sdg/asset/authorization
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
project_id |
Yes |
String |
Project ID, which is used to identify a specific project. |
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
type |
Yes |
String |
Asset type, which is used to specify the asset type for which authorization needs to be set. The options are DASHBOARD, OBS, DATABASE, BIGDATA, MRS, LTS, and ALL. |
Request Parameters
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
authorization_status |
No |
Boolean |
Authorization status of an asset. true indicates that the asset is authorized, and false indicates that the authorization is canceled. |
Response Parameters
Status code: 200
|
Parameter |
Type |
Description |
|---|---|---|
|
msg |
String |
Returned message, which is used to describe the operation result or error information. |
|
status |
String |
Return status, for example, '200', '400'. |
Status code: 201
The asset authorization status is set.
Example Requests
PUT /v1/{project_id}/sdg/asset/authorization
{
"authorization_status" : true
}
Example Responses
None
Status Codes
|
Status Code |
Description |
|---|---|
|
200 |
The asset authorization status is set. |
|
201 |
The asset authorization status is set. |
|
401 |
Unauthorized access. The request is rejected. |
|
403 |
Unauthorized operation. The request is rejected. |
|
404 |
The project does not exist. Configuration failed. |
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