POST | /v1/reports | Retrieve Report by ReportName and Filters |
---|
import java.math.*
import java.util.*
import java.io.InputStream
import net.servicestack.client.*
import com.google.gson.annotations.*
import com.google.gson.reflect.*
open class DashboardReportRequest : IPost
{
/**
* Report Name
*/
@ApiMember(Description="Report Name", IsRequired=true, ParameterType="body")
open var reportName:String? = null
/**
* Filters
*/
@ApiMember(Description="Filters", IsRequired=true, ParameterType="body")
open var filters:HashMap<String,ReportFilter> = HashMap<String,ReportFilter>()
/**
* Paging
*/
@ApiMember(Description="Paging", ParameterType="body")
open var paging:ReportsPaging? = null
/**
* Sorting
*/
@ApiMember(Description="Sorting", ParameterType="body")
open var sorting:HashMap<String,ReportSortType> = HashMap<String,ReportSortType>()
}
open class ReportFilter
{
@SerializedName("type") open var Type:ReportFilterType? = null
open var values:ArrayList<String>? = null
open var start:Date? = null
open var end:Date? = null
open var higherThan:Int? = null
open var lowerThan:Int? = null
}
enum class ReportFilterType
{
List,
ListLike,
Date,
Range,
}
open class ReportsPaging
{
open var page:Int? = null
open var pageSize:Int? = null
}
enum class ReportSortType
{
Asc,
Desc,
}
open class DashboardReportResult
{
open var totalCount:Int? = null
open var reportResult:ArrayList<Object>? = null
}
Kotlin DashboardReportRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .other suffix or ?format=other
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /v1/reports HTTP/1.1
Host: uat-api-vehicle-mgt-mb-dhc.rapp-customers.co.uk
Accept: text/jsonl
Content-Type: text/jsonl
Content-Length: length
{"reportName":"String","filters":{"String":{"type":"list","start":"\/Date(-62135596800000-0000)\/","end":"\/Date(-62135596800000-0000)\/","higherThan":0,"lowerThan":0}},"paging":{"page":0,"pageSize":0},"sorting":{"String":"asc"}}
HTTP/1.1 200 OK Content-Type: text/jsonl Content-Length: length {"totalCount":0}