| POST | /v1/forms/{FormUID}/versions/{VersionNo}/rollback |
|---|
import java.math.*;
import java.util.*;
import java.io.InputStream;
import net.servicestack.client.*;
public class dtos
{
public static class FormRollbackRequest
{
public UUID FormUID = null;
public Integer VersionNo = null;
public Integer DraftRev = null;
public UUID getFormUID() { return FormUID; }
public FormRollbackRequest setFormUID(UUID value) { this.FormUID = value; return this; }
public Integer getVersionNo() { return VersionNo; }
public FormRollbackRequest setVersionNo(Integer value) { this.VersionNo = value; return this; }
public Integer getDraftRev() { return DraftRev; }
public FormRollbackRequest setDraftRev(Integer value) { this.DraftRev = 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 .csv suffix or ?format=csv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /v1/forms/{FormUID}/versions/{VersionNo}/rollback HTTP/1.1
Host: api.dev.dynamics.trendsic.com
Accept: text/csv
Content-Type: text/csv
Content-Length: length
{"FormUID":"00000000000000000000000000000000","VersionNo":0,"DraftRev":0}
HTTP/1.1 200 OK
Content-Type: text/csv
Content-Length: length
{"Form":{"DraftJson":"String","DraftRev":0,"SourceTemplateUID":"00000000000000000000000000000000","Warnings":["String"],"AlwaysHidden":["String"],"FormUID":"00000000000000000000000000000000","Name":"String","Slug":"String","Noun":"String","NumberPrefix":"String","Description":"String","Tone":"String","Status":"String","PublishedVersionNo":0,"PublishedAt":"0001-01-01T00:00:00.0000000","PublishedBy":"String","DraftDirty":false,"DraftUpdatedAt":"0001-01-01T00:00:00.0000000","DraftUpdatedBy":"String","PackLabel":"String","SettingsJson":"String","Stats":{"Total":0,"NeedDecision":0,"Waiting":0,"Overdue":0},"Offered":["String"],"CreatedBy":"String","CreatedAt":"0001-01-01T00:00:00.0000000","UpdatedAt":"0001-01-01T00:00:00.0000000"},"ResponseStatus":{"ErrorCode":"String","Message":"String","StackTrace":"String","Errors":[{"ErrorCode":"String","FieldName":"String","Message":"String","Meta":{"String":"String"}}],"Meta":{"String":"String"}}}