AuditLog

View as Markdown

AuditLog

An audit log displays a record of all the activities performed in a stack and helps you track all published items, updates, deletes, and the current status of the existing content.

find

The "Get audit log" request is used to retrieve the audit log of a stack.

import contentstack; 

Contentstack contentstack = new Contentstack.Builder().build();

AuditLog auditlog = contentstack.stack().auditLog();

Call<ResponseBody> response = auditlog.find().execute();

if (response.isSuccessful){ 

    System.out.println("Response"+ response)

}

fetch

The "Get audit log item" request is used to retrieve a specific item from the audit log of a stack.

import contentstack; 

Contentstack contentstack = new Contentstack.Builder().build();

AuditLog auditlog = contentstack.stack().auditLog();

Call<ResponseBody> response = auditlog.fetch().execute();

if (response.isSuccessful){ 

    System.out.println("Response"+ response)

}

removeParam

Set header for the request.

NameTypeDescription
key (required)String
header key for the request

import contentstack; 

Contentstack contentstack = new Contentstack.Builder().build();

AuditLog auditlog = contentstack.stack().auditLog();

response = auditlog.removeParam("key")

addParam

Sets header for the request.

NameTypeDescription
key (required)String
Header key for the request.
value (required)Object
Header value for the request.

import contentstack; 

Contentstack contentstack = new Contentstack</span>.Builder().build();

AuditLog auditlog = contentstack.stack().auditLog();

response = auditlog.addParam("key", value)

addHeader

Sets header for the request.

NameTypeDescription
key (required)String
Header key for the request.
value (required)Object
Header value for the request.

import contentstack; 

Contentstack contentstack = new Contentstack.Builder().build();

AuditLog auditlog = contentstack.stack().auditLog();

response = auditlog.addHeader("key", value)