| 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()),
});
To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv
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: text/jsv
Content-Type: text/jsv
Content-Length: length
{
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: String,
HasCredentials: False
}