Touchstone Re 2023 API Reference
GetMappingSets Method
Example 


Air.Services.Proxy Assembly > (Global) Namespace > MappingSetManagementServiceClient Class : GetMappingSets Method
Contains a GetMappingSetsRequest that identifies the Touchstone-generated Business Unit Sequential Identifier (SID) and SQL Instance SID associated with the list of Mapping Sets that you want to retrieve.
Retrieves a list of all existing Touchstone® Mapping Sets for a given Business Unit and SQL Server Instance.

You create Mapping sets in the Touchstone application, and these Mapping Sets are required for importing comma separated values (CSV) data files into Touchstone using AIR ImportExpress™.

Syntax
Public Function GetMappingSets( _
   ByVal request As GetMappingSetsRequest _
) As GetMappingSetsResponse
Dim instance As MappingSetManagementServiceClient
Dim request As GetMappingSetsRequest
Dim value As GetMappingSetsResponse
 
value = instance.GetMappingSets(request)
public GetMappingSetsResponse GetMappingSets( 
   GetMappingSetsRequest request
)

Parameters

request
Contains a GetMappingSetsRequest that identifies the Touchstone-generated Business Unit Sequential Identifier (SID) and SQL Instance SID associated with the list of Mapping Sets that you want to retrieve.

Return Value

A GetMappingSetsResponse containing a list of Mapping Sets in the specified SQL Server Instance in the specified Business Unit.
Remarks
To find the Business Unit SID to pass into this method, call the GetBusinessUnits() method.

To find the SQL Instance SID to pass into this method, call the GetSqlInstances() method.

Example
The following example shows how to retrieve a list of all Touchstone Mapping Sets for a given Business Unit and SQL Server Instance using the GetMappingSets() method:
using System;
using AIR.Services.Common.Data;
using AIR.Services.DataImport.MappingSetManagement.Api;
using AIR.Services.DataImport.MappingSetManagement.Data;
            
class SnippetGetMappingSetsRequest
{
    private static void GetMappingSets(int businessUnitSid, int sqlInstanceSid)
    {
        MappingSetManagementServiceClient mappingClient = new MappingSetManagementServiceClient();
        GetMappingSetsRequest request = new GetMappingSetsRequest();
        request.BusinessUnitSid = businessUnitSid;
        request.SqlInstanceSid = sqlInstanceSid;
        GetMappingSetsResponse response = mappingClient.GetMappingSets(request);
        if (response.Status.Code == StatusCode.Success)
        {
            foreach (MappingSetSummary mappingSet in response.MappingSetSummaries)
            {
                Console.WriteLine("SID: " + mappingSet.MappingSetSid);
                Console.WriteLine("Name: " + mappingSet.Name);
            }
        }
    }
}
Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

MappingSetManagementServiceClient Class
MappingSetManagementServiceClient Members