Search

From ToxBank API Wiki
(Difference between revisions)
Jump to: navigation, search
(Search)
(Search)
Line 29: Line 29:
 
== Get Indexed Protocol ==
 
== Get Indexed Protocol ==
 
{{HasOperation |id=Search:GetIndexedProtocol}}
 
{{HasOperation |id=Search:GetIndexedProtocol}}
 
== Get Indexed Resource ==
 
{{HasOperation |id=Search:GetIndexedResource}}
 
  
 
== Index Resource ==
 
== Index Resource ==

Revision as of 20:43, 21 January 2013

Search


Contents

Search

Query language

Suggestion:

Queries will be passed as parameters to the search URI. Valid query parameters are as follows:

   keyword=some_keyword
       Search only keywords for given keyword
   metadata=free_text
       Search all metadata for given free text
   resourceType=protocol|data
       Limit search to either protocol or data.  All resource types are searched if omitted.
   timeModified=epoch-epoch
       Limit search to give time period.  Times must be represented as seconds since the epoch.
       timeModified=0 - all times equal to and after the value.
       timeModified=-11111111 - all times up to and including the value.
       timeMOdified=1234-11111111 - all times inclusive of value range.

Search Ad Hoc Query

Description Search an ad hoc query
Resource Search
Method GET
URI /search
Parameters See query language
Header Parameters subjectid:SECURITY-TOKEN
Media Type (input)
Results URIs of the results
Media Type (output) text/uri-list
Status code 200,400,401,402,403

Links: Page, Edit with form



Get Indexed Investigation

Description Get uri of index investigation
Resource Index
Method GET
URI /search/index/investigation
Parameters resourceUri={resourceUri}
Header Parameters subjectid:SECURITY-TOKEN
Media Type (input)
Results
Media Type (output) uri of resource if it exists in index
Status code 200,400,401,402,403

Links: Page, Edit with form



Get Indexed Protocol

Description Get uri of indexed protocol
Resource Index
Method GET
URI /search/index/protocol
Parameters resourceUri={resourceUri}
Header Parameters subjectid:SECURITY-TOKEN
Media Type (input)
Results
Media Type (output) uri of resource if it exists in index
Status code 200,400,401,402,403

Links: Page, Edit with form



Index Resource

Description Add resource to query index
Resource Index
Method PUT
URI /search/index
Parameters resourceUri={resourceUri}
Header Parameters subjectid:SECURITY-TOKEN
Media Type (input) text/uri
Results
Media Type (output)
Status code 200,400,401,402,403

Links: Page, Edit with form



Delete Indexed Resource

Description Delete a query resource
Resource Index
Method DELETE
URI /search/index
Parameters resourceUri={resourceUri}
Header Parameters subjectid:SECURITY-TOKEN
Media Type (input)
Results
Media Type (output)
Status code 200,400,401,402,403

Links: Page, Edit with form



Administer Index Resources

Description Sync search index with actual data
Resource Index
Method POST
URI /search/index
Parameters admin=sync
Header Parameters subjectid:SECURITY-TOKEN
Media Type (input)
Results
Media Type (output)
Status code 200,400,401,402,403

Links: Page, Edit with form



Keyword hierarchy

Web service access to ontologies

Filtering the query

TBD

Alerts

An Alert is defined by Query URI ,frequency and an User to be notified.