GetBaselines

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


Subject


Name

GetBaselines — Returns all base lines for the given baseline name and query name.

Syntax

.NET syntax:

Baseline[] GetBaselines(string BaselineName, string QueryName);

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 following table describes the input required by GetBaselines API:

Table: IQueriesService- GetBaselines- input parameters

Field name

Field type

Data type

Description

BaselineName

Optional

String

The base line name used for search.

QueryName

Optional

String

The query name for which base line is created.

Return value

The API returns a array of Baseline object which contain following baseline attributes:

Table: IQueriesService- GetBaselines- return value

Field name

Data type

Description

BaselineID

Guid

The unique identifier of the base line.

BaselineName

String

The name of the base line.

BaselineDescription

String

The description of the base line.

QueryID

Guid

The unique identifier of the base line.

QueryName

String

The name of query.

QueryDescription

Sring

The description of query.

SOAP faults

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

Table: IQueriesService - GetBaselines - SOAP faults

Event

Description

InvalidArgumentError

You may be overriding the limitations of certain input parameters.

Sample: C# client

// GetBaselines
            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);
            }
            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
            java.lang.String baselineName = "";
            java.lang.String queryName = "";
            // TODO process result here
            ArrayOfBaseline result = port.getBaselines(baselineName, queryName);
            System.out.println("Result = "+result);
        }
        catch (Exception exception)
        {
            System.out.println(exception.getMessage());
        }
   


Related links

See About IQueriesService.


Legacy ID



v71889783_v74603629


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


Terms of use for this information are found in Legal Notices