| Required role: | super-admin |
| GET | /document-reference/search |
|---|
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 SearchDocumentReferenceRequest extends PagingRequest
{
public String documentCode = null;
public Integer parentDocumentId = null;
public String title = null;
public String getDocumentCode() { return documentCode; }
public SearchDocumentReferenceRequest setDocumentCode(String value) { this.documentCode = value; return this; }
public Integer getParentDocumentId() { return parentDocumentId; }
public SearchDocumentReferenceRequest setParentDocumentId(Integer value) { this.parentDocumentId = value; return this; }
public String getTitle() { return title; }
public SearchDocumentReferenceRequest setTitle(String value) { this.title = 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 SearchDocumentReferenceRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
GET /document-reference/search HTTP/1.1 Host: etc-api.vsmlab.vn Accept: text/jsv
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length
{
code: 0,
message: String,
data:
[
{
id: 0,
parentDocumentId: 0,
title: String,
documentCode: String,
referenceUrl: String,
description: String
}
]
}