Jump to: navigation, search

Modify LINEAR Rule Body

Method

PUT

Syntax

 
/grs/v1/tenant/{tenantId}/package/{packageId}/linearrulebody/{ruleId}<br/>

Optional parameter:

  • ?checkInComment=My change (check in comment appears in audit tab and package history tab for the rule)

Request Body

 
{
  "conditions":[   
      {   
         "conditionType":"condition",
         "label":"Age is between ",
         "sentence":"Age is between {age_low} and {age_high}",
         "segmentList":[   
            "\"{age_low}\"",
            " and ",
            "\"{age_high}\""
         ],
         "parmList":[   
            "20",
            "and",
            "24"
         ]
      }
   ],
   "actions":[   
      {   
         "label":"Decision is ",
         "sentence":"Decision is \"{decision}\"",
         "segmentList":[   
            "\"{decision}\""
         ],
         "parmList":[   
            "OK"
         ]
      }
     ]
}

Response Body

 
{   
   "ruleId":"a60416af-80a9-4378-be58-785c12b3ba8e",
   "ruleType":"LINEAR",
   "extRuleId":"Rule-100",
   "name":"1st Date",
   "description":"Basic criteria",
   "phase":"1st",
   "calendarId":"Calendar_117",
   "nodeId":"pkg",
   "locked":true,
   "lockOwner":user01,
   "dateEffective":null,
   "dateExpired":null,
   "pendingSnapshot":true,
   "conditions":[   
      {   
         "conditionType":"condition",
         "label":"Age is between ",
         "sentence":"Age is between {age_low} and {age_high}",
         "segmentList":[   
            "\"{age_low}\"",
            " and ",
            "\"{age_high}\""
         ],
         "parmList":[   
            "20",
            "and",
            "24"
         ]
      }
   ],
   "actions":[   
      {   
         "label":"Decision is ",
         "sentence":"Decision is \"{decision}\"",
         "segmentList":[   
            "\"{decision}\""
         ],
         "parmList":[   
            "OK"
         ]
      }
     ]
}

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 package ID, or does not have proper permission to perform this operation.
  • 404 Not Found—could not find specified rule ID.
  • 412 Precondition Failed—Rule was not locked first
  • 422 Unprocessable Entity—Rule does not validate
 
{
"message": "Validation Failed",
  "errors": [
    {
      "message": "Validation error 1"
    },
    {
      "message": "Validation error 2"
    }
  ]
}
  • 503—Service Unavailable

Notes

User must have RULE_MODIFY permission. User must have rule LOCKED. To modify something in LINEAR rule body, pass entire rule body (all conditions/actions), regardless of whether they were updated or not (eg, this is a total replacement of rule body). If the change causes the rule to not validate, a 422 will be returned with a list of "compiler errors". The changes have still been committed.

This page was last edited on May 16, 2017, at 08:20.
Comments or questions about this documentation? Contact us for support!