| POST | /connections |
|---|
import java.math.*;
import java.util.*;
import net.servicestack.client.*;
public class dtos
{
public static class PostConnections
{
public String LoginCommand = null;
public String LogoutCommand = null;
public String Password = null;
public String SaveCommand = null;
public String UserName = null;
public String getLoginCommand() { return LoginCommand; }
public PostConnections setLoginCommand(String value) { this.LoginCommand = value; return this; }
public String getLogoutCommand() { return LogoutCommand; }
public PostConnections setLogoutCommand(String value) { this.LogoutCommand = value; return this; }
public String getPassword() { return Password; }
public PostConnections setPassword(String value) { this.Password = value; return this; }
public String getSaveCommand() { return SaveCommand; }
public PostConnections setSaveCommand(String value) { this.SaveCommand = value; return this; }
public String getUserName() { return UserName; }
public PostConnections setUserName(String value) { this.UserName = value; return this; }
}
public static class GetConnectionsResponse
{
public ArrayList<IConnectorConnection> Connections = null;
public Boolean IsAuthenticated = null;
public ArrayList<IConnectorConnection> getConnections() { return Connections; }
public GetConnectionsResponse setConnections(ArrayList<IConnectorConnection> value) { this.Connections = value; return this; }
public Boolean getIsAuthenticated() { return IsAuthenticated; }
public GetConnectionsResponse setIsAuthenticated(Boolean value) { this.IsAuthenticated = value; return this; }
}
public static interface IConnectorConnection implements IStatus
{
public UUID ConnectorId = null;
public String Description = null;
public String Id = null;
public Integer MaxConnections = null;
public String Name = null;
public ReadOnlyCollection<IConnectionPermission> Permissions = null;
public ReadOnlyCollection<IConnectionPropertyDescription> PropertyDescriptions = null;
public IUser SetupUser = null;
}
public static interface IConnectionPermission implements IInterface
{
public Boolean Allow = null;
public IConnectorConnection Connection = null;
public PermissionType Type = null;
}
public static enum PermissionType
{
Group,
User;
}
public static interface IConnectionPropertyDescription implements IInterface
{
public String Description = null;
public String Name = null;
public UUID PropertyId = null;
public PropertyType PropertyType = null;
}
public static enum PropertyType
{
Binary(1),
Boolean(2),
ConnectionString(3),
Credential(4),
Integer(5),
Picklist(6),
String(7),
OAuth2(8),
Certificate(9);
private final int value;
PropertyType(final int intValue) { value = intValue; }
public int getValue() { return value; }
}
public static interface IUser implements IIdTemplatesItem
{
public ReadOnlyCollection<IUserGroup> Groups = null;
public String EmailAddress = null;
public Boolean HasPassword = null;
public String HomeFolder = null;
public String Password = null;
public Boolean SbcUser = null;
}
public static interface IUserGroup implements IIdTemplatesItem, IGroup
{
public ReadOnlyCollection<IUser> Users = null;
}
}
To override the Content-type in your clients, use the HTTP Accept Header, append the .csv suffix or ?format=csv
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/csv
Content-Type: text/csv
Content-Length: length
{"LoginCommand":"String","LogoutCommand":"String","Password":"String","SaveCommand":"String","UserName":"String"}
HTTP/1.1 200 OK
Content-Type: text/csv
Content-Length: length
{Unable to show example output for type 'GetConnectionsResponse' using the custom 'csv' filter}No parameterless constructor defined for this object.