tvpl.api

<back to all web services

MergeFileRequest

Requires Authentication
The following routes are available for this service:
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; }
    }

}

Java MergeFileRequest DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .csv suffix or ?format=csv

HTTP + CSV

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: text/csv
Content-Type: text/csv
Content-Length: length

{"template":{"id":0,"documentId":0,"title":"String","description":"String","isActive":false},"elements":[{"id":0,"templateId":0,"elementKey":"String","tag":"String","title":"String","description":"String","dataType":"String","templateType":"String","orderIndex":0,"parentId":0,"value":{},"children":[{"id":0,"templateId":0,"elementKey":"String","tag":"String","title":"String","description":"String","dataType":"String","templateType":"String","orderIndex":0,"parentId":0,"value":{},"children":[{"id":0,"templateId":0,"elementKey":"String","tag":"String","title":"String","description":"String","dataType":"String","templateType":"String","orderIndex":0,"parentId":0,"value":{},"children":null}]}]}]}
HTTP/1.1 200 OK
Content-Type: text/csv
Content-Length: length

{}