saveTextSearchSettings

put

/ccadmin/v1/merchant/textSearch

Saves the Text Search Settings.Enables or Disables text search based on input request.

Request

Supported Media Types
  • application/json
Body Parameter
Root Schema : saveTextSearchSettings_request
Nested Schema : scheduledJobs
Type: array
List of scheduled Jobs Data.
Nested Schema : items
Type: object
Nested Schema : schedule
Type: object

Response

Supported Media Types
  • application/json
200 Response
Following model is returned when operation succeeds.
Body
Root Schema : saveTextSearchSettings_response
Nested Schema : scheduledJobs
Type: array
List of scheduled Jobs created. This feild is returned once setup is done and scheduled jobs are created
Nested Schema : scheduledJobsInputData
Type: array
List of scheduled Jobs Data given in the input. This feild is returned only when setup is 'inProgress'
Nested Schema : items
Type: object
Nested Schema : schedule
Type: object
Nested Schema : items
Type: object
Nested Schema : schedule
Type: object
Example application/json

{
    "setUpRunning":true,
    "scheduledJobsInputData":[
        {
            "schedule":{
                "period":1000000,
                "catchUp":false
            },
            "scheduledJobName":"profileIncrementalIndexingSchedule",
            "scheduleType":"periodic",
            "scheduleDescription":"every 1000 seconds without catch up"
        },
        {
            "schedule":{
                "daysInMonth":[
                ],
                "weeksInMonth":[
                    1,
                    2,
                    3,
                    4,
                    5
                ],
                "monthsInYear":[
                    0,
                    1,
                    2,
                    3,
                    4,
                    5,
                    6,
                    7,
                    8,
                    9,
                    10,
                    11
                ],
                "daysOfWeek":[
                    1,
                    2,
                    3,
                    4,
                    5,
                    6,
                    7
                ],
                "occurrenceInDay":2
            },
            "scheduledJobName":"orderOptimizationSchedule",
            "scheduleType":"calendar",
            "scheduleDescription":"months:Jan-Dec dates: daysOfWeek:Sun-Sat occurrencesInMonth:1-last hours:11,23 minutes:0"
        },
        {
            "schedule":{
                "daysInMonth":[
                ],
                "weeksInMonth":[
                    1,
                    2,
                    3
                ],
                "monthsInYear":[
                    1,
                    3
                ],
                "daysOfWeek":[
                    1,
                    2,
                    3
                ],
                "occurrenceInDay":2
            },
            "scheduledJobName":"profileOptimizationSchedule",
            "scheduleType":"calendar",
            "scheduleDescription":"months:Feb,Apr dates: daysOfWeek:Sun-Tue occurrencesInMonth:1-3 hours:11,23 minutes:0"
        },
        {
            "schedule":{
                "period":1000000,
                "catchUp":false
            },
            "scheduledJobName":"orderIncrementalIndexingSchedule",
            "scheduleType":"periodic",
            "scheduleDescription":"every 1000 seconds without catch up"
        }
    ],
    "errorMessage":"",
    "links":[
        {
            "rel":"self",
            "href":"http://localhost:9080/ccadminui/v1/merchant/textSearch"
        }
    ],
    "enabled":false,
    "statusMessage":"Text Search setup has been successfully initiated with the given scheduledJobs input data. Once the setup is completed 'enabled' will be true."
}
Default Response
The error response. The following are the internal error codes thrown by this API when the request processing fails in Oracle Commerce Cloud: |Error Code|Description| |------------------|------------------| |100007|Could not perform text search configuration as another text search setup is currently in progress.| |100008|enable flag is required.| |100009|scheduledJobName field in scheduledJobs is required.| |100010|Could not perform text search configuration as similar internal operation is currently in progress.| |100011|Invalid scheduled Job Name: {0}| |53000|Unable to create or update schedule information.| |53001|Missing required property: scheduleType/schedule (or) Invalid input for the schedule (or) Invalid schedule type property found. It should be either calendar or periodic.| |53006|Unable to remove schedule information.|
Body
Root Schema : errorModel
Type: object
Nested Schema : errors
Type: array
An optional list of errors if multiple errors were encountered
Nested Schema : items
Type: object

Examples

Sample Request:

{
  "enable": true,
  "scheduledJobs": [
    {
      "schedule": {"period": 1000000},
      "scheduledJobName": "orderIncrementalIndexingSchedule",
      "scheduleType": "periodic"
    },
    {
      "schedule": {"period": 1000000},
      "scheduledJobName": "profileIncrementalIndexingSchedule",
      "scheduleType": "periodic"
    },
    {
      "schedule": {"occurrenceInDay": 2},
      "scheduledJobName": "orderOptimizationSchedule",
      "scheduleType": "calendar"
    },
    {
      "schedule": {
        "weeksInMonth": [
          1,
          2,
          3
        ],
        "monthsInYear": [
          1,
          3
        ],
        "daysOfWeek": [
          1,
          2,
          3
        ],
        "occurrenceInDay": 2
      },
      "scheduledJobName": "profileOptimizationSchedule",
      "scheduleType": "calendar"
    }
  ]
}

Sample Response Payload returned by endpoint:

{
  "setUpRunning": true,
  "scheduledJobsInputData": [
    {
      "schedule": {
        "period": 1000000,
        "catchUp": false
      },
      "scheduledJobName": "profileIncrementalIndexingSchedule",
      "scheduleType": "periodic",
      "scheduleDescription": "every 1000 seconds without catch up"
    },
    {
      "schedule": {
        "daysInMonth": [],
        "weeksInMonth": [
          1,
          2,
          3,
          4,
          5
        ],
        "monthsInYear": [
          0,
          1,
          2,
          3,
          4,
          5,
          6,
          7,
          8,
          9,
          10,
          11
        ],
        "daysOfWeek": [
          1,
          2,
          3,
          4,
          5,
          6,
          7
        ],
        "occurrenceInDay": 2
      },
      "scheduledJobName": "orderOptimizationSchedule",
      "scheduleType": "calendar",
      "scheduleDescription": "months:Jan-Dec dates: daysOfWeek:Sun-Sat occurrencesInMonth:1-last hours:11,23 minutes:0"
    },
    {
      "schedule": {
        "daysInMonth": [],
        "weeksInMonth": [
          1,
          2,
          3
        ],
        "monthsInYear": [
          1,
          3
        ],
        "daysOfWeek": [
          1,
          2,
          3
        ],
        "occurrenceInDay": 2
      },
      "scheduledJobName": "profileOptimizationSchedule",
      "scheduleType": "calendar",
      "scheduleDescription": "months:Feb,Apr dates: daysOfWeek:Sun-Tue occurrencesInMonth:1-3 hours:11,23 minutes:0"
    },
    {
      "schedule": {
        "period": 1000000,
        "catchUp": false
      },
      "scheduledJobName": "orderIncrementalIndexingSchedule",
      "scheduleType": "periodic",
      "scheduleDescription": "every 1000 seconds without catch up"
    }
  ],
  "errorMessage": "",
  "links": [{
    "rel": "self",
    "href": "http://localhost:9080/ccadminui/v1/merchant/textSearch"
  }],
  "enabled": false,
  "statusMessage": "Text Search setup has been successfully initiated with the given scheduledJobs input data. Once the setup is completed 'enabled' will be true."
}