Trendsic Platform Service

<back to all web services

FormReportRequest

Requires Authentication
The following routes are available for this service:
GET/v1/forms/{FormUID}/reports
import Foundation
import ServiceStack

public class FormReportRequest : Codable
{
    public var formUID:String
    public var field:String

    required public init(){}
}

public class FormReportResponse : Codable
{
    public var submissions:Int
    public var decided:Int
    public var approved:Int
    public var rateText:String
    public var decisionText:String
    public var drafts:Int
    public var sla:Int
    public var draftDays:Int
    public var isRecord:Bool
    public var weeks:[FormReportBar] = []
    public var stages:[FormReportBar] = []
    public var pages:[FormReportBar] = []
    public var started:Int
    public var submittedPct:Int
    public var dropFrom:String
    public var dropN:Int
    public var durations:[FormReportBar] = []
    public var fields:[FormReportBar] = []
    public var field:String
    public var fieldLabel:String
    public var options:[FormReportBar] = []
    public var reasons:[FormReportBar] = []
    public var responseStatus:ResponseStatus

    required public init(){}
}

public class FormReportBar : Codable
{
    public var id:String
    public var label:String
    public var n:Int
    public var value:Double
    public var text:String
    public var tone:String

    required public init(){}
}


Swift FormReportRequest DTOs

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

HTTP + JSV

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

GET /v1/forms/{FormUID}/reports HTTP/1.1 
Host: api.dev.dynamics.trendsic.com 
Accept: text/jsv
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	Submissions: 0,
	Decided: 0,
	Approved: 0,
	RateText: String,
	DecisionText: String,
	Drafts: 0,
	Sla: 0,
	DraftDays: 0,
	IsRecord: False,
	Weeks: 
	[
		{
			Id: String,
			Label: String,
			N: 0,
			Value: 0,
			Text: String,
			Tone: String
		}
	],
	Stages: 
	[
		{
			Id: String,
			Label: String,
			N: 0,
			Value: 0,
			Text: String,
			Tone: String
		}
	],
	Pages: 
	[
		{
			Id: String,
			Label: String,
			N: 0,
			Value: 0,
			Text: String,
			Tone: String
		}
	],
	Started: 0,
	SubmittedPct: 0,
	DropFrom: String,
	DropN: 0,
	Durations: 
	[
		{
			Id: String,
			Label: String,
			N: 0,
			Value: 0,
			Text: String,
			Tone: String
		}
	],
	Fields: 
	[
		{
			Id: String,
			Label: String,
			N: 0,
			Value: 0,
			Text: String,
			Tone: String
		}
	],
	Field: String,
	FieldLabel: String,
	Options: 
	[
		{
			Id: String,
			Label: String,
			N: 0,
			Value: 0,
			Text: String,
			Tone: String
		}
	],
	Reasons: 
	[
		{
			Id: String,
			Label: String,
			N: 0,
			Value: 0,
			Text: String,
			Tone: String
		}
	],
	ResponseStatus: 
	{
		ErrorCode: String,
		Message: String,
		StackTrace: String,
		Errors: 
		[
			{
				ErrorCode: String,
				FieldName: String,
				Message: String,
				Meta: 
				{
					String: String
				}
			}
		],
		Meta: 
		{
			String: String
		}
	}
}