Ready to Learn?Ex Libris products all provide open APIs

Tokens

Overview

A token is any query parameter that is not a Summon-specific query parameter. Tokens can replace all, or part, of Summon query parameter values or command arguments. One purpose of tokens is to make it simple to write query proxies. Query proxies can allow end-user-facing apps to have arbitrary query parameters, which can make URLs look cleaner in some instances. To specify a token to be replaced, use the notation ${tokenName} in any Summon query parameter value or command argument.

Example - A query proxy for an author/title book search page

The following shows the q query string as it looks on the proxy page:

author=Jonathan+Swift&title=Gulliver's+Travels

The following shows the Query string in Summon format:

s.cmd=setSearchTerm(Author,Jonathan+Swift)+addSearchTerm(Title,Gulliver's+Travels)+addFacetValueFilters(ContentType,"Book")

The proxy simply appends the following string to the original query string:

s.cmd=setTextQuery(Author\:\(${author}\))+addTextQuery(Title\:\(${title}\))+addFacetValueFilter(ContentType,Book)

Summon receives the following query:

author=Jonathan+Swift&title=Gulliver's+Travels&s.cmd=setTextQuery(Author\:\(${author}\))+addTextQuery(Title\:\(${title}\))+addFacetValueFilters(ContentType,Book)