Table of Contents

ReportApi

Method Description
GenerateHtmlZipAsync Generates a report for the specified connection in PDF, Word, or HTML zip format.
GeneratePdfAsync Generates a report for the specified connection in PDF, Word, or HTML zip format.
GeneratePdfForMutlipleAsync Generates a report for multiple connections in PDF or Word format.
GenerateWordAsync Generates a report for the specified connection in PDF, Word, or HTML zip format.
GenerateWordForMultipleAsync Generates a report for multiple connections in PDF or Word format.

GenerateHtmlZipAsync

void GenerateHtmlZipAsync (Guid projectId, int connectionId)

Generates a report for the specified connection in PDF, Word, or HTML zip format.

Extension Methods

This operation has an avaliable client extension method. Refer to code samples for extension method usage.

SaveReport(...)

Parameters

Name Type Description Notes
projectId Guid The unique identifier of the opened project.
connectionId int The ID of the connection to report.

Return type

void (empty response body)

Example

Note: this example is autogenerated.

using System;
using System.Collections.Generic;
using System.Diagnostics;
using IdeaStatiCa.ConnectionApi.Api;
using IdeaStatiCa.ConnectionApi.Client;
using IdeaStatiCa.ConnectionApi.Model;

namespace Example
{
    public class GenerateHtmlZipAsyncExample
    {
        public static async Task Main()
        {
            string ideaConFile = "testCon.ideaCon";
            
            string ideaStatiCaPath = "C:\\Program Files\\IDEA StatiCa\\StatiCa 26.0"; // Path to the IdeaStatiCa.ConnectionRestApi.exe
            
            using (var clientFactory = new ConnectionApiServiceRunner(ideaStatiCaPath))
            {
                using (var conClient = await clientFactory.CreateApiClient())
                {

                    // Open the project and get its id
                    var projData = await conClient.Project.OpenProjectAsync(ideaConFile);
                    Guid projectId = projData.ProjectId;
                    
                    // (Required) Select parameters
                    connectionId = 56;  // int | The ID of the connection to report.

                    try
                    {
                        // Generates a report for the specified connection in PDF, Word, or HTML zip format.
                        conClient.Report.GenerateHtmlZipAsync(projectId, connectionId);
                    }
                    catch (ApiException  e)
                    {
                        Console.WriteLine("Exception when calling Report.GenerateHtmlZipAsync: " + e.Message);
                        Console.WriteLine("Status Code: " + e.ErrorCode);
                        Console.WriteLine(e.StackTrace);
                    }
                    finally
                    {
                        await conClient.Project.CloseProjectAsync(projectId);
                    }
                }
            }
        }
    }
}

Code Samples

using IdeaStatiCa.ConnectionApi;

namespace CodeSamples
{
    public partial class ClientExamples
    {
        /// <summary>
        /// Generates the report of a given connection in HTML format and saves it as a zip file.
        /// </summary>
        /// <param name="conClient">The connected API Client</param>
        public static async Task GenerateHtmlZip(IConnectionApiClient conClient)
        {
            string filePath = "Inputs/simple cleat connection.ideaCon";
            await conClient.Project.OpenProjectAsync(filePath);

            var connections = await conClient.Connection.GetConnectionsAsync(conClient.ActiveProjectId);
            int connectionId = connections[0].Id;

            string exampleFolder = GetExampleFolderPathOnDesktop("GenerateReport");

            string fileName = "simple cleat connection report.zip";
            string zipFilePath = Path.Combine(exampleFolder, fileName);

            //Generate the report in HTML format and get its content as a byte array.
            var response = await conClient.Report.GenerateHtmlZipWithHttpInfoAsync(conClient.ActiveProjectId, connectionId, "application/octet-stream");
            byte[] buffer = (byte[])response.Data;

            //Save the zipped HTML report.
            await File.WriteAllBytesAsync(zipFilePath, buffer);

            Console.WriteLine($"Report saved to: {zipFilePath}");

            //Close the opened project.
            await conClient.Project.CloseProjectAsync(conClient.ActiveProjectId);
        }
    }
}

Looking for a code sample? request some help on our discussion page.

REST Usage

Http Request

All URIs are relative to http://localhost

GET /api/5/projects/{projectId}/connections/{connectionId}/reports/htmlZip

Using the GenerateHtmlZipWithHttpInfo variant

This returns an ApiResponse object which contains the response data, status code and headers.

try
{
    // Generates a report for the specified connection in PDF, Word, or HTML zip format.
    conClient.Report.GenerateHtmlZipWithHttpInfo(projectId, connectionId);
}
catch (ApiException e)
{
    Debug.Print("Exception when calling ReportApi.GenerateHtmlZipWithHttpInfo: " + e.Message);
    Debug.Print("Status Code: " + e.ErrorCode);
    Debug.Print(e.StackTrace);
}

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: text/plain, application/json, text/json

HTTP response details

Status code Description Response headers
200 OK -
401 Unauthorized -
404 Not Found -
500 Internal Server Error -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

GeneratePdfAsync

void GeneratePdfAsync (Guid projectId, int connectionId)

Generates a report for the specified connection in PDF, Word, or HTML zip format.

Extension Methods

This operation has an avaliable client extension method. Refer to code samples for extension method usage.

SaveReportPdf(...)

Parameters

Name Type Description Notes
projectId Guid The unique identifier of the opened project.
connectionId int The ID of the connection to report.

Return type

void (empty response body)

Example

Note: this example is autogenerated.

using System;
using System.Collections.Generic;
using System.Diagnostics;
using IdeaStatiCa.ConnectionApi.Api;
using IdeaStatiCa.ConnectionApi.Client;
using IdeaStatiCa.ConnectionApi.Model;

namespace Example
{
    public class GeneratePdfAsyncExample
    {
        public static async Task Main()
        {
            string ideaConFile = "testCon.ideaCon";
            
            string ideaStatiCaPath = "C:\\Program Files\\IDEA StatiCa\\StatiCa 26.0"; // Path to the IdeaStatiCa.ConnectionRestApi.exe
            
            using (var clientFactory = new ConnectionApiServiceRunner(ideaStatiCaPath))
            {
                using (var conClient = await clientFactory.CreateApiClient())
                {

                    // Open the project and get its id
                    var projData = await conClient.Project.OpenProjectAsync(ideaConFile);
                    Guid projectId = projData.ProjectId;
                    
                    // (Required) Select parameters
                    connectionId = 56;  // int | The ID of the connection to report.

                    try
                    {
                        // Generates a report for the specified connection in PDF, Word, or HTML zip format.
                        conClient.Report.GeneratePdfAsync(projectId, connectionId);
                    }
                    catch (ApiException  e)
                    {
                        Console.WriteLine("Exception when calling Report.GeneratePdfAsync: " + e.Message);
                        Console.WriteLine("Status Code: " + e.ErrorCode);
                        Console.WriteLine(e.StackTrace);
                    }
                    finally
                    {
                        await conClient.Project.CloseProjectAsync(projectId);
                    }
                }
            }
        }
    }
}

Code Samples

using IdeaStatiCa.ConnectionApi;

namespace CodeSamples
{
    public partial class ClientExamples
    {
        /// <summary>
        /// Save the pdf report of a given connection.
        /// </summary>
        /// <param name="conClient">The connected API Client</param>
        public static async Task SaveReport_Pdf(IConnectionApiClient conClient)
        {
            string filePath = "Inputs/simple cleat connection.ideaCon";
            await conClient.Project.OpenProjectAsync(filePath);

            var connections = await conClient.Connection.GetConnectionsAsync(conClient.ActiveProjectId);
            int connectionId = connections[0].Id;

            string exampleFolder = GetExampleFolderPathOnDesktop("GenerateReport");

            // Save updated file.
            string fileName = "simple cleat connection.pdf";
            string pdfFilePath = Path.Combine(exampleFolder, fileName);

            //Save Report to PDF
            await conClient.Report.SaveReportPdfAsync(conClient.ActiveProjectId, connectionId, pdfFilePath);

            Console.WriteLine($"Report saved to: {pdfFilePath}");

            //Close the opened project.
            await conClient.Project.CloseProjectAsync(conClient.ActiveProjectId);
        }
    }
}

Looking for a code sample? request some help on our discussion page.

REST Usage

Http Request

All URIs are relative to http://localhost

GET /api/5/projects/{projectId}/connections/{connectionId}/reports/pdf

Using the GeneratePdfWithHttpInfo variant

This returns an ApiResponse object which contains the response data, status code and headers.

try
{
    // Generates a report for the specified connection in PDF, Word, or HTML zip format.
    conClient.Report.GeneratePdfWithHttpInfo(projectId, connectionId);
}
catch (ApiException e)
{
    Debug.Print("Exception when calling ReportApi.GeneratePdfWithHttpInfo: " + e.Message);
    Debug.Print("Status Code: " + e.ErrorCode);
    Debug.Print(e.StackTrace);
}

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: text/plain, application/json, text/json

HTTP response details

Status code Description Response headers
200 OK -
401 Unauthorized -
404 Not Found -
500 Internal Server Error -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

GeneratePdfForMutlipleAsync

void GeneratePdfForMutlipleAsync (Guid projectId, List requestBody)

Generates a report for multiple connections in PDF or Word format.

Extension Methods

This operation has an avaliable client extension method. Refer to code samples for extension method usage.

SaveReportPdf(...)

Parameters

Name Type Description Notes
projectId Guid The unique identifier of the opened project.
requestBody List<int> List of connection IDs to include in the report.

Return type

void (empty response body)

Example

Note: this example is autogenerated.

using System;
using System.Collections.Generic;
using System.Diagnostics;
using IdeaStatiCa.ConnectionApi.Api;
using IdeaStatiCa.ConnectionApi.Client;
using IdeaStatiCa.ConnectionApi.Model;

namespace Example
{
    public class GeneratePdfForMutlipleAsyncExample
    {
        public static async Task Main()
        {
            string ideaConFile = "testCon.ideaCon";
            
            string ideaStatiCaPath = "C:\\Program Files\\IDEA StatiCa\\StatiCa 26.0"; // Path to the IdeaStatiCa.ConnectionRestApi.exe
            
            using (var clientFactory = new ConnectionApiServiceRunner(ideaStatiCaPath))
            {
                using (var conClient = await clientFactory.CreateApiClient())
                {

                    // Open the project and get its id
                    var projData = await conClient.Project.OpenProjectAsync(ideaConFile);
                    Guid projectId = projData.ProjectId;
                    
                    // (Required) Select parameters
                    var requestBody = new List<int>(); // List<int> | List of connection IDs to include in the report.

                    try
                    {
                        // Generates a report for multiple connections in PDF or Word format.
                        conClient.Report.GeneratePdfForMutlipleAsync(projectId, requestBody);
                    }
                    catch (ApiException  e)
                    {
                        Console.WriteLine("Exception when calling Report.GeneratePdfForMutlipleAsync: " + e.Message);
                        Console.WriteLine("Status Code: " + e.ErrorCode);
                        Console.WriteLine(e.StackTrace);
                    }
                    finally
                    {
                        await conClient.Project.CloseProjectAsync(projectId);
                    }
                }
            }
        }
    }
}

Code Samples

using IdeaStatiCa.ConnectionApi;

namespace CodeSamples
{
    public partial class ClientExamples
    {
        /// <summary>
        /// Generates one PDF report for multiple connections in the project. The generated PDF contains one section per each connection report.
        /// Uses the SaveMultipleReportsPdfAsync client extension method which wraps the GeneratePdfForMutliple operation.
        /// </summary>
        /// <param name="conClient">The connected API Client</param>
        public static async Task GeneratePdfForMutliple(IConnectionApiClient conClient)
        {
            string filePath = "Inputs/User_testing_end_v23_1.ideaCon";
            await conClient.Project.OpenProjectAsync(filePath);

            //Get all connections in the project and request the report for all of them.
            var connections = await conClient.Connection.GetConnectionsAsync(conClient.ActiveProjectId);
            List<int> connectionIds = connections.Select(c => c.Id).ToList();

            string exampleFolder = GetExampleFolderPathOnDesktop("GenerateReportMultiple");

            string fileName = "multiple connections report.pdf";
            string pdfFilePath = Path.Combine(exampleFolder, fileName);

            //Save the report of all requested connections to one PDF file.
            await conClient.Report.SaveMultipleReportsPdfAsync(conClient.ActiveProjectId, connectionIds, pdfFilePath);

            Console.WriteLine($"Report of {connectionIds.Count} connection(s) saved to: {pdfFilePath}");

            //Close the opened project.
            await conClient.Project.CloseProjectAsync(conClient.ActiveProjectId);
        }
    }
}

Looking for a code sample? request some help on our discussion page.

REST Usage

Http Request

All URIs are relative to http://localhost

POST /api/5/projects/{projectId}/reports/pdf

Using the GeneratePdfForMutlipleWithHttpInfo variant

This returns an ApiResponse object which contains the response data, status code and headers.

try
{
    // Generates a report for multiple connections in PDF or Word format.
    conClient.Report.GeneratePdfForMutlipleWithHttpInfo(projectId, requestBody);
}
catch (ApiException e)
{
    Debug.Print("Exception when calling ReportApi.GeneratePdfForMutlipleWithHttpInfo: " + e.Message);
    Debug.Print("Status Code: " + e.ErrorCode);
    Debug.Print(e.StackTrace);
}

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: text/plain, application/json, text/json

HTTP response details

Status code Description Response headers
200 OK -
401 Unauthorized -
404 Not Found -
422 Unprocessable Content -
500 Internal Server Error -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

GenerateWordAsync

void GenerateWordAsync (Guid projectId, int connectionId)

Generates a report for the specified connection in PDF, Word, or HTML zip format.

Extension Methods

This operation has an avaliable client extension method. Refer to code samples for extension method usage.

SaveReportWord(...)

Parameters

Name Type Description Notes
projectId Guid The unique identifier of the opened project.
connectionId int The ID of the connection to report.

Return type

void (empty response body)

Example

Note: this example is autogenerated.

using System;
using System.Collections.Generic;
using System.Diagnostics;
using IdeaStatiCa.ConnectionApi.Api;
using IdeaStatiCa.ConnectionApi.Client;
using IdeaStatiCa.ConnectionApi.Model;

namespace Example
{
    public class GenerateWordAsyncExample
    {
        public static async Task Main()
        {
            string ideaConFile = "testCon.ideaCon";
            
            string ideaStatiCaPath = "C:\\Program Files\\IDEA StatiCa\\StatiCa 26.0"; // Path to the IdeaStatiCa.ConnectionRestApi.exe
            
            using (var clientFactory = new ConnectionApiServiceRunner(ideaStatiCaPath))
            {
                using (var conClient = await clientFactory.CreateApiClient())
                {

                    // Open the project and get its id
                    var projData = await conClient.Project.OpenProjectAsync(ideaConFile);
                    Guid projectId = projData.ProjectId;
                    
                    // (Required) Select parameters
                    connectionId = 56;  // int | The ID of the connection to report.

                    try
                    {
                        // Generates a report for the specified connection in PDF, Word, or HTML zip format.
                        conClient.Report.GenerateWordAsync(projectId, connectionId);
                    }
                    catch (ApiException  e)
                    {
                        Console.WriteLine("Exception when calling Report.GenerateWordAsync: " + e.Message);
                        Console.WriteLine("Status Code: " + e.ErrorCode);
                        Console.WriteLine(e.StackTrace);
                    }
                    finally
                    {
                        await conClient.Project.CloseProjectAsync(projectId);
                    }
                }
            }
        }
    }
}

Code Samples

using IdeaStatiCa.Api.Connection.Model;
using IdeaStatiCa.ConnectionApi;

namespace CodeSamples
{
    public partial class ClientExamples
    {
        /// <summary>
        /// Save the word report of a given connection.
        /// </summary>
        /// <param name="conClient"></param>
        /// <returns></returns>
        public static async Task SaveReport_Word(IConnectionApiClient conClient)
        {
            string filePath = "Inputs/simple cleat connection.ideaCon";
            ConProject conProject = await conClient.Project.OpenProjectAsync(filePath);

            //Get the first connection in the project.
            var connections = await conClient.Connection.GetConnectionsAsync(conClient.ActiveProjectId);
            int connectionId = connections[0].Id;

            string exampleFolder = GetExampleFolderPathOnDesktop("GenerateReport");

            // Save updated file.
            string fileName = "simple cleat connection.docx";
            string wordFilePath = Path.Combine(exampleFolder, fileName);

            //Save Report to PDF.
            await conClient.Report.SaveReportWordAsync(conClient.ActiveProjectId, connectionId, wordFilePath);

            Console.WriteLine($"Report saved to: {wordFilePath}");

            //Close the opened project.
            await conClient.Project.CloseProjectAsync(conClient.ActiveProjectId);
        }
    }
}

Looking for a code sample? request some help on our discussion page.

REST Usage

Http Request

All URIs are relative to http://localhost

GET /api/5/projects/{projectId}/connections/{connectionId}/reports/word

Using the GenerateWordWithHttpInfo variant

This returns an ApiResponse object which contains the response data, status code and headers.

try
{
    // Generates a report for the specified connection in PDF, Word, or HTML zip format.
    conClient.Report.GenerateWordWithHttpInfo(projectId, connectionId);
}
catch (ApiException e)
{
    Debug.Print("Exception when calling ReportApi.GenerateWordWithHttpInfo: " + e.Message);
    Debug.Print("Status Code: " + e.ErrorCode);
    Debug.Print(e.StackTrace);
}

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: text/plain, application/json, text/json

HTTP response details

Status code Description Response headers
200 OK -
401 Unauthorized -
404 Not Found -
500 Internal Server Error -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

GenerateWordForMultipleAsync

void GenerateWordForMultipleAsync (Guid projectId, List requestBody)

Generates a report for multiple connections in PDF or Word format.

Extension Methods

This operation has an avaliable client extension method. Refer to code samples for extension method usage.

SaveReportWord(...)

Parameters

Name Type Description Notes
projectId Guid The unique identifier of the opened project.
requestBody List<int> List of connection IDs to include in the report.

Return type

void (empty response body)

Example

Note: this example is autogenerated.

using System;
using System.Collections.Generic;
using System.Diagnostics;
using IdeaStatiCa.ConnectionApi.Api;
using IdeaStatiCa.ConnectionApi.Client;
using IdeaStatiCa.ConnectionApi.Model;

namespace Example
{
    public class GenerateWordForMultipleAsyncExample
    {
        public static async Task Main()
        {
            string ideaConFile = "testCon.ideaCon";
            
            string ideaStatiCaPath = "C:\\Program Files\\IDEA StatiCa\\StatiCa 26.0"; // Path to the IdeaStatiCa.ConnectionRestApi.exe
            
            using (var clientFactory = new ConnectionApiServiceRunner(ideaStatiCaPath))
            {
                using (var conClient = await clientFactory.CreateApiClient())
                {

                    // Open the project and get its id
                    var projData = await conClient.Project.OpenProjectAsync(ideaConFile);
                    Guid projectId = projData.ProjectId;
                    
                    // (Required) Select parameters
                    var requestBody = new List<int>(); // List<int> | List of connection IDs to include in the report.

                    try
                    {
                        // Generates a report for multiple connections in PDF or Word format.
                        conClient.Report.GenerateWordForMultipleAsync(projectId, requestBody);
                    }
                    catch (ApiException  e)
                    {
                        Console.WriteLine("Exception when calling Report.GenerateWordForMultipleAsync: " + e.Message);
                        Console.WriteLine("Status Code: " + e.ErrorCode);
                        Console.WriteLine(e.StackTrace);
                    }
                    finally
                    {
                        await conClient.Project.CloseProjectAsync(projectId);
                    }
                }
            }
        }
    }
}

Code Samples

using IdeaStatiCa.ConnectionApi;

namespace CodeSamples
{
    public partial class ClientExamples
    {
        /// <summary>
        /// Generates one Word report for multiple connections in the project. The generated document contains one section per each connection report.
        /// Uses the SaveMultipleReportsWordAsync client extension method which wraps the GenerateWordForMultiple operation.
        /// </summary>
        /// <param name="conClient">The connected API Client</param>
        public static async Task GenerateWordForMultiple(IConnectionApiClient conClient)
        {
            string filePath = "Inputs/User_testing_end_v23_1.ideaCon";
            await conClient.Project.OpenProjectAsync(filePath);

            //Get all connections in the project and request the report for all of them.
            var connections = await conClient.Connection.GetConnectionsAsync(conClient.ActiveProjectId);
            List<int> connectionIds = connections.Select(c => c.Id).ToList();

            string exampleFolder = GetExampleFolderPathOnDesktop("GenerateReportMultiple");

            string fileName = "multiple connections report.docx";
            string wordFilePath = Path.Combine(exampleFolder, fileName);

            //Save the report of all requested connections to one Word file.
            await conClient.Report.SaveMultipleReportsWordAsync(conClient.ActiveProjectId, connectionIds, wordFilePath);

            Console.WriteLine($"Report of {connectionIds.Count} connection(s) saved to: {wordFilePath}");

            //Close the opened project.
            await conClient.Project.CloseProjectAsync(conClient.ActiveProjectId);
        }
    }
}

Looking for a code sample? request some help on our discussion page.

REST Usage

Http Request

All URIs are relative to http://localhost

POST /api/5/projects/{projectId}/reports/word

Using the GenerateWordForMultipleWithHttpInfo variant

This returns an ApiResponse object which contains the response data, status code and headers.

try
{
    // Generates a report for multiple connections in PDF or Word format.
    conClient.Report.GenerateWordForMultipleWithHttpInfo(projectId, requestBody);
}
catch (ApiException e)
{
    Debug.Print("Exception when calling ReportApi.GenerateWordForMultipleWithHttpInfo: " + e.Message);
    Debug.Print("Status Code: " + e.ErrorCode);
    Debug.Print(e.StackTrace);
}

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: text/plain, application/json, text/json

HTTP response details

Status code Description Response headers
200 OK -
401 Unauthorized -
404 Not Found -
422 Unprocessable Content -
500 Internal Server Error -

[Back to top] [Back to API list] [Back to Model list] [Back to README]