Platform Subscription API

<back to all web services

SaveIntegration

Requires Authentication
The following routes are available for this service:
All Verbs/api/integration
import datetime
import decimal
from marshmallow.fields import *
from servicestack import *
from typing import *
from dataclasses import dataclass, field
from dataclasses_json import dataclass_json, LetterCase, Undefined, config
from enum import Enum, IntEnum


# @ApiResponse(Description="Track integration result")
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class SaveIntegrationResponse:
    integration_id: Optional[str] = None
    response_status: Optional[ResponseStatus] = None


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class IntegrationVersion:
    major: int = 0
    minor: int = 0
    build: int = 0
    revision: int = 0


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class IntegrationWinVersion:
    name: Optional[str] = None
    version: Optional[str] = None
    build: int = 0
    service_pack: Optional[str] = None


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class IntegrationFileModel:
    index: int = 0
    name: Optional[str] = None
    content: Optional[str] = None
    content_type: Optional[str] = None
    file_size_k_b: int = 0
    blob_uri: Optional[str] = None
    created_date: datetime.datetime = datetime.datetime(1, 1, 1)
    notes: Optional[str] = None


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class SaveIntegration:
    # @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")
    integration_id: Optional[str] = None
    """
    The integration reference ID which is the gateway packet id.  If the value passed is empty, new packet record will be created.
    """


    # @ApiMember(DataType="string", Description="Name or title of the integration", Name="Title")
    title: Optional[str] = None
    """
    Name or title of the integration
    """


    # @ApiMember(DataType="IntegrationVersion", Description="Version information of the integration module.", Name="Version")
    version: Optional[IntegrationVersion] = None
    """
    Version information of the integration module.
    """


    # @ApiMember(DataType="string", Description="User who requested the integration", Name="User")
    user: Optional[str] = None
    """
    User who requested the integration
    """


    # @ApiMember(DataType="string", Description="Local computer where the integration is performed on", Name="LocalComputer")
    local_computer: Optional[str] = None
    """
    Local computer where the integration is performed on
    """


    # @ApiMember(DataType="IntegrationWinVersion", Description="Windows version information", Name="WinVersion")
    win_version: Optional[IntegrationWinVersion] = None
    """
    Windows version information
    """


    # @ApiMember(DataType="bool", Description="Completed status of the integration", Name="Completed")
    completed: bool = False
    """
    Completed status of the integration
    """


    # @ApiMember(DataType="string", Description="Status of the integration.", Name="Status")
    status: Optional[str] = None
    """
    Status of the integration.
    """


    # @ApiMember(DataType="DateTime", Description="Start date and time of the integration.", Name="StartTime")
    start_time: datetime.datetime = datetime.datetime(1, 1, 1)
    """
    Start date and time of the integration.
    """


    # @ApiMember(DataType="DateTime", Description="End date and time of the integration.", Name="EndTime")
    end_time: datetime.datetime = datetime.datetime(1, 1, 1)
    """
    End date and time of the integration.
    """


    # @ApiMember(DataType="IntegrationFileModel", Description="Settings XML being used in the integration.", Name="SettingsFile")
    settings_file: Optional[IntegrationFileModel] = None
    """
    Settings XML being used in the integration.
    """


    # @ApiMember(DataType="IntegrationFileModel", Description="File (xml) containing the results of the integration", Name="ResultsFile")
    results_file: Optional[IntegrationFileModel] = None
    """
    File (xml) containing the results of the integration
    """


    # @ApiMember(DataType="IntegrationFileModel", Description="File (xml) containing the issues that were identified during integration", Name="IssuesFile")
    issues_file: Optional[IntegrationFileModel] = None
    """
    File (xml) containing the issues that were identified during integration
    """

Python SaveIntegration DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv

HTTP + JSV

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: text/jsv
Content-Type: text/jsv
Content-Length: length

{
	Title: String,
	Version: 
	{
		Major: 0,
		Minor: 0,
		Build: 0,
		Revision: 0
	},
	User: String,
	LocalComputer: String,
	WinVersion: 
	{
		Name: String,
		Version: String,
		Build: 0,
		ServicePack: String
	},
	Completed: False,
	Status: String,
	StartTime: 0001-01-01,
	EndTime: 0001-01-01,
	SettingsFile: 
	{
		index: 0,
		Name: String,
		Content: String,
		ContentType: String,
		FileSizeKB: 0,
		BlobUri: String,
		CreatedDate: 0001-01-01,
		Notes: String
	},
	ResultsFile: 
	{
		index: 0,
		Name: String,
		Content: String,
		ContentType: String,
		FileSizeKB: 0,
		BlobUri: String,
		CreatedDate: 0001-01-01,
		Notes: String
	},
	IssuesFile: 
	{
		index: 0,
		Name: String,
		Content: String,
		ContentType: String,
		FileSizeKB: 0,
		BlobUri: String,
		CreatedDate: 0001-01-01,
		Notes: String
	}
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	ResponseStatus: 
	{
		ErrorCode: String,
		Message: String,
		StackTrace: String,
		Errors: 
		[
			{
				ErrorCode: String,
				FieldName: String,
				Message: String,
				Meta: 
				{
					String: String
				}
			}
		],
		Meta: 
		{
			String: String
		}
	}
}