Skip to content

Latest commit

 

History

History
90 lines (69 loc) · 1.9 KB

search-apis.md

File metadata and controls

90 lines (69 loc) · 1.9 KB

Search REST APIs

Introduction

Caution

It's required to know the search-engine endpoint.

If it's possible, the REST APIs of search-engine can be accessed via Swagger APIs:

http://SEARCH_ENDPOINT:SEARCH_PORT/swagger-ui/index.html#/

Tip

The endpoint of search-engine in the cluster is http://dome-search-svc.search-engine.svc.cluster.local:8080.

REST APIs

Anyway, follow the Search REST APIs summary:

GET - SearchProductsByKeywords

Allow to get products filtereb by keywords

$\color{blue}{\textsf{Input}}$

  • Request type: GET
  • Query string: {keyword}
  • Endpoint: dome-search-svc.search-engine.svc.cluster.local:8080/api/SearchProductsByKeywords/{keyword}

$\color{green}{\textsf{Response}}$

POST - SearchProducts

Allow to search productOfferings by put keywords and filter through categories in the BodyRequest (category can be null) - Recommended

$\color{blue}{\textsf{Input}}$

  • Request type: POST
  • Endpoint: dome-search-svc.search-engine.svc.cluster.local:8080/api/SearchProductsByKeywords/{query}
  • Body:
   [
    {
        "categories": [ "categoryName" ]
    }
   ]

$\color{green}{\textsf{Response}}$

   [
    {
        "categories": [ ... ]
    }
   ]
POST - SearchProductByFilterCategory

Allow to filter productOfferings through category name in the BodyRequest.

$\color{blue}{\textsf{Input}}$

  • Request type: POST
  • Endpoint: dome-search-svc.search-engine.svc.cluster.local:8080/api/SearchProductByFilterCategory
  • Body:
   [
    {
        "categories": [ "categoryName" ]
    }
   ]

$\color{green}{\textsf{Response}}$

   [
    {
        "categories": [ ... ]
    }
   ]