digitaluapi

<back to all web services

BatchAdd

Requires Authentication
Requires any of the roles:Client, Admin, Partner
The following routes are available for this service:
POST/batch
import java.math.*;
import java.util.*;
import java.io.InputStream;
import net.servicestack.client.*;

public class dtos
{

    @DataContract
    public static class BatchAdd
    {
        @DataMember(Order=2)
        public Date CreatedDate = null;

        @DataMember(Order=3)
        @Validate(Validator="NotNull")
        public String FileName = null;

        @DataMember(Order=4)
        @Validate(Validator="NotNull")
        public String FileSize = null;

        @DataMember(Order=5)
        @Validate(Validator="NotNull")
        public Integer RecordCount = null;

        @DataMember(Order=6)
        public Integer UserAuthId = null;

        @DataMember(Order=7)
        public UUID RowVersionGuid = null;

        @DataMember(Order=8)
        public Integer InsertedRecords = null;

        @DataMember(Order=9)
        public Integer UpdatedRecords = null;

        @DataMember(Order=10)
        public Integer DeletedRecords = null;

        @DataMember(Order=11)
        public String UploadType = null;

        @DataMember(Order=12)
        public Long StatusCodesId = null;
        
        public Date getCreatedDate() { return CreatedDate; }
        public BatchAdd setCreatedDate(Date value) { this.CreatedDate = value; return this; }
        public String getFileName() { return FileName; }
        public BatchAdd setFileName(String value) { this.FileName = value; return this; }
        public String getFileSize() { return FileSize; }
        public BatchAdd setFileSize(String value) { this.FileSize = value; return this; }
        public Integer getRecordCount() { return RecordCount; }
        public BatchAdd setRecordCount(Integer value) { this.RecordCount = value; return this; }
        public Integer getUserAuthId() { return UserAuthId; }
        public BatchAdd setUserAuthId(Integer value) { this.UserAuthId = value; return this; }
        public UUID getRowVersionGuid() { return RowVersionGuid; }
        public BatchAdd setRowVersionGuid(UUID value) { this.RowVersionGuid = value; return this; }
        public Integer getInsertedRecords() { return InsertedRecords; }
        public BatchAdd setInsertedRecords(Integer value) { this.InsertedRecords = value; return this; }
        public Integer getUpdatedRecords() { return UpdatedRecords; }
        public BatchAdd setUpdatedRecords(Integer value) { this.UpdatedRecords = value; return this; }
        public Integer getDeletedRecords() { return DeletedRecords; }
        public BatchAdd setDeletedRecords(Integer value) { this.DeletedRecords = value; return this; }
        public String getUploadType() { return UploadType; }
        public BatchAdd setUploadType(String value) { this.UploadType = value; return this; }
        public Long getStatusCodesId() { return StatusCodesId; }
        public BatchAdd setStatusCodesId(Long value) { this.StatusCodesId = value; return this; }
    }

    public static class Batch
    {
        @DataMember(Order=1)
        @Required()
        public Long Id = null;

        @DataMember(Order=2)
        public Date CreatedDate = null;

        @DataMember(Order=3)
        @Required()
        public String FileName = null;

        @DataMember(Order=4)
        @Required()
        public String FileSize = null;

        @DataMember(Order=5)
        @Required()
        public Integer RecordCount = null;

        @DataMember(Order=6)
        public Integer UserAuthId = null;

        @DataMember(Order=7)
        public UUID RowVersionGuid = null;

        @DataMember(Order=8)
        public Integer InsertedRecords = null;

        @DataMember(Order=9)
        public Integer UpdatedRecords = null;

        @DataMember(Order=10)
        public Integer DeletedRecords = null;

        @DataMember(Order=11)
        public String UploadType = null;

        @DataMember(Order=12)
        public Long StatusCodesId = null;

        @DataMember(Order=13)
        public Integer ErrorRecords = null;
        
        public Long getId() { return Id; }
        public Batch setId(Long value) { this.Id = value; return this; }
        public Date getCreatedDate() { return CreatedDate; }
        public Batch setCreatedDate(Date value) { this.CreatedDate = value; return this; }
        public String getFileName() { return FileName; }
        public Batch setFileName(String value) { this.FileName = value; return this; }
        public String getFileSize() { return FileSize; }
        public Batch setFileSize(String value) { this.FileSize = value; return this; }
        public Integer getRecordCount() { return RecordCount; }
        public Batch setRecordCount(Integer value) { this.RecordCount = value; return this; }
        public Integer getUserAuthId() { return UserAuthId; }
        public Batch setUserAuthId(Integer value) { this.UserAuthId = value; return this; }
        public UUID getRowVersionGuid() { return RowVersionGuid; }
        public Batch setRowVersionGuid(UUID value) { this.RowVersionGuid = value; return this; }
        public Integer getInsertedRecords() { return InsertedRecords; }
        public Batch setInsertedRecords(Integer value) { this.InsertedRecords = value; return this; }
        public Integer getUpdatedRecords() { return UpdatedRecords; }
        public Batch setUpdatedRecords(Integer value) { this.UpdatedRecords = value; return this; }
        public Integer getDeletedRecords() { return DeletedRecords; }
        public Batch setDeletedRecords(Integer value) { this.DeletedRecords = value; return this; }
        public String getUploadType() { return UploadType; }
        public Batch setUploadType(String value) { this.UploadType = value; return this; }
        public Long getStatusCodesId() { return StatusCodesId; }
        public Batch setStatusCodesId(Long value) { this.StatusCodesId = value; return this; }
        public Integer getErrorRecords() { return ErrorRecords; }
        public Batch setErrorRecords(Integer value) { this.ErrorRecords = value; return this; }
    }

}

Java BatchAdd DTOs

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

HTTP + XML

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

POST /batch HTTP/1.1 
Host: duengageapi.uat.scadsoftware.com 
Accept: application/xml
Content-Type: application/xml
Content-Length: length

<BatchAdd xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/digitaluapi.ServiceModel">
  <CreatedDate xmlns:d2p1="http://schemas.datacontract.org/2004/07/System">
    <d2p1:DateTime>0001-01-01T00:00:00Z</d2p1:DateTime>
    <d2p1:OffsetMinutes>0</d2p1:OffsetMinutes>
  </CreatedDate>
  <FileName>String</FileName>
  <FileSize>String</FileSize>
  <RecordCount>0</RecordCount>
  <UserAuthId>0</UserAuthId>
  <RowVersionGuid>00000000-0000-0000-0000-000000000000</RowVersionGuid>
  <InsertedRecords>0</InsertedRecords>
  <UpdatedRecords>0</UpdatedRecords>
  <DeletedRecords>0</DeletedRecords>
  <UploadType>String</UploadType>
  <StatusCodesId>0</StatusCodesId>
</BatchAdd>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<Batch xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/digitaluapi.ServiceModel.Types">
  <CreatedDate xmlns:d2p1="http://schemas.datacontract.org/2004/07/System">
    <d2p1:DateTime>0001-01-01T00:00:00Z</d2p1:DateTime>
    <d2p1:OffsetMinutes>0</d2p1:OffsetMinutes>
  </CreatedDate>
  <DeletedRecords>0</DeletedRecords>
  <ErrorRecords>0</ErrorRecords>
  <FileName>String</FileName>
  <FileSize>String</FileSize>
  <Id>0</Id>
  <InsertedRecords>0</InsertedRecords>
  <RecordCount>0</RecordCount>
  <RowVersionGuid>00000000-0000-0000-0000-000000000000</RowVersionGuid>
  <StatusCodesId>0</StatusCodesId>
  <UpdatedRecords>0</UpdatedRecords>
  <UploadType>String</UploadType>
  <UserAuthId>0</UserAuthId>
</Batch>