Create a search interface

post

/gsadmin/v1/{appName}/searchInterfaces/{searchInterfaceName}

Creates a new search interface with the specified name under the search interfaces folder.

Request

Supported Media Types
Path Parameters
Body ()
The search interface to create in the specified folder.
Root Schema : SearchInterface
Type: object
Represents a search interface in the ECR.
Show Source
Nested Schema : fields
Type: array
Show Source
Nested Schema : SearchInterfaceField
Type: object
Show Source
Security
Back to Top

Response

Supported Media Types

201 Response

Search interface successfully created.
Body ()
Root Schema : Response
Type: object
Show Source
Back to Top

Examples

Request Body Example

The following shows a sample request body to create a search interface.

:content = {
  "ecr:lastModifiedBy": "admin",
  "ecr:lastModified": "2016-10-13T09:28:03.310+05:30",
  "ecr:createDate": "2016-10-13T09:28:03.310+05:30",
  "ecr:type": "search-interface",
  "crossFieldMatch": "always",
  "fields": [
    	{"attribute": "product.id"}, 
		{"attribute": "product.sku"}		
		{"attribute": "product.code"}
		{"attribute": "product.brand.name"}, 
		{"attribute": "product.category"}, 
		{"attribute": "product.name"}, 
		{"snippetSize": 25, "attribute": "product.short_desc"}, 
		{"attribute": "product.long_desc"}, 
		{"attribute": "ecr:crossField"}
  ]
}     
Back to Top