Field Squared API Services

<back to all web services

ExternalConnection

Used to register connection details for external systems.
Supported ConnectionTypes: 'Database'. Supported DatabaseTypes: 'SqlServer'

The following routes are available for this service:
GET,POST,DELETE/{Workspace}/ExternalConnection/{ObjectId}
GET/{Workspace}/ExternalConnection
import 'package:servicestack/servicestack.dart';

/**
* Used to register connection details for external systems. Supported ConnectionTypes: 'Database'.   Supported DatabaseTypes: 'SqlServer'
*/
class ExternalConnection implements IConvertible
{
    String? Workspace;
    String? ObjectId;
    String? Name;
    String? Description;
    String? ConnectionType;
    String? DatabaseType;
    String? Server;
    String? Port;
    String? Database;
    String? UserId;
    String? Password;
    String? AuthorizationType;
    String? BaseUrl;
    String? HttpHeaders;
    String? LastUpdated;
    bool? HasCredentials;

    ExternalConnection({this.Workspace,this.ObjectId,this.Name,this.Description,this.ConnectionType,this.DatabaseType,this.Server,this.Port,this.Database,this.UserId,this.Password,this.AuthorizationType,this.BaseUrl,this.HttpHeaders,this.LastUpdated,this.HasCredentials});
    ExternalConnection.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        Workspace = json['Workspace'];
        ObjectId = json['ObjectId'];
        Name = json['Name'];
        Description = json['Description'];
        ConnectionType = json['ConnectionType'];
        DatabaseType = json['DatabaseType'];
        Server = json['Server'];
        Port = json['Port'];
        Database = json['Database'];
        UserId = json['UserId'];
        Password = json['Password'];
        AuthorizationType = json['AuthorizationType'];
        BaseUrl = json['BaseUrl'];
        HttpHeaders = json['HttpHeaders'];
        LastUpdated = json['LastUpdated'];
        HasCredentials = json['HasCredentials'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'Workspace': Workspace,
        'ObjectId': ObjectId,
        'Name': Name,
        'Description': Description,
        'ConnectionType': ConnectionType,
        'DatabaseType': DatabaseType,
        'Server': Server,
        'Port': Port,
        'Database': Database,
        'UserId': UserId,
        'Password': Password,
        'AuthorizationType': AuthorizationType,
        'BaseUrl': BaseUrl,
        'HttpHeaders': HttpHeaders,
        'LastUpdated': LastUpdated,
        'HasCredentials': HasCredentials
    };

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

TypeContext _ctx = TypeContext(library: 'dev.fieldsquared.com', types: <String, TypeInfo> {
    'ExternalConnection': TypeInfo(TypeOf.Class, create:() => ExternalConnection()),
});

Dart ExternalConnection DTOs

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

HTTP + XML

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

POST /{Workspace}/ExternalConnection/{ObjectId} HTTP/1.1 
Host: dev.fieldsquared.com 
Accept: application/xml
Content-Type: application/xml
Content-Length: length

<ExternalConnection xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Field2Office.API.Model.Integration">
  <AuthorizationType>String</AuthorizationType>
  <BaseUrl>String</BaseUrl>
  <ConnectionType>String</ConnectionType>
  <Database>String</Database>
  <DatabaseType>String</DatabaseType>
  <Description>String</Description>
  <HasCredentials>false</HasCredentials>
  <HttpHeaders>String</HttpHeaders>
  <LastUpdated>String</LastUpdated>
  <Name>String</Name>
  <ObjectId>String</ObjectId>
  <Password>String</Password>
  <Port>String</Port>
  <Server>String</Server>
  <UserId>String</UserId>
  <Workspace>String</Workspace>
</ExternalConnection>