| POST | /connections |
|---|
import java.math.*
import java.util.*
import net.servicestack.client.*
open class PostConnections
{
var LoginCommand:String? = null
var LogoutCommand:String? = null
var Password:String? = null
var SaveCommand:String? = null
var UserName:String? = null
}
open class GetConnectionsResponse
{
var Connections:ArrayList<IConnectorConnection> = ArrayList<IConnectorConnection>()
var IsAuthenticated:Boolean? = null
}
open interface IConnectorConnection : IStatus
{
var ConnectorId:UUID?
var Description:String?
var Id:String?
var MaxConnections:Int?
var Name:String?
var Permissions:ReadOnlyCollection<IConnectionPermission>?
var PropertyDescriptions:ReadOnlyCollection<IConnectionPropertyDescription>?
var SetupUser:IUser?
}
open interface IConnectionPermission : IInterface
{
var Allow:Boolean?
var Connection:IConnectorConnection?
var Type:PermissionType?
}
enum class PermissionType
{
Group,
User,
}
open interface IConnectionPropertyDescription : IInterface
{
var Description:String?
var Name:String?
var PropertyId:UUID?
var PropertyType:PropertyType?
}
enum class PropertyType(val value:Int)
{
Binary(1),
Boolean(2),
ConnectionString(3),
Credential(4),
Integer(5),
Picklist(6),
String(7),
OAuth2(8),
Certificate(9),
}
open interface IUser : IIdTemplatesItem
{
var Groups:ReadOnlyCollection<IUserGroup>?
var EmailAddress:String?
var HasPassword:Boolean?
var HomeFolder:String?
var Password:String?
var SbcUser:Boolean?
}
open interface IUserGroup : IIdTemplatesItem, IGroup
{
var Users:ReadOnlyCollection<IUser>?
}
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
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: application/json
Content-Type: application/json
Content-Length: length
{"LoginCommand":"String","LogoutCommand":"String","Password":"String","SaveCommand":"String","UserName":"String"}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length
{"IsAuthenticated":false}