Jump to: navigation, search

Modify Rule

Method

PUT

Syntax

 
/grs/v1/tenant/{tenantId}/package/{packageId}/rule/{ruleId}

Request Body

To modify something in rule summary (name, phase, etc):

 
{   
         "name":"New Name",
         "description":"New Desc",
         "phase":"New Phase",
         "splitTest": "A" 
         "calendarId":"Calendar_117",
         "dateEffective":99999999999,
         "dateExpired":99999999999
}

Response Body

 
{
        "ruleId":"f22d35f6-e31e-41f2-8e62-97864c47579a",
        "extRuleId":"DT-163",  
         "ruleType":"DECISION_TABLE",
         "name":"New Name",
         "description":"New Description",
         "phase":"New Phase",
         "calendarId":"Calendar_117",
         "nodeId":"pkg",
         "dateEffective":99999999999,
         "dateExpired":99999999999
}}

HTTP Status Codes

  • 200 Successful—Response body provided
  • 401 Unauthorized—APIToken not valid
  • 403 Forbidden—User does not have permission for the specified tenant ID, or does not have proper permission to perform this operation.
  • 404 Not Found—could not find specified package ID or rule ID.
  • 412 Precondition Failed— Rule was not locked first
  • 422 Unprocessable Entity—Field Validation Error
 
{
  "message": "Validation Failed",
  "errors": [
    {
       "code" : "1000",
       "field" : "phase",
       "message": "phase is not valid"
    },
    {
       "code" : "1001",
       "field" : "calendarName",
       "message": "calendarName is not valid"
    },
    {
       "code" : "1002",
       "field" : "date",
       "message": "dateExpired is before dateEffective"
    }
    { 
       "code" : "1005", 
       "field" : "splitTest", 
       "message": "splitTest is not valid" 
    }
  ]
}
  • 503—Service Unavailable

Notes

User must have RULE_MODIFY and RULE_VIEW permission. User must have rule LOCKED. The following fields can modified on the rule summary. Any other fields specified will be ignored:

  • name
  • description
  • phase
  • calendar
  • effective date
  • expired date

Feedback

Comment on this article:

blog comments powered by Disqus
This page was last modified on May 16, 2017, at 00:20.