| POST | /v1/forms/submissions/search |
|---|
import java.math.*;
import java.util.*;
import java.io.InputStream;
import net.servicestack.client.*;
public class dtos
{
public static class FormSubmissionSearchRequest
{
public UUID FormUID = null;
public String Mode = null;
public ArrayList<UUID> Forms = new ArrayList<UUID>();
public ArrayList<String> Stages = new ArrayList<String>();
public ArrayList<Integer> Assignees = new ArrayList<Integer>();
public ArrayList<String> Branches = new ArrayList<String>();
public ArrayList<String> Tags = new ArrayList<String>();
public String Search = null;
public String SortKey = null;
public Integer SortDir = null;
public Integer Skip = null;
public Integer Take = null;
public ArrayList<FormAnswerCond> Conds = new ArrayList<FormAnswerCond>();
public ArrayList<String> Flags = new ArrayList<String>();
public UUID getFormUID() { return FormUID; }
public FormSubmissionSearchRequest setFormUID(UUID value) { this.FormUID = value; return this; }
public String getMode() { return Mode; }
public FormSubmissionSearchRequest setMode(String value) { this.Mode = value; return this; }
public ArrayList<UUID> getForms() { return Forms; }
public FormSubmissionSearchRequest setForms(ArrayList<UUID> value) { this.Forms = value; return this; }
public ArrayList<String> getStages() { return Stages; }
public FormSubmissionSearchRequest setStages(ArrayList<String> value) { this.Stages = value; return this; }
public ArrayList<Integer> getAssignees() { return Assignees; }
public FormSubmissionSearchRequest setAssignees(ArrayList<Integer> value) { this.Assignees = value; return this; }
public ArrayList<String> getBranches() { return Branches; }
public FormSubmissionSearchRequest setBranches(ArrayList<String> value) { this.Branches = value; return this; }
public ArrayList<String> getTags() { return Tags; }
public FormSubmissionSearchRequest setTags(ArrayList<String> value) { this.Tags = value; return this; }
public String getSearch() { return Search; }
public FormSubmissionSearchRequest setSearch(String value) { this.Search = value; return this; }
public String getSortKey() { return SortKey; }
public FormSubmissionSearchRequest setSortKey(String value) { this.SortKey = value; return this; }
public Integer getSortDir() { return SortDir; }
public FormSubmissionSearchRequest setSortDir(Integer value) { this.SortDir = value; return this; }
public Integer getSkip() { return Skip; }
public FormSubmissionSearchRequest setSkip(Integer value) { this.Skip = value; return this; }
public Integer getTake() { return Take; }
public FormSubmissionSearchRequest setTake(Integer value) { this.Take = value; return this; }
public ArrayList<FormAnswerCond> getConds() { return Conds; }
public FormSubmissionSearchRequest setConds(ArrayList<FormAnswerCond> value) { this.Conds = value; return this; }
public ArrayList<String> getFlags() { return Flags; }
public FormSubmissionSearchRequest setFlags(ArrayList<String> value) { this.Flags = value; return this; }
}
public static class FormAnswerCond
{
public String F = null;
public String Op = null;
public String V = null;
public String getF() { return F; }
public FormAnswerCond setF(String value) { this.F = value; return this; }
public String getOp() { return Op; }
public FormAnswerCond setOp(String value) { this.Op = value; return this; }
public String getV() { return V; }
public FormAnswerCond setV(String value) { this.V = value; return this; }
}
public static class FormSubmissionSearchResponse
{
public ArrayList<FormInboxRow> Rows = new ArrayList<FormInboxRow>();
public Integer Matching = null;
public Integer ScopeTotal = null;
public ArrayList<FormInboxCount> StageMatching = new ArrayList<FormInboxCount>();
public FormInboxCounts Counts = null;
public ArrayList<FormStageInfo> Stages = new ArrayList<FormStageInfo>();
public Boolean Capped = null;
public ArrayList<FormFilterField> FilterFields = new ArrayList<FormFilterField>();
public ArrayList<String> TagOptions = new ArrayList<String>();
public ResponseStatus ResponseStatus = null;
public ArrayList<FormInboxRow> getRows() { return Rows; }
public FormSubmissionSearchResponse setRows(ArrayList<FormInboxRow> value) { this.Rows = value; return this; }
public Integer getMatching() { return Matching; }
public FormSubmissionSearchResponse setMatching(Integer value) { this.Matching = value; return this; }
public Integer getScopeTotal() { return ScopeTotal; }
public FormSubmissionSearchResponse setScopeTotal(Integer value) { this.ScopeTotal = value; return this; }
public ArrayList<FormInboxCount> getStageMatching() { return StageMatching; }
public FormSubmissionSearchResponse setStageMatching(ArrayList<FormInboxCount> value) { this.StageMatching = value; return this; }
public FormInboxCounts getCounts() { return Counts; }
public FormSubmissionSearchResponse setCounts(FormInboxCounts value) { this.Counts = value; return this; }
public ArrayList<FormStageInfo> getStages() { return Stages; }
public FormSubmissionSearchResponse setStages(ArrayList<FormStageInfo> value) { this.Stages = value; return this; }
public Boolean isCapped() { return Capped; }
public FormSubmissionSearchResponse setCapped(Boolean value) { this.Capped = value; return this; }
public ArrayList<FormFilterField> getFilterFields() { return FilterFields; }
public FormSubmissionSearchResponse setFilterFields(ArrayList<FormFilterField> value) { this.FilterFields = value; return this; }
public ArrayList<String> getTagOptions() { return TagOptions; }
public FormSubmissionSearchResponse setTagOptions(ArrayList<String> value) { this.TagOptions = value; return this; }
public ResponseStatus getResponseStatus() { return ResponseStatus; }
public FormSubmissionSearchResponse setResponseStatus(ResponseStatus value) { this.ResponseStatus = value; return this; }
}
public static class FormInboxRow
{
public UUID SubmissionUID = null;
public UUID FormUID = null;
public String FormName = null;
public Integer VersionNo = null;
public String Number = null;
public String ApplicantName = null;
public String Stage = null;
public String StageLabel = null;
public String StageTone = null;
public Integer AssigneeAgentId = null;
public String AssigneeName = null;
public String BranchName = null;
public Date SubmittedAt = null;
public String SubmittedText = null;
public ArrayList<String> Tags = new ArrayList<String>();
public Integer DocsOk = null;
public Integer DocsNeed = null;
public Boolean IsTest = null;
public String VersionText = null;
public UUID getSubmissionUID() { return SubmissionUID; }
public FormInboxRow setSubmissionUID(UUID value) { this.SubmissionUID = value; return this; }
public UUID getFormUID() { return FormUID; }
public FormInboxRow setFormUID(UUID value) { this.FormUID = value; return this; }
public String getFormName() { return FormName; }
public FormInboxRow setFormName(String value) { this.FormName = value; return this; }
public Integer getVersionNo() { return VersionNo; }
public FormInboxRow setVersionNo(Integer value) { this.VersionNo = value; return this; }
public String getNumber() { return Number; }
public FormInboxRow setNumber(String value) { this.Number = value; return this; }
public String getApplicantName() { return ApplicantName; }
public FormInboxRow setApplicantName(String value) { this.ApplicantName = value; return this; }
public String getStage() { return Stage; }
public FormInboxRow setStage(String value) { this.Stage = value; return this; }
public String getStageLabel() { return StageLabel; }
public FormInboxRow setStageLabel(String value) { this.StageLabel = value; return this; }
public String getStageTone() { return StageTone; }
public FormInboxRow setStageTone(String value) { this.StageTone = value; return this; }
public Integer getAssigneeAgentId() { return AssigneeAgentId; }
public FormInboxRow setAssigneeAgentId(Integer value) { this.AssigneeAgentId = value; return this; }
public String getAssigneeName() { return AssigneeName; }
public FormInboxRow setAssigneeName(String value) { this.AssigneeName = value; return this; }
public String getBranchName() { return BranchName; }
public FormInboxRow setBranchName(String value) { this.BranchName = value; return this; }
public Date getSubmittedAt() { return SubmittedAt; }
public FormInboxRow setSubmittedAt(Date value) { this.SubmittedAt = value; return this; }
public String getSubmittedText() { return SubmittedText; }
public FormInboxRow setSubmittedText(String value) { this.SubmittedText = value; return this; }
public ArrayList<String> getTags() { return Tags; }
public FormInboxRow setTags(ArrayList<String> value) { this.Tags = value; return this; }
public Integer getDocsOk() { return DocsOk; }
public FormInboxRow setDocsOk(Integer value) { this.DocsOk = value; return this; }
public Integer getDocsNeed() { return DocsNeed; }
public FormInboxRow setDocsNeed(Integer value) { this.DocsNeed = value; return this; }
public Boolean getIsTest() { return IsTest; }
public FormInboxRow setIsTest(Boolean value) { this.IsTest = value; return this; }
public String getVersionText() { return VersionText; }
public FormInboxRow setVersionText(String value) { this.VersionText = value; return this; }
}
public static class FormInboxCount
{
public String V = null;
public String L = null;
public Integer N = null;
public String getV() { return V; }
public FormInboxCount setV(String value) { this.V = value; return this; }
public String getL() { return L; }
public FormInboxCount setL(String value) { this.L = value; return this; }
public Integer getN() { return N; }
public FormInboxCount setN(Integer value) { this.N = value; return this; }
}
public static class FormInboxCounts
{
public ArrayList<FormInboxCount> Stages = new ArrayList<FormInboxCount>();
public ArrayList<FormInboxCount> Assignees = new ArrayList<FormInboxCount>();
public ArrayList<FormInboxCount> Branches = new ArrayList<FormInboxCount>();
public ArrayList<FormInboxCount> Tags = new ArrayList<FormInboxCount>();
public ArrayList<FormInboxCount> Forms = new ArrayList<FormInboxCount>();
public ArrayList<FormInboxCount> Flags = new ArrayList<FormInboxCount>();
public ArrayList<FormInboxCount> getStages() { return Stages; }
public FormInboxCounts setStages(ArrayList<FormInboxCount> value) { this.Stages = value; return this; }
public ArrayList<FormInboxCount> getAssignees() { return Assignees; }
public FormInboxCounts setAssignees(ArrayList<FormInboxCount> value) { this.Assignees = value; return this; }
public ArrayList<FormInboxCount> getBranches() { return Branches; }
public FormInboxCounts setBranches(ArrayList<FormInboxCount> value) { this.Branches = value; return this; }
public ArrayList<FormInboxCount> getTags() { return Tags; }
public FormInboxCounts setTags(ArrayList<FormInboxCount> value) { this.Tags = value; return this; }
public ArrayList<FormInboxCount> getForms() { return Forms; }
public FormInboxCounts setForms(ArrayList<FormInboxCount> value) { this.Forms = value; return this; }
public ArrayList<FormInboxCount> getFlags() { return Flags; }
public FormInboxCounts setFlags(ArrayList<FormInboxCount> value) { this.Flags = value; return this; }
}
public static class FormStageInfo
{
public String Id = null;
public String Label = null;
public String Tone = null;
public String Kind = null;
public String getId() { return Id; }
public FormStageInfo setId(String value) { this.Id = value; return this; }
public String getLabel() { return Label; }
public FormStageInfo setLabel(String value) { this.Label = value; return this; }
public String getTone() { return Tone; }
public FormStageInfo setTone(String value) { this.Tone = value; return this; }
public String getKind() { return Kind; }
public FormStageInfo setKind(String value) { this.Kind = value; return this; }
}
public static class FormFilterField
{
public String K = null;
public String L = null;
public String T = null;
public ArrayList<FormFilterOpt> Opts = new ArrayList<FormFilterOpt>();
public String getK() { return K; }
public FormFilterField setK(String value) { this.K = value; return this; }
public String getL() { return L; }
public FormFilterField setL(String value) { this.L = value; return this; }
public String getT() { return T; }
public FormFilterField setT(String value) { this.T = value; return this; }
public ArrayList<FormFilterOpt> getOpts() { return Opts; }
public FormFilterField setOpts(ArrayList<FormFilterOpt> value) { this.Opts = value; return this; }
}
public static class FormFilterOpt
{
public String Id = null;
public String L = null;
public String getId() { return Id; }
public FormFilterOpt setId(String value) { this.Id = value; return this; }
public String getL() { return L; }
public FormFilterOpt setL(String value) { this.L = value; return this; }
}
}
Java FormSubmissionSearchRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=xml
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /v1/forms/submissions/search HTTP/1.1
Host: api.dev.dynamics.trendsic.com
Accept: application/xml
Content-Type: application/xml
Content-Length: length
<FormSubmissionSearchRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CRM.AgencyPlatform.API.Internal">
<Assignees xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d2p1:int>0</d2p1:int>
</Assignees>
<Branches xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d2p1:string>String</d2p1:string>
</Branches>
<Conds>
<FormAnswerCond>
<F>String</F>
<Op>String</Op>
<V>String</V>
</FormAnswerCond>
</Conds>
<Flags xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d2p1:string>String</d2p1:string>
</Flags>
<FormUID>00000000-0000-0000-0000-000000000000</FormUID>
<Forms xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d2p1:guid>00000000-0000-0000-0000-000000000000</d2p1:guid>
</Forms>
<Mode>String</Mode>
<Search>String</Search>
<Skip>0</Skip>
<SortDir>0</SortDir>
<SortKey>String</SortKey>
<Stages xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d2p1:string>String</d2p1:string>
</Stages>
<Tags xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d2p1:string>String</d2p1:string>
</Tags>
<Take>0</Take>
</FormSubmissionSearchRequest>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length
<FormSubmissionSearchResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CRM.AgencyPlatform.API.Internal">
<Capped>false</Capped>
<Counts>
<Assignees>
<FormInboxCount>
<L>String</L>
<N>0</N>
<V>String</V>
</FormInboxCount>
</Assignees>
<Branches>
<FormInboxCount>
<L>String</L>
<N>0</N>
<V>String</V>
</FormInboxCount>
</Branches>
<Flags>
<FormInboxCount>
<L>String</L>
<N>0</N>
<V>String</V>
</FormInboxCount>
</Flags>
<Forms>
<FormInboxCount>
<L>String</L>
<N>0</N>
<V>String</V>
</FormInboxCount>
</Forms>
<Stages>
<FormInboxCount>
<L>String</L>
<N>0</N>
<V>String</V>
</FormInboxCount>
</Stages>
<Tags>
<FormInboxCount>
<L>String</L>
<N>0</N>
<V>String</V>
</FormInboxCount>
</Tags>
</Counts>
<FilterFields>
<FormFilterField>
<K>String</K>
<L>String</L>
<Opts>
<FormFilterOpt>
<Id>String</Id>
<L>String</L>
</FormFilterOpt>
</Opts>
<T>String</T>
</FormFilterField>
</FilterFields>
<Matching>0</Matching>
<ResponseStatus xmlns:d2p1="http://schemas.servicestack.net/types">
<d2p1:ErrorCode>String</d2p1:ErrorCode>
<d2p1:Message>String</d2p1:Message>
<d2p1:StackTrace>String</d2p1:StackTrace>
<d2p1:Errors>
<d2p1:ResponseError>
<d2p1:ErrorCode>String</d2p1:ErrorCode>
<d2p1:FieldName>String</d2p1:FieldName>
<d2p1:Message>String</d2p1:Message>
<d2p1:Meta xmlns:d5p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d5p1:KeyValueOfstringstring>
<d5p1:Key>String</d5p1:Key>
<d5p1:Value>String</d5p1:Value>
</d5p1:KeyValueOfstringstring>
</d2p1:Meta>
</d2p1:ResponseError>
</d2p1:Errors>
<d2p1:Meta xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d3p1:KeyValueOfstringstring>
<d3p1:Key>String</d3p1:Key>
<d3p1:Value>String</d3p1:Value>
</d3p1:KeyValueOfstringstring>
</d2p1:Meta>
</ResponseStatus>
<Rows>
<FormInboxRow>
<ApplicantName>String</ApplicantName>
<AssigneeAgentId>0</AssigneeAgentId>
<AssigneeName>String</AssigneeName>
<BranchName>String</BranchName>
<DocsNeed>0</DocsNeed>
<DocsOk>0</DocsOk>
<FormName>String</FormName>
<FormUID>00000000-0000-0000-0000-000000000000</FormUID>
<IsTest>false</IsTest>
<Number>String</Number>
<Stage>String</Stage>
<StageLabel>String</StageLabel>
<StageTone>String</StageTone>
<SubmissionUID>00000000-0000-0000-0000-000000000000</SubmissionUID>
<SubmittedAt>0001-01-01T00:00:00</SubmittedAt>
<SubmittedText>String</SubmittedText>
<Tags xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d4p1:string>String</d4p1:string>
</Tags>
<VersionNo>0</VersionNo>
<VersionText>String</VersionText>
</FormInboxRow>
</Rows>
<ScopeTotal>0</ScopeTotal>
<StageMatching>
<FormInboxCount>
<L>String</L>
<N>0</N>
<V>String</V>
</FormInboxCount>
</StageMatching>
<Stages>
<FormStageInfo>
<Id>String</Id>
<Kind>String</Kind>
<Label>String</Label>
<Tone>String</Tone>
</FormStageInfo>
</Stages>
<TagOptions xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d2p1:string>String</d2p1:string>
</TagOptions>
</FormSubmissionSearchResponse>