Help Center/ DataArts Studio/ API Reference/ DataArts DataService APIs/ Cluster Management/ Querying Access Logs of a DataArts DataService Cluster
Updated on 2025-11-28 GMT+08:00

Querying Access Logs of a DataArts DataService Cluster

Function

This API is used to query the access logs of a DataArts DataService cluster.

Calling Method

For details, see Calling APIs.

Authorization Information

Each account has all the permissions required to call all APIs, but IAM users must be assigned the required permissions.

  • If you are using role/policy-based authorization, see Permissions Policies and Supported Actions for details on the required permissions.
  • If you are using identity policy-based authorization, no identity policy-based permission required for calling this API.

URI

GET /v1/{project_id}/service/instances/{instance_id}/accesslog

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Project ID. For details about how to obtain it, see Project ID and Account ID.

instance_id

Yes

String

Cluster ID

Table 2 Query Parameters

Parameter

Mandatory

Type

Description

is_api

No

Boolean

Whether to query API access logs. Value true means to query API access logs, and value false means to query app access logs.

Request Parameters

Table 3 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

User token. This parameter is mandatory when token authentication is used. You can obtain it from the value of X-Subject-Token in the response message header returned by the "Obtaining a User Token" API of the IAM service.

workspace

Yes

String

Workspace ID. For details about how to obtain it, see Instance ID and Workspace ID.

Content-Type

No

String

Type (format) of the message body. This parameter is mandatory when there is a body. If the request body contains Chinese characters, use charset=utf8 to specify the Chinese character set, for example, application/json;charset=utf8.

Response Parameters

Status code: 200

Table 4 Response body parameters

Parameter

Type

Description

number

Integer

Number of access logs

records

Array of InstanceAccesslog objects

Access logs

Table 5 InstanceAccesslog

Parameter

Type

Description

id

String

Cluster ID

request_id

String

Request ID

api_id

String

API ID

api_name

String

API name

app_id

String

App ID

app_name

String

App name

access_time

Long

Access time

duration

Long

Access duration

status_code

String

Status code

error_code

String

Error code

error_message

String

Error message

detail

String

Log details

in_flow_size

Long

Input traffic volume

out_flow_size

Long

Output traffic volume

out_total_size

Long

Number of output data records

Status code: 400

Table 6 Response body parameters

Parameter

Type

Description

error_code

String

Error code.

error_msg

String

Error message.

Example Requests

Query the access logs of the cluster whose ID is 4f9366ce3e87860934c36d0ac027ad6a.

/v1/0833a5737480d53b2f250010d01a7b88/service/instances/4f9366ce3e87860934c36d0ac027ad6a/accesslog

Example Responses

Status code: 200

The query is successful.

{
  "records" : [ {
    "id" : "00006e83b668b67defff1259962909740634112",
    "request_id" : "1259962909740634112",
    "api_id" : "71a96065c1e0bf11d0914c0658951246",
    "api_name" : "iam_post_query",
    "app_id" : null,
    "app_name" : null,
    "access_time" : 1720440166661,
    "duration" : 33,
    "status_code" : "200",
    "error_code" : null,
    "error_message" : null,
    "detail" : "__________Verification information________\nAPI authentication verification: completed.\nApp authentication verification: completed.\nAccess permission authentication: completed.\n\n___________Parameter information__________\n[path parameter]:\n\n[header parameter]:\nx-language : en-us\naccept : */*\n\n[query  parameter]:\na : 1\n[body  parameter]:\n\n______________SQL information_______________\nSELECT \"bt_col1\" AS \"bt_col1\",\"bt_col2\" AS \"bt_col2\",\"coll\" AS \"coll\",\"bool\" AS \"bool\",\"dfgh\" AS \"dfgh\",\"dai\" AS \"dai\",\"b1\" AS \"b1\",\"b2\" AS \"b2\",\"ct_col1\" AS \"ct_col1\",\"id\" AS \"id\",\"col2\" AS \"col2\",\"col1\" AS \"col1\",\"ct_col6\" AS \"ct_col6\",\"a\" AS \"a\",\"ct_col7\" AS \"ct_col7\",\"b\" AS \"b\",\"ct_col8\" AS \"ct_col8\",\"c\" AS \"c\",\"ct_col9\" AS \"ct_col9\",\"set\" AS \"set\",\"ct_col2\" AS \"ct_col2\",\"d\" AS \"d\",\"ct_col3\" AS \"ct_col3\",\"ct_col4\" AS \"ct_col4\",\"ct_col5\" AS \"ct_col5\",\"m\" AS \"m\",\"a1\" AS \"a1\",\"dfga\" AS \"dfga\",\"bt_col31\" AS \"bt_col31\",\"bt_col11\" AS \"bt_col11\",\"vbg\" AS \"vbg\",\"da\" AS \"da\",\"bt_col3\" AS \"bt_col3\",\"bt_col4\" AS \"bt_col4\" FROM \"public\".\"dws_all_char_type\" WHERE \"a\" = 1 limit 100 offset 0\n\n",
    "in_flow_size" : 14051,
    "out_flow_size" : 416,
    "out_total_size" : 5
  } ],
  "number" : 1
}

Status Codes

Status Code

Description

200

The query is successful.

400

Bad request.