| POST | /merge-file |
|---|
import java.math.*;
import java.util.*;
import net.servicestack.client.*;
public class dtos
{
public static class MergeFileRequest
{
public TemplateDefinitionDto template = null;
public ArrayList<ElementDefinitionDto> elements = null;
public TemplateDefinitionDto getTemplate() { return template; }
public MergeFileRequest setTemplate(TemplateDefinitionDto value) { this.template = value; return this; }
public ArrayList<ElementDefinitionDto> getElements() { return elements; }
public MergeFileRequest setElements(ArrayList<ElementDefinitionDto> value) { this.elements = value; return this; }
}
public static class TemplateDefinitionDto
{
public Integer id = null;
public Integer documentId = null;
public String title = null;
public String description = null;
public Boolean isActive = null;
public Integer getId() { return id; }
public TemplateDefinitionDto setId(Integer value) { this.id = value; return this; }
public Integer getDocumentId() { return documentId; }
public TemplateDefinitionDto setDocumentId(Integer value) { this.documentId = value; return this; }
public String getTitle() { return title; }
public TemplateDefinitionDto setTitle(String value) { this.title = value; return this; }
public String getDescription() { return description; }
public TemplateDefinitionDto setDescription(String value) { this.description = value; return this; }
public Boolean getIsActive() { return isActive; }
public TemplateDefinitionDto setIsActive(Boolean value) { this.isActive = value; return this; }
}
public static class ElementDefinitionDto
{
public Integer id = null;
public Integer templateId = null;
public String elementKey = null;
public String tag = null;
public String title = null;
public String description = null;
public String dataType = null;
public String templateType = null;
public Integer orderIndex = null;
public Integer parentId = null;
public Object value = null;
public ArrayList<ElementDefinitionDto> children = null;
public Integer getId() { return id; }
public ElementDefinitionDto setId(Integer value) { this.id = value; return this; }
public Integer getTemplateId() { return templateId; }
public ElementDefinitionDto setTemplateId(Integer value) { this.templateId = value; return this; }
public String getElementKey() { return elementKey; }
public ElementDefinitionDto setElementKey(String value) { this.elementKey = value; return this; }
public String getTag() { return tag; }
public ElementDefinitionDto setTag(String value) { this.tag = value; return this; }
public String getTitle() { return title; }
public ElementDefinitionDto setTitle(String value) { this.title = value; return this; }
public String getDescription() { return description; }
public ElementDefinitionDto setDescription(String value) { this.description = value; return this; }
public String getDataType() { return dataType; }
public ElementDefinitionDto setDataType(String value) { this.dataType = value; return this; }
public String getTemplateType() { return templateType; }
public ElementDefinitionDto setTemplateType(String value) { this.templateType = value; return this; }
public Integer getOrderIndex() { return orderIndex; }
public ElementDefinitionDto setOrderIndex(Integer value) { this.orderIndex = value; return this; }
public Integer getParentId() { return parentId; }
public ElementDefinitionDto setParentId(Integer value) { this.parentId = value; return this; }
public Object getValue() { return value; }
public ElementDefinitionDto setValue(Object value) { this.value = value; return this; }
public ArrayList<ElementDefinitionDto> getChildren() { return children; }
public ElementDefinitionDto setChildren(ArrayList<ElementDefinitionDto> value) { this.children = 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.
POST /merge-file HTTP/1.1
Host: etc-api.vsmlab.vn
Accept: application/xml
Content-Type: application/xml
Content-Length: length
<MergeFileRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/tvpl.api.ServiceModel">
<Elements>
<ElementDefinitionDto>
<Children>
<ElementDefinitionDto>
<Children>
<ElementDefinitionDto>
<Children i:nil="true" />
<DataType>String</DataType>
<Description>String</Description>
<ElementKey>String</ElementKey>
<Id>0</Id>
<OrderIndex>0</OrderIndex>
<ParentId>0</ParentId>
<Tag>String</Tag>
<TemplateId>0</TemplateId>
<TemplateType>String</TemplateType>
<Title>String</Title>
<Value />
</ElementDefinitionDto>
</Children>
<DataType>String</DataType>
<Description>String</Description>
<ElementKey>String</ElementKey>
<Id>0</Id>
<OrderIndex>0</OrderIndex>
<ParentId>0</ParentId>
<Tag>String</Tag>
<TemplateId>0</TemplateId>
<TemplateType>String</TemplateType>
<Title>String</Title>
<Value />
</ElementDefinitionDto>
</Children>
<DataType>String</DataType>
<Description>String</Description>
<ElementKey>String</ElementKey>
<Id>0</Id>
<OrderIndex>0</OrderIndex>
<ParentId>0</ParentId>
<Tag>String</Tag>
<TemplateId>0</TemplateId>
<TemplateType>String</TemplateType>
<Title>String</Title>
<Value />
</ElementDefinitionDto>
</Elements>
<Template>
<Description>String</Description>
<DocumentId>0</DocumentId>
<Id>0</Id>
<IsActive>false</IsActive>
<Title>String</Title>
</Template>
</MergeFileRequest>
HTTP/1.1 200 OK Content-Type: application/xml Content-Length: length <z:anyType xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns:z="http://schemas.microsoft.com/2003/10/Serialization/" />