| POST | /merge-file |
|---|
import java.math.*;
import java.util.*;
import net.servicestack.client.*;
public class dtos
{
public static class MergeFileRequest
{
public Integer workflowId = null;
public TemplateDefinitionDto template = null;
public HashMap<String,ElementInputDto> elements = null;
public Integer getWorkflowId() { return workflowId; }
public MergeFileRequest setWorkflowId(Integer value) { this.workflowId = value; return this; }
public TemplateDefinitionDto getTemplate() { return template; }
public MergeFileRequest setTemplate(TemplateDefinitionDto value) { this.template = value; return this; }
public HashMap<String,ElementInputDto> getElements() { return elements; }
public MergeFileRequest setElements(HashMap<String,ElementInputDto> 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 ElementInputDto
{
public Object value = null;
public String dataType = null;
public Object getValue() { return value; }
public ElementInputDto setValue(Object value) { this.value = value; return this; }
public String getDataType() { return dataType; }
public ElementInputDto setDataType(String value) { this.dataType = 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 xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d2p1:KeyValueOfstringElementInputDtoW9RP9JSa>
<d2p1:Key>String</d2p1:Key>
<d2p1:Value>
<DataType>String</DataType>
<Value />
</d2p1:Value>
</d2p1:KeyValueOfstringElementInputDtoW9RP9JSa>
</Elements>
<Template>
<Description>String</Description>
<DocumentId>0</DocumentId>
<Id>0</Id>
<IsActive>false</IsActive>
<Title>String</Title>
</Template>
<WorkflowId>0</WorkflowId>
</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/" />