Difference between revisions of "GetFilter"

From ARK
Jump to: navigation, search
(Created page with "$ftype = reqQst($_REQUEST, 'ftype'); $src = reqQst($_REQUEST, 'src'); $retftrset = reqQst($_REQUEST, 'retftrset');")
 
Line 1: Line 1:
$ftype = reqQst($_REQUEST, 'ftype');
+
This method is used to return the results of a filter in a standard ARK results array. It can return the results of a saved filter or can be used to run a simple freetext search.
$src = reqQst($_REQUEST, 'src');
+
 
$retftrset = reqQst($_REQUEST, 'retftrset');
+
===Path===
 +
 
 +
http://your.ark.instance/api.php?request=getFilter
 +
 
 +
===Arguments===
 +
 
 +
*'''ftype''' - The filtertype. Currently only a free text search can be undertaken using the API. If you want to run a free text search ftype needs to be set to 'ftx'. You will also need to send a src.
 +
*'''src''' - This is the free text phrase to search on. Normal Boolean Search (i.e. Google) parameters apply.
 +
 
 +
If you want to retrieve a previously saved filter (saved using the ARK web interface) use:
 +
 
 +
*'''retftrset''' - this needs to be set to the numeric id of a saved filter. Current saved filters can be queried using the API method [[describeFilters]]().
 +
 
 +
If anonymous logins are not enabled a username and password will need to be supplied:
 +
 
 +
*'''handle''' - username
 +
 
 +
*'''passwd''' - password
 +
 
 +
===Example===
 +
 
 +
====Example 1 - getting a saved filter====
 +
 
 +
http://your.ark.instance/api.php?request=getFilter&retftrset=3&handle=johndoe&passwd=johndoepassword

Revision as of 15:30, 12 November 2013

This method is used to return the results of a filter in a standard ARK results array. It can return the results of a saved filter or can be used to run a simple freetext search.

Path

http://your.ark.instance/api.php?request=getFilter

Arguments

  • ftype - The filtertype. Currently only a free text search can be undertaken using the API. If you want to run a free text search ftype needs to be set to 'ftx'. You will also need to send a src.
  • src - This is the free text phrase to search on. Normal Boolean Search (i.e. Google) parameters apply.

If you want to retrieve a previously saved filter (saved using the ARK web interface) use:

  • retftrset - this needs to be set to the numeric id of a saved filter. Current saved filters can be queried using the API method describeFilters().

If anonymous logins are not enabled a username and password will need to be supplied:

  • handle - username
  • passwd - password

Example

Example 1 - getting a saved filter

http://your.ark.instance/api.php?request=getFilter&retftrset=3&handle=johndoe&passwd=johndoepassword