Creates a rule configuration.
post
/gsadmin/v1/{appName}/content/{contentCollectionFolder}/{Rule}
Request
Supported Media Types
- application/json
- application/zip
Path Parameters
-
Rule: string
Specifies the name of rule.
-
appName: string
Specifies the name of your application. For example, "cloud".
-
contentCollectionFolder: string
Specifies the name of content collection folder.
Security
-
basicAuth: basic
Type:
basicDescription:Basic username/password authentication.
Response
Supported Media Types
- application/json
201 Response
Rule created successfully.
Examples
The following example creates a new additional content item to trigger on a search for ???about us???:
curl -X POST -H "Authorization:Bearer <token>" -H "Content-Type:application/json" -d@pathname/filename.json http://host:port/gsadmin/v1/cloud/content/additionalContent/aboutus
Request Body Example
The following example shows the definition of the rule trigger aboutus:
{ "ecr:type" : "content-item",
"priority" : 10,
"contentItem":
{
"@type": "UnstructuredContent",
"title": "Looking for information about our company?",
"link-title": "About Us",
"link-url": "/about-us",
"image": "company-logo.png"
},
"triggers":[
{
"searchTerms": "about",
"matchmode": ""MATCHEXACT"
},
{
"searchTerms": "about us",
"matchmode": "MATCHEXACT"
}
]
}