MindTouch Developer Center > MindTouch Deki > API Reference > GET:site/opensearch/description

GET:site/opensearch/description

Overview

public. Get the OpenSearch Description document

Uri Parameters

None

Query Parameters

None

Return Codes

None

Message Format

Output:

<OpenSearchDescription>
  <ShortName>{text}</ShortName> 
  <Description>{text}</Description> 
  <Query role="{text}" searchTerms="{text}" /> 
  <Url type="{contenttype}" indexOffset="{int}" template="{uri}" /> 
  ...
</OpenSearchDescription>

Implementation Notes

Refer here for more information about OpenSearch.

Code Samples

The following code example retrieves the OpenSearch Description document:

Plug p = Plug.New("http://deki-hayes/@api/deki");
p.At("users", "authenticate").WithCredentials("admin", "password").Get();
p.At("site", "opensearch", "description").Get();

Sample response:

<OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/">
  <ShortName>Deki Wiki Search</ShortName> 
  <Description>Deki Wiki Search Engine</Description> 
  <Query role="example" searchTerms="Wiki" /> 
  <Url type="application/atom+xml" indexOffset="0" template="http://deki-hayes/@api/deki/site/opensearch?q={searchTerms}&offset={startIndex}&limit={count?}&format=atom" /> 
  <Url type="application/rss+xml" indexOffset="0" template="http://deki-hayes/@api/deki/site/opensearch?q={searchTerms}&offset={startIndex}&limit={count?}&format=rss" /> 
  <Url type="text/html" indexOffset="0" template="http://deki-hayes/Special:Search?search={searchTerms}&offset={startIndex}&limit={count?}&format=html" /> 
  <Url type="application/x-suggestions+json" template="http://deki-hayes/@api/deki/site/opensearch/suggestions?q={searchTerms}" /> 
</OpenSearchDescription>

  

Tag page
You must login to post a comment.
Powered by MindTouch Deki v.8.08