beautypg.com

Api authentication, Building your applications – Google Search Appliance Policy ACL API Developers Guide User Manual

Page 13

background image

Google Search Appliance: Policy ACL API Developer’s Guide

Policy ACL API Developer’s Guide

13

4.

Open a command prompt and run the command to view its options:

C:\GoogleDataAdministrativeAPI\cs\sample\bin\Release>GsaCommandLine.exe
Usage: GsaCommandLine feed entry
commands:

retrieve
update
insert
delete

options:

--protocol:
--hostname:
--port:
--username:
--password:
--input: The input entry file for insert/update

:

All the query parameters can be specified by --=

Example:

GsaCommandLine retrieve --protocol=http --hostname=gsa1 --port=8000

--username=user --password=password config crawlURLs

C:\GoogleDataAdministrativeAPI\API-Gdata\cs\sample\bin\Release>

5.

You can run a command using the parameters that are shown. Be sure for the host name to use
just the search appliance name and not a domain name.

Building Your Applications

This section explains how to build your own applications using the client library outside the solution file
provided by the ZIP archive.

To build an application:

1.

Copy the following client library DLL files from the cs\lib folder to your development folder and
add them in the reference path:

Google.GData.Apps.dll

Google.GData.Client.dll

Google.GData.Extensions.dll

Google.GData.Gsa.dll

2.

In Visual Studio, create or open a new project.

3.

Click Project > Add Reference.

4.

Click the Browse tab and navigate to the folder where you copied the DLL files.

5.

Select the DLLs to use in your project.

API Authentication

Before making API calls with the .NET client library, you must construct a new GsaService object.