ScannerVision Web Server

<back to all web services

GetConnections

The following routes are available for this service:
GET/connections
import Foundation
import ServiceStack

public class GetConnections : Codable
{
    required public init(){}
}

public class GetConnectionsResponse : Codable
{
    public var connections:[IConnectorConnection] = []
    public var isAuthenticated:Bool

    required public init(){}
}

public protocol IConnectorConnection : IStatus
{
    var connectorId:String { get set }
    var Description:String { get set }
    var id:String { get set }
    var maxConnections:Int { get set }
    var name:String { get set }
    var permissions:ReadOnlyCollection<IConnectionPermission> { get set }
    var propertyDescriptions:ReadOnlyCollection<IConnectionPropertyDescription> { get set }
    //setupUser:IUser ignored. Swift doesn't support interface properties

}

public protocol IConnectionPermission : IInterface
{
    var allow:Bool { get set }
    //connection:IConnectorConnection ignored. Swift doesn't support interface properties
    var type:PermissionType { get set }

}

public enum PermissionType : String, Codable
{
    case Group
    case User
}

public protocol IConnectionPropertyDescription : IInterface
{
    var Description:String { get set }
    var name:String { get set }
    var propertyId:String { get set }
    var propertyType:PropertyType { get set }

}

public enum PropertyType : Int, Codable
{
    case Binary = 1
    case Boolean = 2
    case ConnectionString = 3
    case Credential = 4
    case Integer = 5
    case Picklist = 6
    case String = 7
    case OAuth2 = 8
    case Certificate = 9
}

public protocol IUser : IIdTemplatesItem
{
    var groups:ReadOnlyCollection<IUserGroup> { get set }
    var emailAddress:String { get set }
    var hasPassword:Bool { get set }
    var homeFolder:String { get set }
    var password:String { get set }
    var sbcUser:Bool? { get set }

}

public protocol IUserGroup : IIdTemplatesItem, IGroup
{
    var users:ReadOnlyCollection<IUser> { get set }

}


Swift GetConnections 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.

GET /connections HTTP/1.1 
Host: buildmax.org 
Accept: application/json
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length

{"IsAuthenticated":false}