Previous Topic: Adding the Cross-Origin Resource Sharing FilterNext Topic: Implementing Policy


Call the CAFedSearch Servlet Using REST

The CAFedSearch servlet exposes a RESTful interface where custom search clients, programs, and User Interfaces (UI) can send search requests.

This RESTful interface only accepts the HTTP Collection GET requests following the OpenSearch specification. It provides support for JSON and XML responses. Each request must contain a Service Desk BOPSID token which can be obtained from CA SDM RESTful or SOAP Web Services.

Follow these steps:

  1. Obtain a BOPSID token using a CA SDM RESTful Web Services.
  2. Get a REST Access Key by sending an HTTP POST request on the rest_access resource along with login credentials.

    You can also obtain a BOPSID token using the REST Access Key by sending an HTTP POST request on the bopsid resource.

  3. For details on sending requests to CA SDM RESTful Web Services, see the sample files in the following CA SDM directory:
    NX_ROOT\samples\sdk\rest\java
    
  4. To use the Federated Search API for searching, send an HTTP GET request on the search resource and pass search criteria and BOPSID token through the CA SDMURL.
    GET 
    
    http://<sdmhostname>:<FS_TOMCAT_PORT>/cafedsearch/sdm/search?q=<searchTerms>&source=<adapterName>&BOPSID=<bopsidToken>&userid=<userId>
    
    searchTerms

    Specifies a space delimited list of keywords. Must be URL encoded.

    adapterName

    Specifies search engine name as specified in the Search Source record Code field using the adapters configuration utility.

    Other supported arguments are as follows:

    index

    Specifies the first index desired in the search results, must be integer > = 1.

    page

    Specifies Indicates the first page desired in the search results, must be integer >= 1.

    size

    Specifies the number of results per page desired by the search client.

    type

    Valid values include JSON or XML.