Retrieves a list of all existing Touchstone®
Projects for a given
Business Unit and
SQL Server Instance.
Parameters
- request
- Contains a GetProjectsRequest that identifies the Touchstone-generated Business Unit Sequential Identifier (SID) and SQL Instance SID associated with the list of Projects that you want to retrieve.
Return Value
A
GetProjectsResponse containing a
list of Projects in the specified SQL Server Instance in the specified Business Unit.
The following example shows how to retrieve a list of all Touchstone Projects for a given Business Unit and SQL Server Instance using the
GetProjects()
method:
using System;
using AIR.Services.Common.Data;
using AIR.Services.ProjectManagement.Api;
using AIR.Services.ProjectManagement.Data;
class SnippetGetProjectsRequest
{
private static void GetProjects(int businessUnitSid, int sqlInstanceSid)
{
ProjectManagementServiceClient projectClient = new ProjectManagementServiceClient();
GetProjectsRequest request = new GetProjectsRequest();
request.BusinessUnitSid = businessUnitSid;
request.SqlInstanceSid = sqlInstanceSid;
GetProjectsResponse response = projectClient.GetProjects(request);
if (response.Status.Code == StatusCode.Success)
{
foreach (Project project in response.Projects)
{
Console.WriteLine("SID: " + project.Sid);
Console.WriteLine("Name: " + project.Name);
Console.WriteLine("Total Exposure Sets: " + project.ExposureSetCount);
Console.WriteLine("Total Exposure Views: " + project.ExposureViewCount);
Console.WriteLine("Total Result Sets: " + project.ResultSetCount);
}
}
}
}
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