Trendsic Platform Service

<back to all web services

ReportRequest

Requires Authentication
Requires any of the roles:Agent, Administrator
The following routes are available for this service:
GET,OPTIONS/v1/ReportFilters/{ReportType}
GET,OPTIONS/v1/Report/{ReportType}
GET,OPTIONS/v1/Report/{ReportType}/{Argument}
GET,OPTIONS/v1/Report/{ReportType}/{StartDate}/{EndDate}/{AgentID}
GET,OPTIONS/v1/Report/{ReportType}/{StartDate}/{EndDate}
import java.math.*;
import java.util.*;
import java.io.InputStream;
import net.servicestack.client.*;

public class dtos
{

    public static class ReportRequest
    {
        public String ReportType = null;
        public String Argument = null;
        public Date StartDate = null;
        public Date EndDate = null;
        public String Filter = null;
        public Integer AgentId = null;
        public Integer ReportMonth = null;
        public Integer ReportYear = null;
        
        public String getReportType() { return ReportType; }
        public ReportRequest setReportType(String value) { this.ReportType = value; return this; }
        public String getArgument() { return Argument; }
        public ReportRequest setArgument(String value) { this.Argument = value; return this; }
        public Date getStartDate() { return StartDate; }
        public ReportRequest setStartDate(Date value) { this.StartDate = value; return this; }
        public Date getEndDate() { return EndDate; }
        public ReportRequest setEndDate(Date value) { this.EndDate = value; return this; }
        public String getFilter() { return Filter; }
        public ReportRequest setFilter(String value) { this.Filter = value; return this; }
        public Integer getAgentId() { return AgentId; }
        public ReportRequest setAgentId(Integer value) { this.AgentId = value; return this; }
        public Integer getReportMonth() { return ReportMonth; }
        public ReportRequest setReportMonth(Integer value) { this.ReportMonth = value; return this; }
        public Integer getReportYear() { return ReportYear; }
        public ReportRequest setReportYear(Integer value) { this.ReportYear = value; return this; }
    }

    public static class ReportResponse
    {
        public ResponseStatus ResponseStatus = null;
        public ArrayList<Object> ReportData = new ArrayList<Object>();
        public ArrayList<String> Filters = new ArrayList<String>();
        
        public ResponseStatus getResponseStatus() { return ResponseStatus; }
        public ReportResponse setResponseStatus(ResponseStatus value) { this.ResponseStatus = value; return this; }
        public ArrayList<Object> getReportData() { return ReportData; }
        public ReportResponse setReportData(ArrayList<Object> value) { this.ReportData = value; return this; }
        public ArrayList<String> getFilters() { return Filters; }
        public ReportResponse setFilters(ArrayList<String> value) { this.Filters = value; return this; }
    }

}

Java ReportRequest 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.

GET /v1/ReportFilters/{ReportType} HTTP/1.1 
Host: api.dev.dynamics.trendsic.com 
Accept: application/xml
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<ReportResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CRM.AgencyPlatform.API.Internal">
  <Filters xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
    <d2p1:string>String</d2p1:string>
  </Filters>
  <ReportData xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
    <d2p1:anyType />
  </ReportData>
  <ResponseStatus xmlns:d2p1="http://schemas.servicestack.net/types">
    <d2p1:ErrorCode>String</d2p1:ErrorCode>
    <d2p1:Message>String</d2p1:Message>
    <d2p1:StackTrace>String</d2p1:StackTrace>
    <d2p1:Errors>
      <d2p1:ResponseError>
        <d2p1:ErrorCode>String</d2p1:ErrorCode>
        <d2p1:FieldName>String</d2p1:FieldName>
        <d2p1:Message>String</d2p1:Message>
        <d2p1:Meta xmlns:d5p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
          <d5p1:KeyValueOfstringstring>
            <d5p1:Key>String</d5p1:Key>
            <d5p1:Value>String</d5p1:Value>
          </d5p1:KeyValueOfstringstring>
        </d2p1:Meta>
      </d2p1:ResponseError>
    </d2p1:Errors>
    <d2p1:Meta xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
      <d3p1:KeyValueOfstringstring>
        <d3p1:Key>String</d3p1:Key>
        <d3p1:Value>String</d3p1:Value>
      </d3p1:KeyValueOfstringstring>
    </d2p1:Meta>
  </ResponseStatus>
</ReportResponse>