Retrieving acl rules – Google Search Appliance Policy ACL API Developers Guide User Manual

Page 18

Advertising
background image

Google Search Appliance: Policy ACL API Developer’s Guide

Policy ACL API Developer’s Guide

18

To create a new ACL rule with a default setting, use the following entry:

<?xml version=’1.0’ encoding=’UTF-8’?>
<entry xmlns=’http://www.w3.org/2005/Atom’

xmlns:gsa=’http://schemas.google.com/gsa/2007’>
<gsa:content name=’urlPattern’>http://example.com</gsa:content>
<gsa:content name=’acl’>user:john group:eng</gsa:content>

</entry>

Retrieving ACL Rules

To retrieve a list of ACL rules, send an authenticated GET request to the following URL:

http://Search_Appliance:8000/feeds/
policyAcls[?[query=][matchMode=][startLine=][maxLines=]]

The following example shows a sample result:

<?xml version=’1.0’ encoding=’UTF-8’?>
<feed xmlns=’http://www.w3.org/2005/Atom’

xmlns:openSearch=’http://a9.com/-/spec/opensearchrss/1.0/’
xmlns:gsa=’http://schemas.google.com/gsa/2007’>
<id>http://gsa.example.com:8000/feeds/policyAcls</id>
<updated>2009-04-27T12:57:56.152Z</updated>
<link rel=’http://schemas.google.com/g/2005#feed’ type=’application/atom+xml’

href=’http://gsa.example.com:8000/feeds/policyAcls’/>

<link rel=’self’ type=’application/atom+xml’

href=’http://gsa.example.com:8000/feeds/policyAcls’/>

<generator version=’0.5’ uri=’http://gsa.example.com:8000/gsa’>Google Search

Appliance</generator>

<openSearch:startIndex>1</openSearch:startIndex>
<entry>

<id>http://gsa.example.com:8000/feeds/policyAcls/example.com</id>
<gsa:content name=’entryID’>example.com</gsa:content>
<gsa:content name=’urlPattern’>example.com</gsa:content>
<gsa:content name=’acl’>group:eng user:john</gsa:content>

</entry>
...

</feed>

To retrieve an ACL rule for a URL pattern, send an authenticated GET request to the following URL:

http://Search_Appliance:8000/feeds/policyAcls/Url_Pattern

The following example shows a sample result:

<?xml version=’1.0’ encoding=’UTF-8’?>
<entry>

<id>http://gsa.example.com:8000/feeds/policyAcls/http%3A%2F%2Fexample.com</id>
<gsa:content name=’entryID’>http%3A%2F%2Fexample.com</gsa:content>
<gsa:content name=’urlPattern’>http://example.com</gsa:content>
<gsa:content name=’acl’>group:eng user:john</gsa:content>

</entry>

Advertising