Search Activities

get

/system/api/v1/auditlog/activities

Search activities with filters for objectCategory, objectID, variationSetID etc. As there may be a large number of activity results that can be requested on pages. ## Authorization All logged-in users can search activities. ## Filters The following properties are filterable and can be used in the `q` parameter:
Property NameSupported Operators
objectTypeEquals (eq)
eventCategoryEquals (eq)
eventNameEquals (eq)
variationSetIdEquals (eq)
objectIdEquals(eq)
registeredAtGreater than or equal to(ge) and Less than or equal to(le)
activityDetails.{path-to-element}Equals (eq)
By Default, objectType or eventCategory or eventName filter is required. If objectType or eventCategory or eventName is not set in the request, then request will be rejected.The objectType, eventName and objectId filters only accepts one or more values with 'and' as the operator.For example, to list all activities with object type either as "Digital Asset" or "Content Item", the filter criteria to use is : /system/api/v1/auditlog/activities?q=objectType eq Digital Asset and objectType eq Content Item. For data range filter, registeredAt filter is expected to have From(ge) and To(le) range. ## Sorting The following properties can be used in the `orderBy` query parameter:
Property NameDescription
registeredAtDate and time at which the activity was registered.
The default sorting is descending order. The registeredAt field is sorted in descending order. ## Expansion The following relationships can be used in the `expand` query parameter (a value of `all` will expand all these relationships):
Property NameDescription
activityDetailsActivity details which is processed for the object.
activityByUser that performed the activity.
## Links A successful response will include one or more of the following links:
Link RelationshipDescription
selfDescribes the current returned representation of the resource.
prevDescribes the previous page of results, if a previous page exists.
nextDescribes the next page of results, if a next page exists.

Request

Supported Media Types
Query Parameters
  • Comma-delimited string of field names that you want to expand. Use the value `all` to expand all relationships.
  • A positive integer value specifies the maximum number of items returned in the response.
  • Non-negative integer values that specifies the index of the first item to be returned. The offset index begins at `0`. The default offset is `0`, which returns all items starting from the first item in the collection.
  • Comma-separated string of field names, each optionally followed by `:asc` or `:desc`, that specifies the order of items returned in the response.
  • Filtering of the resources.
Back to Top

Response

Supported Media Types

200 Response

OK
Body ()
Root Schema : Activities
Type: object
List of Activities.
Show Source
  • Total number of resources in the response.
    Example: 10
  • Collection has more elements that match the request. Indicates whether there are more items to be returned when a paged request is made and the page was not big enough to return all elements.
    Example: true
  • items
    Singular resources contained in the collection.
  • Actual response size limit used. If the request specifies too large a limit, or does not specify a limit then the response will specify the limit used.
    Example: 10
  • links
  • Actual response offset used. If the request specifies no offset then the actual offset is provided in the response.
    Example: 0
  • Total number of resources that match the request. If provided, this is the total number of available items. If not specified the total is not known, or is not viable to return. Paging limits or offsets are ignored when calculating this value. Only returned if the `totalResults` parameter is supported and is set to `true` by the client.
    Example: 10
Nested Schema : items
Type: array
Singular resources contained in the collection.
Show Source
Nested Schema : Activity
Type: object
Activity Information.
Show Source
Nested Schema : activityDetails
Type: object
Additional Properties Allowed
Show Source
Holds the processed details for the activity.
Nested Schema : entity
Type: object
Additional Properties Allowed
Show Source
The primary object(s) in the event which has triggered this activity
Example:
{"asset": {"id": "FC7F4C73571ACD99DECA99D9T0000ASEDVFV123456789","name": "My Asset Name","variationSetId": "FC7F4C73571ACD99DECA99D9T000012121","version": "v0.1","language": "en-US","type": "simpleType1"}}
Nested Schema : Activity Event
Type: object
Activity Event Information.
Show Source
Nested Schema : User
Type: object
User Metadata Model.
Show Source
Nested Schema : additionalProperties
Type: object
Nested Schema : IdName
Type: object
Show Source
Nested Schema : categories
Type: array
The categories of the event.
Show Source
Nested Schema : Category
Type: object
Category Information.
Show Source

304 Response

Not Modified
Body ()
Root Schema : ExceptionDetail
Type: object
Error details for a REST request. In addition to HTTP error code and error messages, it is often desirable to provide additional information to the client when a request fails. In such these cases, the additional information must be included in the error response body. The additional information is optional, but if provided, it will be in the form of exception detail.
Show Source
Nested Schema : o:errorDetails
Type: array
Multiple errors can be organized in a hierarchical structure.
Show Source
  • ExceptionDetail
    Error details for a REST request. In addition to HTTP error code and error messages, it is often desirable to provide additional information to the client when a request fails. In such these cases, the additional information must be included in the error response body. The additional information is optional, but if provided, it will be in the form of exception detail.

400 Response

Bad Request
Body ()
Root Schema : ExceptionDetail
Type: object
Error details for a REST request. In addition to HTTP error code and error messages, it is often desirable to provide additional information to the client when a request fails. In such these cases, the additional information must be included in the error response body. The additional information is optional, but if provided, it will be in the form of exception detail.
Show Source
Nested Schema : o:errorDetails
Type: array
Multiple errors can be organized in a hierarchical structure.
Show Source
  • ExceptionDetail
    Error details for a REST request. In addition to HTTP error code and error messages, it is often desirable to provide additional information to the client when a request fails. In such these cases, the additional information must be included in the error response body. The additional information is optional, but if provided, it will be in the form of exception detail.

404 Response

Not Found
Body ()
Root Schema : ExceptionDetail
Type: object
Error details for a REST request. In addition to HTTP error code and error messages, it is often desirable to provide additional information to the client when a request fails. In such these cases, the additional information must be included in the error response body. The additional information is optional, but if provided, it will be in the form of exception detail.
Show Source
Nested Schema : o:errorDetails
Type: array
Multiple errors can be organized in a hierarchical structure.
Show Source
  • ExceptionDetail
    Error details for a REST request. In addition to HTTP error code and error messages, it is often desirable to provide additional information to the client when a request fails. In such these cases, the additional information must be included in the error response body. The additional information is optional, but if provided, it will be in the form of exception detail.

500 Response

Internal Server Error
Body ()
Root Schema : ExceptionDetail
Type: object
Error details for a REST request. In addition to HTTP error code and error messages, it is often desirable to provide additional information to the client when a request fails. In such these cases, the additional information must be included in the error response body. The additional information is optional, but if provided, it will be in the form of exception detail.
Show Source
Nested Schema : o:errorDetails
Type: array
Multiple errors can be organized in a hierarchical structure.
Show Source
  • ExceptionDetail
    Error details for a REST request. In addition to HTTP error code and error messages, it is often desirable to provide additional information to the client when a request fails. In such these cases, the additional information must be included in the error response body. The additional information is optional, but if provided, it will be in the form of exception detail.
Back to Top

Examples

The objectType, eventName, and objectId filters only accepts one or more values with 'and' as the operator. For example, to list all activities with object type either as "Digital Asset" or "Content Item", the filter criteria to use is: /system/api/v1/auditlog/activities?q=objectType eq Digital Asset and objectType eq Content Item .

The following example shows search activities for objectType, objectId, and eventName, etc filters:

curl -X GET -H 'Accept: application/json' 'https://host:port/system/api/v1/auditlog/activities'

Example 1:

This lists all activities with object type as Digital Asset.

/system/api/v1/auditlog/activities?q=objectType eq Digital Asset

Response Body

{
  "hasMore": true,
  "offset": 0,
  "count": 1,
  "limit": 100,
  "totalResults": 1,
  "items": [
    {
      "id": "1588",
      "event": {
        "name": "DIGITALASSET_REFERENCED",
        "categories": [
          {
            "id": 3002,
            "name": "ASSET_LIFECYCLE"
          }
        ]
      },
      "entity": {
        "digitalasset": {
          "variationSetId": null,
          "version": null,
          "language": null,
          "type": null,
          "id": "CONT291BD3BCBB2A4CC5AF05BE6209B924BD",
          "name": "DAM_ocicecsuser1005.jpg"
        }
      },
      "message": {
        "key": "cec.event.digitalasset.referenced.name",
        "parameters": [
          "DAM_ocicecsuser1005.jpg"
        ],
        "text": "Digital Asset Item DAM_ocicecsuser1005.jpg was referenced by item {1}."
      },
      "registeredAt": "2021-09-06T05:02:48.196Z"
    }
  ]
}

Example 2:

/system/api/v1/auditlog/activities?q=objectType eq Digital Asset and activityDetails.objectId
      eq CONT6A620DAAD7CD4F62938451CC0489C329

This lists all activities with object type as Digital Asset and objectId equal to CONT6A620DAAD7CD4F62938451CC0489C329.

Response Body

{
  "hasMore": false,
  "offset": 0,
  "count": 1,
  "limit": 100,
  "totalResults": 1,
  "items": [
    {
      "id": "1206",
      "event": {
        "name": "DIGITALASSET_UPDATED",
        "categories": [
          {
            "id": 3002,
            "name": "ASSET_LIFECYCLE"
          }
        ]
      },
      "entity": {
        "digitalasset": {
          "variationSetId": "F64C015A288D34D2E053020011ACE84E",
          "version": "0.2",
          "language": "en-GB",
          "type": "File",
          "id": "CONT6A620DAAD7CD4F62938451CC0489C329",
          "name": "asset.pdf"
        }
      },
      "message": {
        "key": "cec.event.digitalasset.updated.name",
        "parameters": null,
        "text": null
      },
      "registeredAt": "2023-03-10T02:25:59.161Z"
    }
  ]
}

Example 3:

/system/api/v1/auditlog/activities?q=objectType eq Digital Asset and registeredAt ge
      2022-01-02T07:14:34.888Z and registeredAt le 2023-02-05T07:14:34.888Z4

This lists all activities with object type as Digital Asset and date and time at which the activity was registered.

Response Body

{
  "hasMore": true,
  "offset": 0,
  "count": 1,
  "limit": 100,
  "totalResults": 1,
  "items": [
    {
      "id": "2524",
      "event": {
        "name": "DIGITALASSET_REFERENCED",
        "categories": [
          {
            "id": 3002,
            "name": "ASSET_LIFECYCLE"
          }
        ]
      },
      "entity": {
        "digitalasset": {
          "variationSetId": null,
          "version": null,
          "language": null,
          "type": null,
          "id": "CONT8B3C157F1B5E4990BD8867B5BBCC1DCB",
          "name": "DAM_ocicecsuser1005_Jul1_18.jpg"
        }
      },
      "message": {
        "key": "cec.event.digitalasset.referenced.name",
        "parameters": [
          "DAM_ocicecsuser1005_Jul1_18.jpg"
        ],
        "text": "Digital Asset Item DAM_ocicecsuser1005_Jul1_18.jpg was referenced by item {1}."
      },
      "registeredAt": "2019-09-06T05:21:34.552Z"
    }
  ]
}

Example 4:

/system/api/v1/auditlog/activities?q=eventName eq DIGITALASSET_CREATED and eventName eq
      DIGITALASSET_UPDATED

This lists all activities whose event name is DIGITALASSET_CREATED and DIGITALASSET_UPDATED.

Response Body

{
  "hasMore": false,
  "offset": 0,
  "count": 2,
  "limit": 100,
  "totalResults": 2,
  "items": [
    {
      "id": "1207",
      "event": {
        "name": "DIGITALASSET_UPDATED",
        "categories": [
          {
            "id": 3002,
            "name": "ASSET_LIFECYCLE"
          }
        ]
      },
      "entity": {
        "digitalasset": {
          "variationSetId": "F64C015A288D34D2E053020011ACE84E",
          "version": "0.3",
          "language": "en-GB",
          "type": "File",
          "id": "CONT6A620DAAD7CD4F62938451CC0489C329",
          "name": "asset.pdf"
        }
      },
      "message": {
        "key": "cec.event.digitalasset.updated.name",
        "parameters": null,
        "text": null
      },
      "registeredAt": "2023-03-10T02:26:17.730Z"
    },
    {
      "id": "1202",
      "event": {
        "name": "DIGITALASSET_CREATED",
        "categories": [
          {
            "id": 3002,
            "name": "ASSET_LIFECYCLE"
          }
        ]
      },
      "entity": {
        "digitalasset": {
          "variationSetId": "F64C015A288D34D2E053020011ACE84E",
          "version": "0.1",
          "language": "en-GB",
          "type": "File",
          "id": "CONT6A620DAAD7CD4F62938451CC0489C329",
          "name": "asset1.pdf"
        }
      },
      "message": {
        "key": "cec.event.digitalasset.created.name",
        "parameters": null,
        "text": null
      },
      "registeredAt": "2023-03-07T08:14:49.207Z"
    }
  ]
}
Back to Top