Skip to main content
OCLC Support

Search/Statistics

Find information related to retrieving general statistics on an active search in Relais D2D

Search/statistics is a service used to retrieve general statistics on an active search.

HTTP Method: GET 


HTTP Method: POST  
HTTP Header Content-Type: "application/json" 


HTTP Header User-Agent: ${user-agent}  
Standard HTTP clients (browser, HTTP client libraries, etc.) will automatically include its User-Agent value.

Search URL:

https://HOSTNAME/di/search/stat

Search/Stat parameters

Example Call

Search status with "aid" and "query" parameters

  • aid=12knsfd987234ldfd2
  • query=ti%3D%22The%20Stranger%22%20and%20au%3D%22Albert%22%20an d%20au%3D%22Camus%22
    { ti="The Stranger" and au="Albert" and au="Camus" }

https://HOSTNAME/di/search/stat?aid=12knsfd987234ldfd2&query=ti%3D%22The%20Stranger%22%20and%20au%3D%22Albert%22%20and%20au%3D%22Camus%22 

Status of a search for The Stranger by Albert Camus

Response

The response from this service is a JSON document.

Successful response request

The following is a sample response for a successful request (HTTP status 200 OK):

{
    "ActiveCatalog":0,
    "TotalItemCount":0,
    "CatalogsSearched":0,
    "CatalogsUnconnected":0,
    "CatalogsConnecting":0,
    "CatalogsWorking":0,
    "CatalogsIdle":0,
    "CatalogsFailed":0,
    "CatalogsError":0,
    "SearchProgress":0.0
}                                                   

Successful response glossary

Value Name Definition

ActiveCatalog

An integer value indicating the number of catalogs being actively searched.

A value of 0 means that the search is complete.

CatalogsConnecting An integer value indicating the number of catalog connections currently in the connecting state.
CatalogsError An integer value indicating the number of catalog connections in an error state.
CatalogsFailed An integer value indicating the number of failed catalog connections.
CatalogsIdle An integer value indicating the number of catalog connections currently not in an idle state.
CatalogsSearched An integer value indicating the number of catalogs searched.
CatalogsUnconnected An integer value indicating the number of catalog connections currently not in a connected state.
CatalogsWorking An integer value indicating the number of catalog connections currently in the working state (searching, retrieving, etc.).

SearchProgress

A decimal value indicating the Progress of the current search.

A value of 1.0 means that the search is complete.

TotalItemCount An integer value indicating the number of items from all catalogs.

 Unsuccessful response request

{
    "Problem":  {
      "Code":  "PUBHG004",
      "Message": "Inactive search"
    }
}                                                                               

Problem codes and messages glossary

HTTP Status Code Type Message
400 Bad Request PUBHG001, PUBSC002 Public Missing parameter
401 Unauthorized PUBSC004 Public Invalid aid
401 Unauthorized PUBSC006 Public User group not authorized to access the service
412 Precondition Failed PUBHG004 Public Inactive search
500 Internal Server Error PRIHG001, PRISC001 Private Internal error