POST | /integrations/{integrationId}/sync |
---|
import 'package:servicestack/servicestack.dart';
import 'dart:typed_data';
class SyncIntegrationResult implements IConvertible
{
String? log;
SyncIntegrationResult({this.log});
SyncIntegrationResult.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
log = json['log'];
return this;
}
Map<String, dynamic> toJson() => {
'log': log
};
getTypeName() => "SyncIntegrationResult";
TypeContext? context = _ctx;
}
class SyncIntegration implements IConvertible
{
String? integrationId;
SyncIntegration({this.integrationId});
SyncIntegration.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
integrationId = json['integrationId'];
return this;
}
Map<String, dynamic> toJson() => {
'integrationId': integrationId
};
getTypeName() => "SyncIntegration";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'evovoice.io', types: <String, TypeInfo> {
'SyncIntegrationResult': TypeInfo(TypeOf.Class, create:() => SyncIntegrationResult()),
'SyncIntegration': TypeInfo(TypeOf.Class, create:() => SyncIntegration()),
});
To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=xml
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /integrations/{integrationId}/sync HTTP/1.1
Host: evovoice.io
Accept: application/xml
Content-Type: application/xml
Content-Length: length
<SyncIntegration xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Voice.Api.Integrations">
<IntegrationId>String</IntegrationId>
</SyncIntegration>
HTTP/1.1 200 OK Content-Type: application/xml Content-Length: length <SyncIntegrationResult xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Voice.Api.Integrations"> <Log>String</Log> </SyncIntegrationResult>