ScannerVision Web Server

<back to all web services

PostConnections

The following routes are available for this service:
POST/connections
import 'package:servicestack/servicestack.dart';
import 'dart:typed_data';

class PostConnections implements IConvertible
{
    String? LoginCommand;
    String? LogoutCommand;
    String? Password;
    String? SaveCommand;
    String? UserName;

    PostConnections({this.LoginCommand,this.LogoutCommand,this.Password,this.SaveCommand,this.UserName});
    PostConnections.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        LoginCommand = json['LoginCommand'];
        LogoutCommand = json['LogoutCommand'];
        Password = json['Password'];
        SaveCommand = json['SaveCommand'];
        UserName = json['UserName'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'LoginCommand': LoginCommand,
        'LogoutCommand': LogoutCommand,
        'Password': Password,
        'SaveCommand': SaveCommand,
        'UserName': UserName
    };

    getTypeName() => "PostConnections";
    TypeContext? context = _ctx;
}

enum PermissionType
{
    Group,
    User,
}

abstract class IConnectionPermission extends IInterface
{
    bool? Allow;
    IConnectorConnection? Connection;
    PermissionType? Type;
}

enum PropertyType
{
    Binary,
    Boolean,
    ConnectionString,
    Credential,
    Integer,
    Picklist,
    String,
    OAuth2,
    Certificate,
}

abstract class IConnectionPropertyDescription extends IInterface
{
    String? Description;
    String? Name;
    String? PropertyId;
    PropertyType? PropertyType;
}

abstract class IUserGroup extends IIdTemplatesItem, IGroup
{
    ReadOnlyCollection<IUser>? Users;
}

abstract class IUser extends IIdTemplatesItem
{
    ReadOnlyCollection<IUserGroup>? Groups;
    String? EmailAddress;
    bool? HasPassword;
    String? HomeFolder;
    String? Password;
    bool? SbcUser;
}

abstract class IConnectorConnection extends IStatus
{
    String? ConnectorId;
    String? Description;
    String? Id;
    int? MaxConnections;
    String? Name;
    ReadOnlyCollection<IConnectionPermission>? Permissions;
    ReadOnlyCollection<IConnectionPropertyDescription>? PropertyDescriptions;
    IUser? SetupUser;
}

class GetConnectionsResponse implements IConvertible
{
    List<IConnectorConnection>? Connections;
    bool? IsAuthenticated;

    GetConnectionsResponse({this.Connections,this.IsAuthenticated});
    GetConnectionsResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        Connections = JsonConverters.fromJson(json['Connections'],'List<IConnectorConnection>',context!);
        IsAuthenticated = json['IsAuthenticated'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'Connections': JsonConverters.toJson(Connections,'List<IConnectorConnection>',context!),
        'IsAuthenticated': IsAuthenticated
    };

    getTypeName() => "GetConnectionsResponse";
    TypeContext? context = _ctx;
}

TypeContext _ctx = TypeContext(library: 'buildmax.org', types: <String, TypeInfo> {
    'PostConnections': TypeInfo(TypeOf.Class, create:() => PostConnections()),
    'PermissionType': TypeInfo(TypeOf.Enum, enumValues:PermissionType.values),
    'IConnectionPermission': TypeInfo(TypeOf.Interface),
    'PropertyType': TypeInfo(TypeOf.Enum, enumValues:PropertyType.values),
    'IConnectionPropertyDescription': TypeInfo(TypeOf.Interface),
    'IUserGroup': TypeInfo(TypeOf.Interface),
    'IUser': TypeInfo(TypeOf.Interface),
    'IConnectorConnection': TypeInfo(TypeOf.Interface),
    'GetConnectionsResponse': TypeInfo(TypeOf.Class, create:() => GetConnectionsResponse()),
    'List<IConnectorConnection>': TypeInfo(TypeOf.Class, create:() => <IConnectorConnection>[]),
});

Dart PostConnections DTOs

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

HTTP + OTHER

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

POST /connections HTTP/1.1 
Host: buildmax.org 
Accept: text/jsonl
Content-Type: text/jsonl
Content-Length: length

{"LoginCommand":"String","LogoutCommand":"String","Password":"String","SaveCommand":"String","UserName":"String"}
HTTP/1.1 200 OK
Content-Type: text/jsonl
Content-Length: length

{Unable to show example output for type 'GetConnectionsResponse' using the custom 'other' filter}No parameterless constructor defined for this object.