Alfresco API

GET /audit-applications/{auditApplicationId}/audit-entries

基本信息

Note: 该端点在Alfresco 5.2.2和更高版本中可用。

获取audit应用auditApplicationId的audit条目的列表。

您可以使用include参数返回其他values信息。

该列表可以由以下一项或多项过滤:

  • createdByUser个人id
  • 创建时间(createdAt包含时间段)
  • id包含ID的范围
  • valuesKey audit条目值包含完全匹配的键
  • valuesValue审计条目的值包含精确匹配的值

默认排序顺序是在升序创建(createdAt)的,但是您可以使用可选的ASC或DESC修饰符来指定升序或降序。

例如,指定orderBy = createdAt DESC将以createdAt降序返回audit条目。

您必须具有管理员权限才能获取audit信息。

请求方式:GET

请求API :/audit-applications/{auditApplicationId}/audit-entries

响应等级(状态200)

成功回应

{
  "list": {
    "pagination": {
      "count": 0,
      "hasMoreItems": true,
      "totalItems": 0,
      "skipCount": 0,
      "maxItems": 0
    },
    "entries": [
      {
        "entry": {
          "id": "string",
          "auditApplicationId": "string",
          "createdByUser": {
            "displayName": "string",
            "id": "string"
          },
          "createdAt": "2021-01-08T08:52:11.153Z",
          "values": {}
        }
      }
    ]
  }
}

响应内容类型 applicaiton/json

Query参数

名称 类型 是否必填 示例值 描述
skipCount integer 0 在list中跳过指定数量的数据。 如果未提供,则默认值为0。
maxItems integer 100 在list中要返回的最大项目数。 如果未提供,则默认值为100。
orderBy Array[string]   控制list中entities退回顺序的string。您可以使用orderBy参数通过一个或多个fields对列表进行排序。每个fields都有一个默认的排序顺序,通常是升序的。阅读API方法实践说明以检查是否所有fields使用这个方法将默认搜索顺序设为降序。要按照特殊顺序对entities进行排序的话,您可以使用ASC和DESC关键字对fields进行排序。
where string   可选过滤列表。 示例:
where=(createdByUser='jbloggs')
where=(id BETWEEN ('1234', '4321')
where=(createdAt BETWEEN ('2017-06-02T12:13:51.593+01:00' , '2017-06-04T10:05:16.536+01:00')
where=(createdByUser='jbloggs' and createdAt BETWEEN ('2017-06-02T12:13:51.593+01:00' , '2017-06-04T10:05:16.536+01:00')
where=(valuesKey='/alfresco-access/login/user')
where=(valuesKey='/alfresco-access/transaction/action' and valuesValue='DELETE')
q
include string   返回有关audit条目的其他信息。 可以请求以下可选字段:values
fields Array[string]   field名称的list。 例如,如果您想节省整体带宽,则可以使用此参数来限制响应中返回的field。
例如,如果您想节省整体带宽,则可以使用此参数来限制响应中返回的field。 该列表适用于返回的单个实体或集合中的条目。
如果API方法也支持include参数,则除了在fields参数中指定的fields外,还返回include参数中指定的fields。

Path参数

名称 类型 是否必填 示例值 描述
auditApplicationId string   audit应用程序的标识符。

错误信息描述

状态码 原因
400 参数无效:auditApplicationId格式无效,maxItemsskipCount *的值无效
401 验证失败
403 用户无权获取audit信息
404 applicationId不存在
501 系统禁用audit
default 意外错误

返回结果示例

{
  "error": {
    "errorKey": "string",
    "statusCode": 0,
    "briefSummary": "string",
    "stackTrace": "string",
    "descriptionURL": "string",
    "logId": "string"
  }
}