GetBaselineRuns

Article:HOWTO76898  |  Created: 2012-05-07  |  Updated: 2012-05-08  |  Article URL http://www.symantec.com/docs/HOWTO76898
Article Type
How To


Subject


Name

GetBaselineRuns — Returns all base lines runs for the given baseline object.

Syntax

.NET syntax:

BaselineRun[] GetBaselineRuns(Baseline baseline);

Service URLs

Use the following URLs to access the IQueriesService:

  • http://<localhost>/CCS/Services/Applications/Queries/IQueriesService/WS/WindowsSecurity

  • https://<localhost>:<portnumber>/CCS/Services/Applications/Queries/IQueriesService/WS/WindowsSecurity

  • https://<localhost>:<portnumber>/CCS/Services/Applications/Queries/IQueriesService/WS/UsernameSecurity

  • https://<localhost>:<portnumber>/CCS/Services/Applications/Queries/IQueriesService/Basic/UsernameSecurity

Authorization Requirements

You must have the following CCS tasks to use the API:

  • View Queries

  • View All Jobs

You must have the permissions on the following folder to use the API:

  • Queries folder

Input parameters

The GetBaselineRuns API requires the Baseline data contract as an input.

The following table describes the fields in the Baseline data contract that the API requires:

Table: IQueriesService - BaselineRun object

Field name

Field type

Data type

Description

BaselineID

Mandatory

Guid

The unique identifier of the base line.

BaselineName

Optional

String

The name of the base line.

BaselineDescription

Optional

String

The description of the base line.

QueryID

Optional

Guid

The unique identifier of the base line.

QueryName

Optional

String

The name of query.

QueryDescription

Optional

Sring

The description of query.

Return value

The API returns a BaselineRun object which contain following baseline attributes

Table: IQueriesService - GetBaselineRuns- input parameters

Field name

Data type

Description

BaselineID

Guid

The unique identifier of the base line.

RunID

Guid

The unique identifier of baseline run.

BaselineName

String

The name of the base line.

BaselineDescription

String

The description of the base line.

RunStatus

String

The status of base line run.

StartDate

DateTime

The date when the base line started.

EndDate

DateTime

The date when the base line completed.

RecordsAdded

long

The records added since last query result.

RecordsDeleted

long

The records deleted since last query result.

RecordsChanged

long

The records changed since last query result.

RecordsUnchanged

long

The records unchanged since last query result.

SOAP faults

All the error results are returned to the calling application as SOAP faults:

Table: IQueriesService - GetBaselineRuns - SOAP faults

Event

Description

InvalidArgumentError

You may be overriding the limitations of certain input parameters.

Sample: C#

//GetBaselineRuns
            QueriesServiceClient client = new QueriesServiceClient();
            client.ClientCredentials.UserName.UserName = "e2edom\\administrator";
            client.ClientCredentials.UserName.Password = "password@123";
            System.Net.ServicePointManager.ServerCertificateValidationCallback = ((sender, certificate, chain, sslPolicyErrors) => true);

            try
            {
                //Get baselines for query.
                string queryName = "Query1";
                Baseline[] baselines = client.GetBaselines(null, queryName);
                // Get baseline runs
                BaselineRun[] baselineRuns = client.GetBaselineRuns(baselines[0]);
            }
            catch (Exception exp)
            {
                Console.WriteLine(exp.Message);
            }

Sample: Java client

try
        {
            // Call Web Service Operation
            QueriesService service = new QueriesService();
            IQueriesService port = service.getBasicHttpBindingIQueriesService();
            // TODO initialize WS operation arguments here
            Baseline baseline = new Baseline();
            baseline.setBaselineID("7fdbb1fb-40ff-4970-a179-758de6d8b4d9");
            baseline.setQueryID("ae1ac02a-b795-413c-aa30-2b9dc76b0cc7");
            // TODO process result here
            ArrayOfBaselineRun result = port.getBaselineRuns(baseline);
            System.out.println("Result = "+result);
        }
        catch (Exception exception)
        {
            System.out.println(exception.getMessage());
        }
   

Related links

See About IQueriesService.


Legacy ID



v71889869_v74603629


Article URL http://www.symantec.com/docs/HOWTO76898


Terms of use for this information are found in Legal Notices