All Products
Search
Document Center

AI Coding Assistant Lingma:Query audit logs as an organization administrator

Last Updated:Mar 27, 2026

Organization administrators can use this operation to query audit logs.

Supported editions

Enterprise Dedicated Edition

Service endpoints

Get the service endpoint and replace {domain} in the API request syntax with your endpoint .

Authorization information

Product

Resource

Required permission

organization management

audit log

Read-only

Request syntax

GET https://{domain}/oapi/v1/platform/auditLogs

Request

All users

curl -X 'GET' \
  'https://test-domain-***.rdc.aliyuncs.com/oapi/v1/platform/auditLogs?actionTimeStart=2023-08-31T03:59:16.201Z' \
  -H 'Content-Type: application/json' \
  -H 'x-yunxiao-token: pt-0fh3****0fbG_35af****0484'

By organization ID

curl -X 'GET' \
  'https://test-domain-***.rdc.aliyuncs.com/oapi/v1/platform/auditLogs?organizationId=99d1****6124&actionTimeStart=2025-06-09T10:00:00Z' \
  -H 'Content-Type: application/json' \
  -H 'x-yunxiao-token: pt-0fh3****0fbG_35af****0484'

By application

curl -X 'GET' \
  'https://test-domain-***.rdc.aliyuncs.com/oapi/v1/platform/auditLogs?apps=lingma%2Cbase&actionTimeStart=2025-06-09T10:00:00Z' \
  -H 'Content-Type: application/json' \
  -H 'x-yunxiao-token: pt-0fh3****0fbG_35af****0484'

By scope

curl -X 'GET' \
  'https://test-domain-***.rdc.aliyuncs.com/oapi/v1/platform/auditLogs?scope=SCOPE_SITE&actionTimeStart=2025-06-09T10:00:00Z' \
  -H 'Content-Type: application/json' \
  -H 'x-yunxiao-token: pt-0fh3****0fbG_35af****0484'

Request headers

x-yunxiao-token string (Required)

The access token. See Access token for details.

Example: pt-0fh3****0fbG_35af****0484.

Request parameters

actionTimeStart string (Required)

The start of the time range for the query.

RFC 3339 format, such as 2023-09-30T00:00:00.00Z.

organizationId string (Optional)

Navigate to the Basic Information page of the organization management console to obtain the organizationId.

userIds string (Optional)

A comma-separated list of user IDs. Use the ListUsers - Query user list operation to obtain user IDs.

appsstring (Optional)

A list of application identity values, separated by commas.

scope string (Optional)

The scope of the logs to retrieve.

  • SCOPE_SITE: Retrieves enterprise-level logs.

  • SCOPE_ORG: Retrieves organization-level logs.

actionTimeEnd string (Optional)

The end of the time range for the query. If you do not specify this parameter, the current time is used.

In RFC 3339 format, such as 2023-09-30T00:00:00.00Z.

perPage integer Optional. The default value is 100.

The number of items per page. The valid range is [1, 100].

nextToken string (Optional)

The token used to retrieve the next page of results.

Response

All users

[
    {
        "id": "851135*************8ade025cce5",
        "organizationId": "fce5ff4*********14f-5021f82c6e51",
        "userId": "d4024e***********3f26b8689ae6",
        "appId": "a1775d**************ede54bef30f6",
        "organization": {
            "id": "fce5ff4**********21f82c6e51",
            "name": "Example"
        },
        "user": {
            "id": "d4024eb************3f26b8689ae6",
            "name": "lingma"
        },
        "app": {
            "identity": "lingma",
            "name": "Tongyi Lingma"
        },
        "action": "Log in to the coding assistant",
        "detail": "lingma-Enterprise Edition logs in to the Tongyi Lingma coding assistant",
        "targetType": "developer_permission",
        "ip": "30.***.**.128",
        "scope": "SCOPE_ORG",
        "actionTime": "2025-06-11T07:32:01Z"
    },
]

By organization ID

[
    {
        "id": "33484******e1e56152",
        "organizationId": "c765544*********b371a21c5a5",
        "userId": "0ef544******7775648d5387",
        "appId": "5d2749******b9219d4af43",
        "organization": {
            "id": "c765544******b371a21c5a5",
            "name": "Example Org Name"
        },
        "user": {
            "id": "0ef5448******775648d5387",
            "name": "user"
        },
        "app": {
            "identity": "base",
            "name": "organization management"
        },
        "action": "Add member role",
        "detail": "The role for member *** was updated to include Tongyi Lingma administrator.",
        "targetId": "lingma_admin",
        "targetType": "member",
        "ip": "111.**.**.126",
        "scope": "SCOPE_ORG",
        "actionTime": "2025-06-11T05:28:31Z"
    }
]

By application

[
    {
        "id": "851135b7-fe6d-4582-9e91-18ade025cce5",
        "organizationId": "fce5ff40-1e4a-47f4-914f-5021f82c6e51",
        "userId": "d4024eb1-5c18-41e0-afed-3f26b8689ae6",
        "appId": "a1775d7c-bace-447f-9766-ede54bef30f6",
        "organization": {
            "id": "fce5ff40-1e4a-47f4-914f-5021f82c6e51",
            "name": "moao_test"
        },
        "user": {
            "id": "d4024eb1-5c18-41e0-afed-3f26b8689ae6",
            "name": "lingma-Enterprise Edition"
        },
        "app": {
            "identity": "lingma",
            "name": "Tongyi Lingma"
        },
        "action": "Log in to the coding assistant",
        "detail": "lingma-Enterprise Edition logs in to the Tongyi Lingma coding assistant",
        "targetType": "developer_permission",
        "ip": "30.221.XXX.XXX",
        "scope": "SCOPE_ORG",
        "actionTime": "2025-06-11T07:32:01Z"
    }
]

By scope

[
    {
        "id": "47f27*******69a9d",
        "userId": "d4024e*******6b8689ae6",
        "appId": "5d274*******619d4af43",
        "user": {
            "id": "d4024eb1*******6b8689ae6",
            "name": "lingma-Enterprise Edition"
        },
        "app": {
            "identity": "site",
            "name": "Enterprise Management"
        },
        "action": "User login",
        "detail": "Log in to Apsara DevOps",
        "targetId": "d4024eb1********8689ae6",
        "targetType": "member",
        "ip": "140.****.0",
        "scope": "SCOPE_SITE",
        "actionTime": "2025-06-11T07:31:04Z"
    }
]

action string

The action performed.

actionTime string

The time when the action occurred.

app object

Information about the application.

Properties

identity string

The identity of the application.

  • base: Actions related to organization management.

  • lingma: Actions related to Tongyi Lingma.

name string

The name of the application.

appId string

The ID of the application.

detail string

Details about the action.

id string

The unique ID of the audit log.

ip string

The source IP address of the action.

organization object

Information about the organization.

Properties

id string

The ID of the organization.

name string

The name of the organization.

organizationId string

The ID of the organization.

scope string

The scope of the audit log.

targetId string

The ID of the target resource.

targetType string

The type of the target resource. Valid values:

  • member

  • developer_permission

  • license

user object

Information about the user who performed the action.

Properties

id string

The ID of the user.

name string

The name of the user.

userId string

The ID of the user who performed the action.

Response headers

Parameter

Description

Example

x-next-token

A token to retrieve the next page of results.

MT***********************BkYg==

Error codes

For more information, see Error codes.