ScannerVision Web Server

<back to all web services

GetStillScanningv2

Requires Authentication
The following routes are available for this service:
GET/{Brand}/stillscanningv2/{FileNameGuid}
import Foundation
import ServiceStack

public class GetStillScanningv2 : RequestBase
{
    public var fileNameGuid:String

    required public init(){ super.init() }

    private enum CodingKeys : String, CodingKey {
        case fileNameGuid
    }

    required public init(from decoder: Decoder) throws {
        try super.init(from: decoder)
        let container = try decoder.container(keyedBy: CodingKeys.self)
        fileNameGuid = try container.decodeIfPresent(String.self, forKey: .fileNameGuid)
    }

    public override func encode(to encoder: Encoder) throws {
        try super.encode(to: encoder)
        var container = encoder.container(keyedBy: CodingKeys.self)
        if fileNameGuid != nil { try container.encode(fileNameGuid, forKey: .fileNameGuid) }
    }
}

public class RequestBase : DtoBase
{
    required public init(){ super.init() }

    required public init(from decoder: Decoder) throws {
        try super.init(from: decoder)
    }

    public override func encode(to encoder: Encoder) throws {
        try super.encode(to: encoder)
    }
}

public class DtoBase : Codable
{
    public var brand:Brand

    required public init(){}
}

public enum Brand : String, Codable
{
    case Desktop
    case Hp
    case Kyocera
    case NeaScan
    case Samsung
    case FujiXerox
    case Ta
    case Utax
    case Epson
    case ScanFront400
    case Sharp
    case Ricoh
    case FujiFilm
}


Swift GetStillScanningv2 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 /{Brand}/stillscanningv2/{FileNameGuid} HTTP/1.1 
Host: buildmax.org 
Accept: text/jsv