| PUT | /v1/forms/{FormUID} |
|---|
import java.math.*;
import java.util.*;
import java.io.InputStream;
import net.servicestack.client.*;
public class dtos
{
public static class FormUpdateRequest
{
public UUID FormUID = null;
public String Name = null;
public String Noun = null;
public String Description = null;
public String NumberPrefix = null;
public UUID getFormUID() { return FormUID; }
public FormUpdateRequest setFormUID(UUID value) { this.FormUID = value; return this; }
public String getName() { return Name; }
public FormUpdateRequest setName(String value) { this.Name = value; return this; }
public String getNoun() { return Noun; }
public FormUpdateRequest setNoun(String value) { this.Noun = value; return this; }
public String getDescription() { return Description; }
public FormUpdateRequest setDescription(String value) { this.Description = value; return this; }
public String getNumberPrefix() { return NumberPrefix; }
public FormUpdateRequest setNumberPrefix(String value) { this.NumberPrefix = value; return this; }
}
public static class FormResponse
{
public FormDetail Form = null;
public ResponseStatus ResponseStatus = null;
public FormDetail getForm() { return Form; }
public FormResponse setForm(FormDetail value) { this.Form = value; return this; }
public ResponseStatus getResponseStatus() { return ResponseStatus; }
public FormResponse setResponseStatus(ResponseStatus value) { this.ResponseStatus = value; return this; }
}
public static class FormDetail extends FormCard
{
public String DraftJson = null;
public Integer DraftRev = null;
public UUID SourceTemplateUID = null;
public ArrayList<String> Warnings = new ArrayList<String>();
public ArrayList<String> AlwaysHidden = new ArrayList<String>();
public String getDraftJson() { return DraftJson; }
public FormDetail setDraftJson(String value) { this.DraftJson = value; return this; }
public Integer getDraftRev() { return DraftRev; }
public FormDetail setDraftRev(Integer value) { this.DraftRev = value; return this; }
public UUID getSourceTemplateUID() { return SourceTemplateUID; }
public FormDetail setSourceTemplateUID(UUID value) { this.SourceTemplateUID = value; return this; }
public ArrayList<String> getWarnings() { return Warnings; }
public FormDetail setWarnings(ArrayList<String> value) { this.Warnings = value; return this; }
public ArrayList<String> getAlwaysHidden() { return AlwaysHidden; }
public FormDetail setAlwaysHidden(ArrayList<String> value) { this.AlwaysHidden = value; return this; }
}
public static class FormCard
{
public UUID FormUID = null;
public String Name = null;
public String Slug = null;
public String Noun = null;
public String NumberPrefix = null;
public String Description = null;
public String Tone = null;
public String Status = null;
public Integer PublishedVersionNo = null;
public Date PublishedAt = null;
public String PublishedBy = null;
public Boolean DraftDirty = null;
public Date DraftUpdatedAt = null;
public String DraftUpdatedBy = null;
public String PackLabel = null;
public String SettingsJson = null;
public FormStats Stats = null;
public ArrayList<String> Offered = new ArrayList<String>();
public String CreatedBy = null;
public Date CreatedAt = null;
public Date UpdatedAt = null;
public UUID getFormUID() { return FormUID; }
public FormCard setFormUID(UUID value) { this.FormUID = value; return this; }
public String getName() { return Name; }
public FormCard setName(String value) { this.Name = value; return this; }
public String getSlug() { return Slug; }
public FormCard setSlug(String value) { this.Slug = value; return this; }
public String getNoun() { return Noun; }
public FormCard setNoun(String value) { this.Noun = value; return this; }
public String getNumberPrefix() { return NumberPrefix; }
public FormCard setNumberPrefix(String value) { this.NumberPrefix = value; return this; }
public String getDescription() { return Description; }
public FormCard setDescription(String value) { this.Description = value; return this; }
public String getTone() { return Tone; }
public FormCard setTone(String value) { this.Tone = value; return this; }
public String getStatus() { return Status; }
public FormCard setStatus(String value) { this.Status = value; return this; }
public Integer getPublishedVersionNo() { return PublishedVersionNo; }
public FormCard setPublishedVersionNo(Integer value) { this.PublishedVersionNo = value; return this; }
public Date getPublishedAt() { return PublishedAt; }
public FormCard setPublishedAt(Date value) { this.PublishedAt = value; return this; }
public String getPublishedBy() { return PublishedBy; }
public FormCard setPublishedBy(String value) { this.PublishedBy = value; return this; }
public Boolean isDraftDirty() { return DraftDirty; }
public FormCard setDraftDirty(Boolean value) { this.DraftDirty = value; return this; }
public Date getDraftUpdatedAt() { return DraftUpdatedAt; }
public FormCard setDraftUpdatedAt(Date value) { this.DraftUpdatedAt = value; return this; }
public String getDraftUpdatedBy() { return DraftUpdatedBy; }
public FormCard setDraftUpdatedBy(String value) { this.DraftUpdatedBy = value; return this; }
public String getPackLabel() { return PackLabel; }
public FormCard setPackLabel(String value) { this.PackLabel = value; return this; }
public String getSettingsJson() { return SettingsJson; }
public FormCard setSettingsJson(String value) { this.SettingsJson = value; return this; }
public FormStats getStats() { return Stats; }
public FormCard setStats(FormStats value) { this.Stats = value; return this; }
public ArrayList<String> getOffered() { return Offered; }
public FormCard setOffered(ArrayList<String> value) { this.Offered = value; return this; }
public String getCreatedBy() { return CreatedBy; }
public FormCard setCreatedBy(String value) { this.CreatedBy = value; return this; }
public Date getCreatedAt() { return CreatedAt; }
public FormCard setCreatedAt(Date value) { this.CreatedAt = value; return this; }
public Date getUpdatedAt() { return UpdatedAt; }
public FormCard setUpdatedAt(Date value) { this.UpdatedAt = value; return this; }
}
public static class FormStats
{
public Integer Total = null;
public Integer NeedDecision = null;
public Integer Waiting = null;
public Integer Overdue = null;
public Integer getTotal() { return Total; }
public FormStats setTotal(Integer value) { this.Total = value; return this; }
public Integer getNeedDecision() { return NeedDecision; }
public FormStats setNeedDecision(Integer value) { this.NeedDecision = value; return this; }
public Integer getWaiting() { return Waiting; }
public FormStats setWaiting(Integer value) { this.Waiting = value; return this; }
public Integer getOverdue() { return Overdue; }
public FormStats setOverdue(Integer value) { this.Overdue = value; return this; }
}
}
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.
PUT /v1/forms/{FormUID} HTTP/1.1
Host: api.dev.dynamics.trendsic.com
Accept: application/xml
Content-Type: application/xml
Content-Length: length
<FormUpdateRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CRM.AgencyPlatform.API.Internal">
<Description>String</Description>
<FormUID>00000000-0000-0000-0000-000000000000</FormUID>
<Name>String</Name>
<Noun>String</Noun>
<NumberPrefix>String</NumberPrefix>
</FormUpdateRequest>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length
<FormResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CRM.AgencyPlatform.API.Internal">
<Form>
<CreatedAt>0001-01-01T00:00:00</CreatedAt>
<CreatedBy>String</CreatedBy>
<Description>String</Description>
<DraftDirty>false</DraftDirty>
<DraftUpdatedAt>0001-01-01T00:00:00</DraftUpdatedAt>
<DraftUpdatedBy>String</DraftUpdatedBy>
<FormUID>00000000-0000-0000-0000-000000000000</FormUID>
<Name>String</Name>
<Noun>String</Noun>
<NumberPrefix>String</NumberPrefix>
<Offered xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d3p1:string>String</d3p1:string>
</Offered>
<PackLabel>String</PackLabel>
<PublishedAt>0001-01-01T00:00:00</PublishedAt>
<PublishedBy>String</PublishedBy>
<PublishedVersionNo>0</PublishedVersionNo>
<SettingsJson>String</SettingsJson>
<Slug>String</Slug>
<Stats>
<NeedDecision>0</NeedDecision>
<Overdue>0</Overdue>
<Total>0</Total>
<Waiting>0</Waiting>
</Stats>
<Status>String</Status>
<Tone>String</Tone>
<UpdatedAt>0001-01-01T00:00:00</UpdatedAt>
<AlwaysHidden xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d3p1:string>String</d3p1:string>
</AlwaysHidden>
<DraftJson>String</DraftJson>
<DraftRev>0</DraftRev>
<SourceTemplateUID>00000000-0000-0000-0000-000000000000</SourceTemplateUID>
<Warnings xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d3p1:string>String</d3p1:string>
</Warnings>
</Form>
<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>
</FormResponse>