Google Search Appliance: Policy ACL API Developer’s Guide Policy ACL API Developer’s Guide 5
After you download the software and acquire search appliance credentials, get started as follows:
1. Browse to the Administrative API download site (http://code.google.com/p/google-enterprise-
gdata-api).
2. Download the ZIP file gsa-admin-api-java-1.0.0.zip (http://google-enterprise-gdata-
api.googlecode.com/files/gsa-admin-api-java-1.0.0.zip) containing the client library and the sample
application files.
3. Unzip the file and navigate to the
gdata/java
folder. The client library JAR files are present in the
lib
folder and the sample applications are present in the
sample
folder.
Running Samples
Sample applications are located in the
gdata/java/sample
folder.
To see if you’ve installed the required software correctly, open a command prompt and change directory
to the
gdata/java
folder. Enter the following command:
ant -f build-samples.xml sample.dashboard.run
This command displays build output messages and opens an example dashboard that demonstrates
the features of the Google Search Appliance Administrative API. You can add your search appliance
configuration information to the dashboard and see the dashboard running.
To find out how to run each sample, go to
gdata/java/build-samples
folder and view the build file for
each sample, like
dashboard.xml
,
commandline.xml
, and
aclclient.xml
. Look for the
samples run
comment. Another example of how to run the
commandline
sample application, enter the following
command in the
gdata/java
folder:
ant -f build-samples.xml -Dargs="retrieve --hostname=gsa_hostname
--username=gsa_user --password=gsa_passwd --protocol=http
--port=gsa_port config crawlURLs" sample.commandline.run
Substitute these parameters:
• gsa_hostname—The host name of a search appliance (specify just the host name, not the domain
name)
• gsa_user—The user name for the Admin Console on the search appliance
• gsa_password—The password for the Admin Console on the search appliance
This command displays the Crawl URLs settings on the search appliance.
The
commandline
sample application requires that command line arguments be passed to Ant by using
the
-Dargs
option in the
commandline.xml
file.
Building Your Applications
You can build your own applications using the client library.
Copy the following client library JAR files from the
gdata/java/lib
folder to your development folder
and add the files to your
classpath
environmental system variable:
•
gdata-core-1.0.jar
•
gdata-gsa-1.0.jar
•
gdata-client-1.0.jar
Commenti su questo manuale