| Requires any of the roles: | Agent, Administrator |
| POST,OPTIONS | /v1/DocumentSearch |
|---|
import java.math.*;
import java.util.*;
import java.io.InputStream;
import net.servicestack.client.*;
public class dtos
{
public static class DocumentSearchRequest
{
public String searchTerms = null;
public DocumentSearchMode searchMode = null;
public DocumentTermMode termMode = null;
public UUID userId = null;
public String getSearchTerms() { return searchTerms; }
public DocumentSearchRequest setSearchTerms(String value) { this.searchTerms = value; return this; }
public DocumentSearchMode getSearchMode() { return searchMode; }
public DocumentSearchRequest setSearchMode(DocumentSearchMode value) { this.searchMode = value; return this; }
public DocumentTermMode getTermMode() { return termMode; }
public DocumentSearchRequest setTermMode(DocumentTermMode value) { this.termMode = value; return this; }
public UUID getUserId() { return userId; }
public DocumentSearchRequest setUserId(UUID value) { this.userId = value; return this; }
}
public static enum DocumentSearchMode
{
Exact(1),
Contains(2),
StartsWith(3),
EndsWith(4);
private final int value;
DocumentSearchMode(final int intValue) { value = intValue; }
public int getValue() { return value; }
}
public static enum DocumentTermMode
{
All(1),
Any(2);
private final int value;
DocumentTermMode(final int intValue) { value = intValue; }
public int getValue() { return value; }
}
public static class DocumentSearchResponse
{
public Integer DocumentSearchCount = null;
public ArrayList<DocumentSearchResult> DocumentSearchResults = new ArrayList<DocumentSearchResult>();
public ResponseStatus ResponseStatus = null;
public Integer getDocumentSearchCount() { return DocumentSearchCount; }
public DocumentSearchResponse setDocumentSearchCount(Integer value) { this.DocumentSearchCount = value; return this; }
public ArrayList<DocumentSearchResult> getDocumentSearchResults() { return DocumentSearchResults; }
public DocumentSearchResponse setDocumentSearchResults(ArrayList<DocumentSearchResult> value) { this.DocumentSearchResults = value; return this; }
public ResponseStatus getResponseStatus() { return ResponseStatus; }
public DocumentSearchResponse setResponseStatus(ResponseStatus value) { this.ResponseStatus = value; return this; }
}
public static class DocumentSearchResult
{
public UUID AttachmentId = null;
public Date DateAdded = null;
public String AttachmentName = null;
public String Description = null;
public String DocumentType = null;
public String DocumentGroup = null;
public String DropboxTableName = null;
public Integer DropboxRecordId = null;
public String AttachmentTableName = null;
public String AttachmentFieldName = null;
public Integer AttachmentRecordId = null;
public String FilePath = null;
public String OCRSource = null;
public String OCRResult = null;
public ArrayList<LineSearchResult> Lines = new ArrayList<LineSearchResult>();
public UUID getAttachmentId() { return AttachmentId; }
public DocumentSearchResult setAttachmentId(UUID value) { this.AttachmentId = value; return this; }
public Date getDateAdded() { return DateAdded; }
public DocumentSearchResult setDateAdded(Date value) { this.DateAdded = value; return this; }
public String getAttachmentName() { return AttachmentName; }
public DocumentSearchResult setAttachmentName(String value) { this.AttachmentName = value; return this; }
public String getDescription() { return Description; }
public DocumentSearchResult setDescription(String value) { this.Description = value; return this; }
public String getDocumentType() { return DocumentType; }
public DocumentSearchResult setDocumentType(String value) { this.DocumentType = value; return this; }
public String getDocumentGroup() { return DocumentGroup; }
public DocumentSearchResult setDocumentGroup(String value) { this.DocumentGroup = value; return this; }
public String getDropboxTableName() { return DropboxTableName; }
public DocumentSearchResult setDropboxTableName(String value) { this.DropboxTableName = value; return this; }
public Integer getDropboxRecordId() { return DropboxRecordId; }
public DocumentSearchResult setDropboxRecordId(Integer value) { this.DropboxRecordId = value; return this; }
public String getAttachmentTableName() { return AttachmentTableName; }
public DocumentSearchResult setAttachmentTableName(String value) { this.AttachmentTableName = value; return this; }
public String getAttachmentFieldName() { return AttachmentFieldName; }
public DocumentSearchResult setAttachmentFieldName(String value) { this.AttachmentFieldName = value; return this; }
public Integer getAttachmentRecordId() { return AttachmentRecordId; }
public DocumentSearchResult setAttachmentRecordId(Integer value) { this.AttachmentRecordId = value; return this; }
public String getFilePath() { return FilePath; }
public DocumentSearchResult setFilePath(String value) { this.FilePath = value; return this; }
public String getOcrSource() { return OCRSource; }
public DocumentSearchResult setOcrSource(String value) { this.OCRSource = value; return this; }
public String getOcrResult() { return OCRResult; }
public DocumentSearchResult setOcrResult(String value) { this.OCRResult = value; return this; }
public ArrayList<LineSearchResult> getLines() { return Lines; }
public DocumentSearchResult setLines(ArrayList<LineSearchResult> value) { this.Lines = value; return this; }
}
public static class LineSearchResult
{
public String LineText = null;
public Integer PageNo = null;
public Integer PageLineNo = null;
public Integer DocLineNo = null;
public Double BoxTop = null;
public Double BoxLeft = null;
public Double BoxWidth = null;
public Double BoxHeight = null;
public String getLineText() { return LineText; }
public LineSearchResult setLineText(String value) { this.LineText = value; return this; }
public Integer getPageNo() { return PageNo; }
public LineSearchResult setPageNo(Integer value) { this.PageNo = value; return this; }
public Integer getPageLineNo() { return PageLineNo; }
public LineSearchResult setPageLineNo(Integer value) { this.PageLineNo = value; return this; }
public Integer getDocLineNo() { return DocLineNo; }
public LineSearchResult setDocLineNo(Integer value) { this.DocLineNo = value; return this; }
public Double getBoxTop() { return BoxTop; }
public LineSearchResult setBoxTop(Double value) { this.BoxTop = value; return this; }
public Double getBoxLeft() { return BoxLeft; }
public LineSearchResult setBoxLeft(Double value) { this.BoxLeft = value; return this; }
public Double getBoxWidth() { return BoxWidth; }
public LineSearchResult setBoxWidth(Double value) { this.BoxWidth = value; return this; }
public Double getBoxHeight() { return BoxHeight; }
public LineSearchResult setBoxHeight(Double value) { this.BoxHeight = value; return this; }
}
}
Java DocumentSearchRequest 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.
POST /v1/DocumentSearch HTTP/1.1
Host: api.dev.dynamics.trendsic.com
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length
{
searchTerms: String,
searchMode: Exact,
termMode: All,
userId: 00000000000000000000000000000000
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length
{
DocumentSearchCount: 0,
DocumentSearchResults:
[
{
AttachmentId: 00000000000000000000000000000000,
DateAdded: 0001-01-01,
AttachmentName: String,
Description: String,
DocumentType: String,
DocumentGroup: String,
DropboxTableName: String,
DropboxRecordId: 0,
AttachmentTableName: String,
AttachmentFieldName: String,
AttachmentRecordId: 0,
FilePath: String,
OCRSource: String,
OCRResult: String,
Lines:
[
{
LineText: String,
PageNo: 0,
PageLineNo: 0,
DocLineNo: 0,
BoxTop: 0,
BoxLeft: 0,
BoxWidth: 0,
BoxHeight: 0
}
]
}
],
ResponseStatus:
{
ErrorCode: String,
Message: String,
StackTrace: String,
Errors:
[
{
ErrorCode: String,
FieldName: String,
Message: String,
Meta:
{
String: String
}
}
],
Meta:
{
String: String
}
}
}