Because most REST requests are simply an operation URL with basic query parameters, you can test most REST requests with a Web browser. (Operations that require XML input, such as the saveMyList operation, are the exception.)
The URL for a REST request that you put in your browser looks like this:
<baseURL>/rest/<service>/<operation>?<parameters>
<baseURL> is the base URL for the Web Services instance (see Web Services base URL).
<service> is the name of the service (see Available services).
<operation> is an operation name from the WSDL for that service (see Services and Operations for the operations available for each service).
<parameters> are the elements from the service schema that provide input values for the request, including any required header parameters. They are specified as a name/value pair (such as, clientID=SampleClient). Each parameter is separated by an ampersand (&).
For example: clientID=SampleClient&titleID=54321&libraryFilter=MAIN
Sending a version REST request through a browser
One of the first web service calls you may make is to verify that Web Services is running and to get the version information for Web Services and Symphony. This request does not require any parameters with the operation name.
You can make this request and get the response through a web browser.
To get the version information, if your Tomcat host name is libraryapps.example.org, and you used the default port, 8080, and had the default application name, symws, the URL for a version request would be:
http://libraryapps.example.org:8080/symws/rest/standard/version
If Web Services is running and properly configured, the software returns an XML document with version information about Symphony and Web Services, for example:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<VersionResponse xmlns="http://schemas.sirsidynix.com/symws/standard">
<version>
<product>SYMPHONY</product>
<version>3.4.0.6013</version>
</version>
<version>
<product>SYM-WS</product>
<version>v3_0_1818 2010-09-23 04:02:26</version>
</version>
</VersionResponse>
For information on how to make this request and what to expect, see version and the Web Services Setup Guide. That guide also provides some troubleshooting information.
Sending a searchCatalog REST request through a browser
Another operation that you can use to test your requests through a web browser is searchCatalog.
To get the results of the searchCatalog request, if your Tomcat host name is libraryapps.example.org, and you used the default port of 8080, and had the default application name of symws, and used the default test clientID of SymWSTestClient, and wanted to get the first 5 results of an author search for “William Shakespeare”, the URL for the request would be the following:
http://libraryapps.example.org:8080/symws/rest/standard/searchCatalog?clientID=SymWSTestClient&term1=William Shakespeare&filter=author&hitsToDisplay=5
If Web Services is running and properly configured, the software returns an XML document with lots of information about the 5 results. This is useful for finding out what information can be retrieved from the catalog and how the catalog item information is set up. See Searching the Catalog using Perl for a specific example of using Perl from an application rather than the browser URL.
Also, notice that the parameter “term” has had a number appended to it. This is allowed (and expected) for parameters where more than one are allowed in a request. Check the details of each parameter in the operation to learn more about the cardinality.
Related topics
Testing SOAP requests with soapUI
© 2009-2012 SirsiDynix