Edit in GitHubLog an issue

CJA Audit Logs

The Audit Log API allows you to retrieve a list of audit log records using a GET or POST method through Adobe I/O. The GET endpoint provides a way to add filters through query string parameters. The POST endpoint offers greater flexibility to your search criteria.

Get Audit Logs#

The GET endpoint is designed for use when few or no filters are needed. If filters are included by adding query string parameters, each query string parameter filters the list of audit logs using an 'AND' condition.

GET https://cja.adobe.io/auditlogs/api/v1/auditlogs

Submitting a request to this endpoint with no query string parameters returns the last 1000 audit log records in descending order. Reference the following list of available query string parameters to filter the audit log records.

Query String Parameters#

Query StringTypeDescriptionPossible Values
startDateStringBegin date range. If this query string is set, endDate is required.YYYY-01-01T00:00:00-07
endDateStringEnd date range. If this query string is set, startDate is required.YYYY-02-01T00:00:00-07
actionEnumThe type of action a user or system can make.CREATE, EDIT, DELETE, LOGIN_FAILED, LOGIN_SUCCESSFUL, API_REQUEST
componentEnumThe type of component.CALCULATED_METRIC, CONNECTION, DATA_GROUP, DATA_VIEW, DATE_RANGE, FILTER, MOBILE, PROJECT, REPORT, SCHEDULED_PROJECT
componentIdStringThe id of the component.--
userTypeEnumThe type of user.IMS, OKTA
userIdStringThe ID of the user.--
userEmailStringThe email address of the user.User defined
descriptionStringThe description of the audit log.User defined
pageSizeIntegerNumber of results per page. If left null, the default size is 100.10
pageNumberIntegerPage number. The first page is indexed at 0.0

Example : Get audit logs with no filters#

Request:

GET https://cja.adobe.io/auditlogs/api/v1/auditlogs

Response:

Copied to your clipboard
1{
2 "content": [
3 {
4 "id": "61573795d9409a491f1a9604",
5 "dateCreated": "2021-10-01T16:30:13.377+00:00",
6 "action": "CREATE",
7 "description": "Creating scheduled job: e1efbf6c-d483-408e-b033-3045e594b656",
8 "imsOrgId": "EXAMPLEIMSORG@AdobeOrg",
9 "user": {
10 "id": "EXAMPLEUSER@AdobeID",
11 "idType": "IMS",
12 "name": null,
13 "email": null
14 },
15 "component": {
16 "id": "e1efbf6c-d483-408e-b033-3045e594b656",
17 "idType": "SCHEDULED_PROJECT",
18 "name": ""
19 }
20 },
21 {
22 "id": "615735e8d9409a491f1a9603",
23 "dateCreated": "2021-10-01T16:23:04.821+00:00",
24 "action": "DELETE",
25 "description": "Deleting scheduled job: 7baaf2f8-209a-4886-9619-30f3054884ce",
26 "imsOrgId": "EXAMPLEIMSORG@AdobeOrg",
27 "user": {
28 "id": "EXAMPLEUSER@AdobeID",
29 "idType": "IMS",
30 "name": null,
31 "email": null
32 },
33 "component": {
34 "id": "7baaf2f8-209a-4886-9619-30f3054884ce",
35 "idType": "SCHEDULED_PROJECT",
36 "name": "EOW reporting"
37 }
38 }
39 ],
40 "pageable": {
41 "sort": {
42 "sorted": false,
43 "unsorted": true,
44 "empty": true
45 },
46 "offset": 0,
47 "pageNumber": 0,
48 "pageSize": 2,
49 "paged": true,
50 "unpaged": false
51 },
52 "last": false,
53 "totalElements": 1946,
54 "totalPages": 973,
55 "size": 2,
56 "number": 0,
57 "sort": {
58 "sorted": false,
59 "unsorted": true,
60 "empty": true
61 },
62 "numberOfElements": 2,
63 "first": true,
64 "empty": false
65}

Example : Get audit logs with filters applied#

Request:

Copied to your clipboard
https://cja.adobe.io/auditlogs/api/v1/auditlogs?startDate=2021-08-01T00%3A00%3A00-07&endDate=2021-09-30T00%3A00%3A00-07&action=CREATE&action=EDIT&action=DELETE&component=SCHEDULED_PROJECT&userType=IMS&description=job&pageSize=2

Response:

Copied to your clipboard
1{
2 "content": [
3 {
4 "id": "615559925e0e8a7da2152d86",
5 "dateCreated": "2021-09-30T06:30:42.968+00:00",
6 "action": "CREATE",
7 "description": "Creating scheduled job: ce4e1239-ab7b-471c-9d6a-14934c9d5ea4",
8 "imsOrgId": "4E9432245BC7C44B0A494037@AdobeOrg",
9 "user": {
10 "id": "434F42A85501C8190A4C86DE@AdobeID",
11 "idType": "IMS",
12 "name": null,
13 "email": null
14 },
15 "component": {
16 "id": "ce4e1239-ab7b-471c-9d6a-14934c9d5ea4",
17 "idType": "SCHEDULED_PROJECT",
18 "name": ""
19 }
20 },
21 {
22 "id": "615556df5e0e8a7da2152d85",
23 "dateCreated": "2021-09-30T06:19:11.145+00:00",
24 "action": "EDIT",
25 "description": "Updating scheduled job: 2dab1331-4844-4f82-94ff-9721ec47830c",
26 "imsOrgId": "4E9432245BC7C44B0A494037@AdobeOrg",
27 "user": {
28 "id": "039D6F286137B99D0A49401D@fd6f6f286137b98d494230.e",
29 "idType": "IMS",
30 "name": null,
31 "email": null
32 },
33 "component": {
34 "id": "2dab1331-4844-4f82-94ff-9721ec47830c",
35 "idType": "SCHEDULED_PROJECT",
36 "name": ""
37 }
38 }
39 ],
40 "pageable": {
41 "sort": {
42 "sorted": false,
43 "unsorted": true,
44 "empty": true
45 },
46 "offset": 0,
47 "pageNumber": 0,
48 "pageSize": 2,
49 "paged": true,
50 "unpaged": false
51 },
52 "last": false,
53 "totalElements": 1246,
54 "totalPages": 623,
55 "size": 2,
56 "number": 0,
57 "sort": {
58 "sorted": false,
59 "unsorted": true,
60 "empty": true
61 },
62 "numberOfElements": 2,
63 "first": true,
64 "empty": false
65}

Search Audit Logs#

If you need to retrieve a list of audit logs using 'OR' criteria, you can use the POST /auditlogs/search endpoint. Use the following lists for available Enum values for the associated key.

POST https://cja.adobe.io/auditlogs/api/v1/auditlogs/search

fieldType#

  • COMPONENT
  • COMPONENT_ID
  • USER
  • USER_ID
  • USER_EMAIL
  • BEGIN_DATE_RANGE
  • END_DATE_RANGE
  • ACTION
  • DESCRIPTION

Notes#

If 'BEGIN_DATE_RANGE' is set as a fieldType, 'END_DATE_RANGE' must also be set. These fieldTypes must use 'EQUALS' as their 'operator'.

operator#

  • EQUALS
  • NOT_EQUALS
  • CONTAINS
  • IN

fieldOperator#

  • AND
  • OR

POST Example 1#

Show me audit logs where the component is 'FILTER' or 'CALCULATED_METRIC', the 'DESCRIPTION' contains the string 'created', AND the 'USER_EMAIL' contains EITHER 'jane' or 'john'.

Copied to your clipboard
1{
2 "criteria": {
3 "fieldOperator": "AND",
4 "fields": [
5 {
6 "fieldType": "COMPONENT",
7 "value": [
8 "FILTER",
9 "CALCULATED_METRIC"
10 ],
11 "operator": "IN"
12 },
13 {
14 "fieldType": "DESCRIPTION",
15 "value": [
16 "created"
17 ],
18 "operator": "CONTAINS"
19 }
20 ],
21 "subCriteriaOperator": "AND",
22 "subCriteria": {
23 "fieldOperator": "OR",
24 "fields": [
25 {
26 "fieldType": "USER_EMAIL",
27 "value": [
28 "jane"
29 ],
30 "operator": "CONTAINS"
31 },
32 {
33 "fieldType": "USER_EMAIL",
34 "value": [
35 "john"
36 ],
37 "operator": "CONTAINS"
38 }
39 ],
40 "subCriteriaOperator": null,
41 "subCriteria": null
42 }
43 },
44 "pageSize": 100,
45 "pageNumber": 0
46}

POST Example 2#

Show me audit logs between June 1st and October 1st where the 'ACTION' was either 'CREATE' OR 'EDIT' OR the 'DESCRIPTION' contained the string 'job' or 'test'. The response will only include logs between those dates but the other criteria will be filtered using 'OR' logic.

Copied to your clipboard
1{
2 "criteria": {
3 "fieldOperator": "AND",
4 "fields": [
5 {
6 "fieldType": "BEGIN_DATE_RANGE",
7 "value": [
8 "2021-06-01T00:00:00-07"
9 ],
10 "operator": "EQUALS"
11 },
12 {
13 "fieldType": "END_DATE_RANGE",
14 "value": [
15 "2021-10-01T00:00:00-07"
16 ],
17 "operator": "EQUALS"
18 }
19 ],
20 "subCriteriaOperator": "AND",
21 "subCriteria": {
22 "fieldOperator": "OR",
23 "fields": [
24 {
25 "fieldType": "ACTION",
26 "value": [
27 "CREATE",
28 "EDIT"
29 ],
30 "operator": "IN"
31 },
32 {
33 "fieldType": "DESCRIPTION",
34 "value": [
35 "job",
36 "test"
37 ],
38 "operator": "CONTAINS"
39 }
40 ],
41 "subCriteriaOperator": null,
42 "subCriteria": null
43 }
44 },
45 "pageSize": 10,
46 "pageNumber": 0
47}
48
49
50export const _frontmatter = {}
Copyright © 2021 Adobe. All rights reserved.