Platform Subscription API

<back to all web services

SaveIntegration

Requires Authentication
The following routes are available for this service:
All Verbs/api/integration
import 'package:servicestack/servicestack.dart';
import 'dart:typed_data';

// @ApiResponse(Description="Track integration result")
class SaveIntegrationResponse implements IConvertible
{
    String? IntegrationId;
    ResponseStatus? ResponseStatus;

    SaveIntegrationResponse({this.IntegrationId,this.ResponseStatus});
    SaveIntegrationResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        IntegrationId = json['IntegrationId'];
        ResponseStatus = JsonConverters.fromJson(json['ResponseStatus'],'ResponseStatus',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'IntegrationId': IntegrationId,
        'ResponseStatus': JsonConverters.toJson(ResponseStatus,'ResponseStatus',context!)
    };

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

class IntegrationVersion implements IConvertible
{
    int? Major;
    int? Minor;
    int? Build;
    int? Revision;

    IntegrationVersion({this.Major,this.Minor,this.Build,this.Revision});
    IntegrationVersion.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        Major = json['Major'];
        Minor = json['Minor'];
        Build = json['Build'];
        Revision = json['Revision'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'Major': Major,
        'Minor': Minor,
        'Build': Build,
        'Revision': Revision
    };

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

class IntegrationWinVersion implements IConvertible
{
    String? Name;
    String? Version;
    int? Build;
    String? ServicePack;

    IntegrationWinVersion({this.Name,this.Version,this.Build,this.ServicePack});
    IntegrationWinVersion.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        Name = json['Name'];
        Version = json['Version'];
        Build = json['Build'];
        ServicePack = json['ServicePack'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'Name': Name,
        'Version': Version,
        'Build': Build,
        'ServicePack': ServicePack
    };

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

class IntegrationFileModel implements IConvertible
{
    int? index;
    String? Name;
    String? Content;
    String? ContentType;
    int? FileSizeKB;
    String? BlobUri;
    DateTime? CreatedDate;
    String? Notes;

    IntegrationFileModel({this.index,this.Name,this.Content,this.ContentType,this.FileSizeKB,this.BlobUri,this.CreatedDate,this.Notes});
    IntegrationFileModel.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        index = json['index'];
        Name = json['Name'];
        Content = json['Content'];
        ContentType = json['ContentType'];
        FileSizeKB = json['FileSizeKB'];
        BlobUri = json['BlobUri'];
        CreatedDate = JsonConverters.fromJson(json['CreatedDate'],'DateTime',context!);
        Notes = json['Notes'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'index': index,
        'Name': Name,
        'Content': Content,
        'ContentType': ContentType,
        'FileSizeKB': FileSizeKB,
        'BlobUri': BlobUri,
        'CreatedDate': JsonConverters.toJson(CreatedDate,'DateTime',context!),
        'Notes': Notes
    };

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

class SaveIntegration implements IConvertible
{
    /**
    * The integration reference ID which is the gateway packet id.  If the value passed is empty, new packet record will be created.
    */
    // @ApiMember(DataType="Guid?", Description="The integration reference ID which is the gateway packet id.  If the value passed is empty, new packet record will be created.", Name="IntegrationId")
    String? IntegrationId;

    /**
    * Name or title of the integration
    */
    // @ApiMember(DataType="string", Description="Name or title of the integration", Name="Title")
    String? Title;

    /**
    * Version information of the integration module.
    */
    // @ApiMember(DataType="IntegrationVersion", Description="Version information of the integration module.", Name="Version")
    IntegrationVersion? Version;

    /**
    * User who requested the integration
    */
    // @ApiMember(DataType="string", Description="User who requested the integration", Name="User")
    String? User;

    /**
    * Local computer where the integration is performed on
    */
    // @ApiMember(DataType="string", Description="Local computer where the integration is performed on", Name="LocalComputer")
    String? LocalComputer;

    /**
    * Windows version information
    */
    // @ApiMember(DataType="IntegrationWinVersion", Description="Windows version information", Name="WinVersion")
    IntegrationWinVersion? WinVersion;

    /**
    * Completed status of the integration
    */
    // @ApiMember(DataType="bool", Description="Completed status of the integration", Name="Completed")
    bool? Completed;

    /**
    * Status of the integration.
    */
    // @ApiMember(DataType="string", Description="Status of the integration.", Name="Status")
    String? Status;

    /**
    * Start date and time of the integration.
    */
    // @ApiMember(DataType="DateTime", Description="Start date and time of the integration.", Name="StartTime")
    DateTime? StartTime;

    /**
    * End date and time of the integration.
    */
    // @ApiMember(DataType="DateTime", Description="End date and time of the integration.", Name="EndTime")
    DateTime? EndTime;

    /**
    * Settings XML being used in the integration.
    */
    // @ApiMember(DataType="IntegrationFileModel", Description="Settings XML being used in the integration.", Name="SettingsFile")
    IntegrationFileModel? SettingsFile;

    /**
    * File (xml) containing the results of the integration
    */
    // @ApiMember(DataType="IntegrationFileModel", Description="File (xml) containing the results of the integration", Name="ResultsFile")
    IntegrationFileModel? ResultsFile;

    /**
    * File (xml) containing the issues that were identified during integration
    */
    // @ApiMember(DataType="IntegrationFileModel", Description="File (xml) containing the issues that were identified during integration", Name="IssuesFile")
    IntegrationFileModel? IssuesFile;

    SaveIntegration({this.IntegrationId,this.Title,this.Version,this.User,this.LocalComputer,this.WinVersion,this.Completed,this.Status,this.StartTime,this.EndTime,this.SettingsFile,this.ResultsFile,this.IssuesFile});
    SaveIntegration.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        IntegrationId = json['IntegrationId'];
        Title = json['Title'];
        Version = JsonConverters.fromJson(json['Version'],'IntegrationVersion',context!);
        User = json['User'];
        LocalComputer = json['LocalComputer'];
        WinVersion = JsonConverters.fromJson(json['WinVersion'],'IntegrationWinVersion',context!);
        Completed = json['Completed'];
        Status = json['Status'];
        StartTime = JsonConverters.fromJson(json['StartTime'],'DateTime',context!);
        EndTime = JsonConverters.fromJson(json['EndTime'],'DateTime',context!);
        SettingsFile = JsonConverters.fromJson(json['SettingsFile'],'IntegrationFileModel',context!);
        ResultsFile = JsonConverters.fromJson(json['ResultsFile'],'IntegrationFileModel',context!);
        IssuesFile = JsonConverters.fromJson(json['IssuesFile'],'IntegrationFileModel',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'IntegrationId': IntegrationId,
        'Title': Title,
        'Version': JsonConverters.toJson(Version,'IntegrationVersion',context!),
        'User': User,
        'LocalComputer': LocalComputer,
        'WinVersion': JsonConverters.toJson(WinVersion,'IntegrationWinVersion',context!),
        'Completed': Completed,
        'Status': Status,
        'StartTime': JsonConverters.toJson(StartTime,'DateTime',context!),
        'EndTime': JsonConverters.toJson(EndTime,'DateTime',context!),
        'SettingsFile': JsonConverters.toJson(SettingsFile,'IntegrationFileModel',context!),
        'ResultsFile': JsonConverters.toJson(ResultsFile,'IntegrationFileModel',context!),
        'IssuesFile': JsonConverters.toJson(IssuesFile,'IntegrationFileModel',context!)
    };

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

TypeContext _ctx = TypeContext(library: 'production_eros_platform_apisubscription.azurewebsites.net', types: <String, TypeInfo> {
    'SaveIntegrationResponse': TypeInfo(TypeOf.Class, create:() => SaveIntegrationResponse()),
    'IntegrationVersion': TypeInfo(TypeOf.Class, create:() => IntegrationVersion()),
    'IntegrationWinVersion': TypeInfo(TypeOf.Class, create:() => IntegrationWinVersion()),
    'IntegrationFileModel': TypeInfo(TypeOf.Class, create:() => IntegrationFileModel()),
    'SaveIntegration': TypeInfo(TypeOf.Class, create:() => SaveIntegration()),
});

Dart SaveIntegration 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 /api/integration HTTP/1.1 
Host: production-eros-platform-apisubscription.azurewebsites.net 
Accept: application/xml
Content-Type: application/xml
Content-Length: length

<SaveIntegration xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Eros.Subtle.Canvara.WebAPIModel.ServiceModel">
  <Completed>false</Completed>
  <EndTime>0001-01-01T00:00:00</EndTime>
  <IntegrationId>00000000-0000-0000-0000-000000000000</IntegrationId>
  <IssuesFile xmlns:d2p1="http://schemas.datacontract.org/2004/07/Eros.Causal.Common.Entity">
    <d2p1:BlobUri>String</d2p1:BlobUri>
    <d2p1:Content>String</d2p1:Content>
    <d2p1:ContentType>String</d2p1:ContentType>
    <d2p1:CreatedDate>0001-01-01T00:00:00</d2p1:CreatedDate>
    <d2p1:FileSizeKB>0</d2p1:FileSizeKB>
    <d2p1:Name>String</d2p1:Name>
    <d2p1:Notes>String</d2p1:Notes>
    <d2p1:index>0</d2p1:index>
  </IssuesFile>
  <LocalComputer>String</LocalComputer>
  <ResultsFile xmlns:d2p1="http://schemas.datacontract.org/2004/07/Eros.Causal.Common.Entity">
    <d2p1:BlobUri>String</d2p1:BlobUri>
    <d2p1:Content>String</d2p1:Content>
    <d2p1:ContentType>String</d2p1:ContentType>
    <d2p1:CreatedDate>0001-01-01T00:00:00</d2p1:CreatedDate>
    <d2p1:FileSizeKB>0</d2p1:FileSizeKB>
    <d2p1:Name>String</d2p1:Name>
    <d2p1:Notes>String</d2p1:Notes>
    <d2p1:index>0</d2p1:index>
  </ResultsFile>
  <SettingsFile xmlns:d2p1="http://schemas.datacontract.org/2004/07/Eros.Causal.Common.Entity">
    <d2p1:BlobUri>String</d2p1:BlobUri>
    <d2p1:Content>String</d2p1:Content>
    <d2p1:ContentType>String</d2p1:ContentType>
    <d2p1:CreatedDate>0001-01-01T00:00:00</d2p1:CreatedDate>
    <d2p1:FileSizeKB>0</d2p1:FileSizeKB>
    <d2p1:Name>String</d2p1:Name>
    <d2p1:Notes>String</d2p1:Notes>
    <d2p1:index>0</d2p1:index>
  </SettingsFile>
  <StartTime>0001-01-01T00:00:00</StartTime>
  <Status>String</Status>
  <Title>String</Title>
  <User>String</User>
  <Version xmlns:d2p1="http://schemas.datacontract.org/2004/07/Eros.Causal.Common.Entity">
    <d2p1:Build>0</d2p1:Build>
    <d2p1:Major>0</d2p1:Major>
    <d2p1:Minor>0</d2p1:Minor>
    <d2p1:Revision>0</d2p1:Revision>
  </Version>
  <WinVersion xmlns:d2p1="http://schemas.datacontract.org/2004/07/Eros.Causal.Common.Entity">
    <d2p1:Build>0</d2p1:Build>
    <d2p1:Name>String</d2p1:Name>
    <d2p1:ServicePack>String</d2p1:ServicePack>
    <d2p1:Version>String</d2p1:Version>
  </WinVersion>
</SaveIntegration>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<SaveIntegrationResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Eros.Subtle.Canvara.WebAPIModel.ServiceModel">
  <IntegrationId>00000000-0000-0000-0000-000000000000</IntegrationId>
  <ResponseStatus xmlns:d2p1="http://schemas.servicestack.net/types">
    <d2p1:ErrorCode>String</d2p1:ErrorCode>
    <d2p1:Message>String</d2p1:Message>
    <d2p1:StackTrace>String</d2p1:StackTrace>
    <d2p1:Errors>
      <d2p1:ResponseError>
        <d2p1:ErrorCode>String</d2p1:ErrorCode>
        <d2p1:FieldName>String</d2p1:FieldName>
        <d2p1:Message>String</d2p1:Message>
        <d2p1:Meta xmlns:d5p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
          <d5p1:KeyValueOfstringstring>
            <d5p1:Key>String</d5p1:Key>
            <d5p1:Value>String</d5p1:Value>
          </d5p1:KeyValueOfstringstring>
        </d2p1:Meta>
      </d2p1:ResponseError>
    </d2p1:Errors>
    <d2p1:Meta xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
      <d3p1:KeyValueOfstringstring>
        <d3p1:Key>String</d3p1:Key>
        <d3p1:Value>String</d3p1:Value>
      </d3p1:KeyValueOfstringstring>
    </d2p1:Meta>
  </ResponseStatus>
</SaveIntegrationResponse>