ScannerVision Web Server

<back to all web services

GetJsonTemplateRequest

Requires Authentication
namespace ScannerVision.WebService.Json.Dto

open System
open System.Collections
open System.Collections.Generic
open System.Runtime.Serialization
open ServiceStack
open ServiceStack.DataAnnotations

    [<AllowNullLiteral>]
    type JsonDto() = 
        class end

    [<AllowNullLiteral>]
    type GetJsonTemplateRequest() = 
        inherit JsonDto()
        member val Guid:String = null with get,set

    [<AllowNullLiteral>]
    type JsonScanSettings() = 
        member val ScanType:String = null with get,set
        member val ScanTypeLocked:Boolean = new Boolean() with get,set
        member val ScanColour:String = null with get,set
        member val ScanColourLocked:Boolean = new Boolean() with get,set
        member val ScanResolution:String = null with get,set
        member val ScanResolutionLocked:Boolean = new Boolean() with get,set
        member val ScanSide:String = null with get,set
        member val ScanSideLocked:Boolean = new Boolean() with get,set
        member val ScanSize:String = null with get,set
        member val ScanSizeLocked:Boolean = new Boolean() with get,set
        member val ScanOrientation:String = null with get,set
        member val ScanOrientationLocked:Boolean = new Boolean() with get,set
        member val ScanSource:String = null with get,set
        member val ScanSourceLocked:Boolean = new Boolean() with get,set
        member val ScanContinuously:Boolean = new Boolean() with get,set
        member val ScanContinuouslyLocked:Boolean = new Boolean() with get,set
        member val IsMixedSizes:Boolean = new Boolean() with get,set
        member val IsMixedSizesLocked:Boolean = new Boolean() with get,set
        member val MinimumPageCount:Int32 = new Int32() with get,set
        member val MaximumPageCount:Int32 = new Int32() with get,set

    [<AllowNullLiteral>]
    type JsonTemplate() = 
        member val Name:String = null with get,set
        member val Description:String = null with get,set
        member val Guid:String = null with get,set
        member val TemplateModificationDate:DateTime = new DateTime() with get,set
        member val IconModificationDate:DateTime = new DateTime() with get,set
        member val Icon:Byte[] = [||] with get,set
        member val TemplateQuestions:JsonQuestion[] = [||] with get,set
        member val GlobalQuestions:JsonQuestion[] = [||] with get,set
        member val ScanSettings:JsonScanSettings = null with get,set

    [<AllowNullLiteral>]
    type GetJsonTemplateResponse() = 
        inherit JsonDto()
        member val Template:JsonTemplate = null with get,set

    type QuestionType =
        | Edit = 0
        | List = 1
        | EditList = 2
        | Browse = 3
        | Password = 4
        | Date = 5
        | Time = 6
        | Boolean = 7
        | Integer = 8
        | Double = 9
        | BrowseList = 10

    [<AllowNullLiteral>]
    type JsonQuestion() = 
        member val PlQuestionType:QuestionType = new QuestionType() with get,set
        member val Question:String = null with get,set
        member val TagName:String = null with get,set
        member val Default:String = null with get,set
        member val ToolTip:String = null with get,set
        member val SampleValue:String = null with get,set
        member val Regex:String = null with get,set
        member val Minimum:Int32 = new Int32() with get,set
        member val Maximum:Int32 = new Int32() with get,set
        member val Required:Boolean = new Boolean() with get,set
        member val Dynamic:Boolean = new Boolean() with get,set
        member val PicklistGuid:String = null with get,set
        member val TemplateGuid:String = null with get,set
        member val HideDefaultValue:Boolean = new Boolean() with get,set

F# GetJsonTemplateRequest DTOs

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

To embed the response in a jsonp callback, append ?callback=myCallback

HTTP + JSON

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

POST /json/reply/GetJsonTemplateRequest HTTP/1.1 
Host: buildmax.org 
Accept: application/json
Content-Type: application/json
Content-Length: length

{"Guid":"String"}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length

{"Template":{"Name":"String","Description":"String","Guid":"String","TemplateModificationDate":"\/Date(-62135596800000-0000)\/","IconModificationDate":"\/Date(-62135596800000-0000)\/","Icon":"AA==","TemplateQuestions":[{"PlQuestionType":"Edit","Question":"String","TagName":"String","Default":"String","ToolTip":"String","SampleValue":"String","Regex":"String","Minimum":0,"Maximum":0,"Required":false,"Dynamic":false,"PicklistGuid":"String","TemplateGuid":"String","HideDefaultValue":false}],"GlobalQuestions":[{"PlQuestionType":"Edit","Question":"String","TagName":"String","Default":"String","ToolTip":"String","SampleValue":"String","Regex":"String","Minimum":0,"Maximum":0,"Required":false,"Dynamic":false,"PicklistGuid":"String","TemplateGuid":"String","HideDefaultValue":false}],"ScanSettings":{"ScanType":"String","ScanTypeLocked":false,"ScanColour":"String","ScanColourLocked":false,"ScanResolution":"String","ScanResolutionLocked":false,"ScanSide":"String","ScanSideLocked":false,"ScanSize":"String","ScanSizeLocked":false,"ScanOrientation":"String","ScanOrientationLocked":false,"ScanSource":"String","ScanSourceLocked":false,"ScanContinuously":false,"ScanContinuouslyLocked":false,"IsMixedSizes":false,"IsMixedSizesLocked":false,"MinimumPageCount":0,"MaximumPageCount":0}}}