Saving or Modifying Resource Attribute Values
Function
This API is used to save or modify resource attribute values.
URI
POST /v1/{project_id}/authorization/cooperate-authorization/properties
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
project_id |
Yes |
String |
Project ID. For how to obtain the project ID, see Obtaining a Project ID. |
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
X-Workspace-Id |
Yes |
String |
Workspace ID. For how to obtain it, see Obtaining a Workspace ID. |
X-Auth-Token |
Yes |
String |
User token. Obtain a user token by calling IAM's API. X-Subject-Token in the response header is the desired user token. For how to obtain a token, see Authentication. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
auth_switch_config |
No |
Map<String,Boolean> |
Switch for permissions. It can be set to true or false to indicate whether the corresponding switch is turned on. The default value is false.
|
resource_id |
Yes |
String |
Resource ID. |
resource_type |
Yes |
String |
Explanation Enumerated value of the resource type, which is used to specify the type of the authorized object. For example, datasource indicates that the type of the authorized object is a data source. Constraints N/A Value range The enumerated values are:
Default value N/A |
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
auth_switch_config |
Map<String,Boolean> |
Switch for permissions, that is, the sharing and collaboration configuration item. It can be set to true or false to indicate whether the corresponding switch is turned on.
|
create_date |
Long |
Creation time. |
create_user |
String |
Creator ID. |
create_user_name |
String |
Creator name. |
id |
String |
ID of the resource collaboration authorization attribute table. |
owner |
String |
Resource owner ID. |
project_id |
String |
Project ID. |
resource_id |
String |
Resource ID. |
resource_type |
String |
Explanation Enumerated value of the resource type, which is used to specify the type of the authorized object. For example, datasource indicates that the type of the authorized object is a data source. Constraints N/A Value range The enumerated values are:
Default value N/A |
update_date |
Long |
Modification time |
update_user |
String |
Modifier ID. |
update_user_name |
String |
Modifier name. |
workspace_id |
String |
Workspace ID. |
Example Request
Save or modify resource sharing and collaboration attribute values.
POST https://{endpoint}/v1/xxxxx3ab4dac4055888643b331xxxxx/authorization/cooperate-authorization/properties { "auth_switch_config" : "{"read": true, "edit": true, "export": true}", "resource_id" : "d0d7919c-xxxx-462e-xxxx-da82bf8be44e", "resource_type" : "dashboard" }
Example Response
Status code: 200
OK.
{ "auth_switch_config" : "{"read": true, "edit": true, "export": true}", "create_date" : 1688022840899, "create_user" : "de9cb4xxxxa94b0ba2887b80xxxxxxxx", "create_user_name" : "***_01", "id" : "78215911-xxxx-478b-xxxx-9cb7f0407598", "owner" : "dxxxxa863a94xxxa2887b80xxxxxxxx", "project_id" : "xxx3ab4dac40558886xxxxx1a0b227", "resource_id" : "d0xxx19c-4e87-46xx-bxx2-da82bfxxxx4e", "resource_type" : "dashboard", "update_date" : 1688023886860, "update_user" : "de9cb4a863a94b0ba2887b80xxxxxxxx", "update_user_name" : "ei_dlv_***_01", "workspace_id" : "6xxxx96809adxxxxxa09e6bxxxx2146" }
Status Codes
Status Code |
Description |
---|---|
200 |
OK |
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