tvpl.api

<back to all web services

AuditLogRequest

Requires Authentication
The following routes are available for this service:
GET/audits
import java.math.*;
import java.util.*;
import net.servicestack.client.*;
import com.google.gson.annotations.*;
import com.google.gson.reflect.*;

public class dtos
{

    public static class AuditLogRequest extends PagingRequest
    {
        public String userName = null;
        public Integer userId = null;
        public Integer documentId = null;
        public String action = null;
        public String description = null;
        public String ipAddress = null;
        public Date startDate = null;
        public Date endDate = null;
        
        public String getUserName() { return userName; }
        public AuditLogRequest setUserName(String value) { this.userName = value; return this; }
        public Integer getUserId() { return userId; }
        public AuditLogRequest setUserId(Integer value) { this.userId = value; return this; }
        public Integer getDocumentId() { return documentId; }
        public AuditLogRequest setDocumentId(Integer value) { this.documentId = value; return this; }
        public String getAction() { return action; }
        public AuditLogRequest setAction(String value) { this.action = value; return this; }
        public String getDescription() { return description; }
        public AuditLogRequest setDescription(String value) { this.description = value; return this; }
        public String getIpAddress() { return ipAddress; }
        public AuditLogRequest setIpAddress(String value) { this.ipAddress = value; return this; }
        public Date getStartDate() { return startDate; }
        public AuditLogRequest setStartDate(Date value) { this.startDate = value; return this; }
        public Date getEndDate() { return endDate; }
        public AuditLogRequest setEndDate(Date value) { this.endDate = value; return this; }
    }

    public static class PagingRequest
    {
        public Integer page = null;
        public Integer limit = null;
        
        public Integer getPage() { return page; }
        public PagingRequest setPage(Integer value) { this.page = value; return this; }
        public Integer getLimit() { return limit; }
        public PagingRequest setLimit(Integer value) { this.limit = value; return this; }
    }

    public static class PageResponse<AuditLog> implements IResponseRequest
    {
        public Integer code = null;
        public String message = null;
        public ArrayList<AuditLog> data = null;
        public Pagination pagination = null;
        
        public Integer getCode() { return code; }
        public PageResponse<AuditLog> setCode(Integer value) { this.code = value; return this; }
        public String getMessage() { return message; }
        public PageResponse<AuditLog> setMessage(String value) { this.message = value; return this; }
        public ArrayList<AuditLog> getData() { return data; }
        public PageResponse<AuditLog> setData(ArrayList<AuditLog> value) { this.data = value; return this; }
        public Pagination getPagination() { return pagination; }
        public PageResponse<AuditLog> setPagination(Pagination value) { this.pagination = value; return this; }
    }

    public static class AuditLog extends MongoObject implements IEntityId, ICreated, IUpdate
    {
        public String userName = null;
        public Integer userId = null;
        public Integer documentId = null;
        public String action = null;
        public String description = null;
        public Date createdDate = null;
        public Date updatedDate = null;
        public String ipAddress = null;
        public String userAgent = null;
        
        public String getUserName() { return userName; }
        public AuditLog setUserName(String value) { this.userName = value; return this; }
        public Integer getUserId() { return userId; }
        public AuditLog setUserId(Integer value) { this.userId = value; return this; }
        public Integer getDocumentId() { return documentId; }
        public AuditLog setDocumentId(Integer value) { this.documentId = value; return this; }
        public String getAction() { return action; }
        public AuditLog setAction(String value) { this.action = value; return this; }
        public String getDescription() { return description; }
        public AuditLog setDescription(String value) { this.description = value; return this; }
        public Date getCreatedDate() { return createdDate; }
        public AuditLog setCreatedDate(Date value) { this.createdDate = value; return this; }
        public Date getUpdatedDate() { return updatedDate; }
        public AuditLog setUpdatedDate(Date value) { this.updatedDate = value; return this; }
        public String getIpAddress() { return ipAddress; }
        public AuditLog setIpAddress(String value) { this.ipAddress = value; return this; }
        public String getUserAgent() { return userAgent; }
        public AuditLog setUserAgent(String value) { this.userAgent = value; return this; }
    }

    public static class MongoObject implements IMongoModel
    {
        public String id = null;
        
        public String getId() { return id; }
        public MongoObject setId(String value) { this.id = value; return this; }
    }

    public static class Pagination
    {
        public Long total = null;
        public Integer pages = null;
        public Long offset = null;
        public Integer limit = null;
        public Integer currentPage = null;
        
        public Long getTotal() { return total; }
        public Pagination setTotal(Long value) { this.total = value; return this; }
        public Integer getPages() { return pages; }
        public Pagination setPages(Integer value) { this.pages = value; return this; }
        public Long getOffset() { return offset; }
        public Pagination setOffset(Long value) { this.offset = value; return this; }
        public Integer getLimit() { return limit; }
        public Pagination setLimit(Integer value) { this.limit = value; return this; }
        public Integer getCurrentPage() { return currentPage; }
        public Pagination setCurrentPage(Integer value) { this.currentPage = value; return this; }
    }

}

Java AuditLogRequest DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .json suffix or ?format=json

To embed the response in a jsonp callback, append ?callback=myCallback

HTTP + JSON

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

GET /audits HTTP/1.1 
Host: etc-api.vsmlab.vn 
Accept: application/json
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length

{"code":0,"message":"String","data":[{"userName":"String","userId":0,"documentId":0,"action":"String","description":"String","createdDate":"0001-01-01T00:00:00.0000000+07:06","updatedDate":"0001-01-01T00:00:00.0000000+07:06","ipAddress":"String","userAgent":"String","id":"000000000000000000000000"}],"pagination":null}