Help Center/ DataArts Insight/ API Reference/ Sharing and Collaboration/ Obtaining Resource Attribute Values
Updated on 2025-02-25 GMT+08:00

Obtaining Resource Attribute Values

Function

This API is used to retrieve detailed information about specified resources such as data sources, datasets, dashboards, and large screens.

URI

GET /v1/{project_id}/authorization/cooperate-authorization/properties

Table 1 URI parameter

Parameter

Mandatory

Type

Description

project_id

Yes

String

Project ID. For how to obtain the project ID, see Obtaining a Project ID.

Table 2 Query parameters

Parameter

Mandatory

Type

Description

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:

  • datasource: data source.
  • dataset: dataset.
  • metric: indicator.
  • dashboard: dashboard.
  • screen: large screen.
  • embedAnalysis: embedded analytics.
  • portal: data portal.
  • subject: intelligent analysis assistant.

Default value

N/A

Request Parameters

Table 3 Request header 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.

Response Parameters

Status code: 200

Table 4 Response body parameters

Parameter

Type

Description

auth_switch_config

Map<String,Boolean>

Switch for permissions. It can be set to true or false to indicate whether the corresponding switch is turned on.

  • edit: edit permission.
  • export: export permission.
  • read: view permission.
  • use: use permission.
    NOTE:
    • There are dependencies between permissions. Granting edit permission automatically associates the read and export or use permission. Granting export permission automatically associates the read permission.
    • For dashboards and large screens, there are three permissions: edit, export, and read.

      For example, {"edit":false, "read":true, "export":true} means that view and export permissions are enabled.

    • For data sources and datasets, there are two permissions: edit and use, corresponding to edit and use permissions.

      For example, {"use":true, "edit":false} means that only the use permission is enabled.

create_date

Long

Resource creation time.

create_user

String

ID of the user who creates the resource.

create_user_name

String

Name of the resource creator.

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:

  • datasource: data source.
  • dataset: dataset.
  • metric: indicator.
  • dashboard: dashboard.
  • screen: large screen.
  • embedAnalysis: embedded analytics.
  • portal: data portal.
  • subject: intelligent analysis assistant.

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

Obtains resource attribute values.

GET https://{endpoint}/v1/9c3043axxxac4055888643b331a0bxxx/authorization/cooperate-authorization/properties?resource_type=dataset&resource_id=xxxx406b-8662-4adb-a028-a55cxxxx1166

Example Response

Status code: 200

OK.

{
  "create_date" : 1682576908274,
  "create_user" : "aoeusth",
  "create_user_name" : "xxxx",
  "update_date" : 1683343425273,
  "update_user" : "aeousth",
  "update_user_name" : "xxxx",
  "id" : "xxxxx1f0-dea2-472c-aa9c-25928f74xxxx",
  "resource_type" : "dataset",
  "resource_id" : "xxxx406b-8662-4adb-a028-a55cxxxx1166",
  "auth_switch_config" : {
    "edit" : false,
    "read" : true
  },
  "owner" : "xxxxx4a863a94b0ba2887b80dcxxxx3",
  "project_id" : "9c3043axxxac4055888643b331a0bxxx",
  "workspace_id" : "66a2c96809ad4f62ba09e6b6eeaa2146"
}

Status Codes

Status Code

Description

200

OK

Error Codes

See Error Codes.