Add Condition to RLCL
Overview
Adds a condition to an RLCL. Conditions determine when the RLCL should be applied. If a condition is set, the RLCL is only applied when the condition evaluates to true.
Endpoint
POST /apiops/projects/{projectName}/rlcl/{rlclName}/condition/
Authentication
Requires a Personal API Access Token.
Header
Authorization: Bearer YOUR_TOKEN
Request
Headers
| Header | Value | Required |
|---|---|---|
| Authorization | Bearer {token} | Yes |
| Content-Type | application/json | Yes |
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| projectName | string | Yes | Project name |
| rlclName | string | Yes | RLCL name |
Request Body
Full JSON Body Example - Simple Condition
{
"conditionRuleList": [
{
"conditionCriteria": "VALUE",
"firstVariable": {
"name": "userTypeHeader",
"type": "HEADER",
"headerName": "X-User-Type"
},
"variableDataType": "STRING",
"valueComparisonOperator": "EQ",
"secondValueSource": "VALUE",
"secondValue": "PREMIUM"
}
]
}
Full JSON Body Example - Complex Condition with Multiple Rules
{
"conditionRuleList": [
{
"conditionCriteria": "OR",
"conditionRuleList": [
{
"conditionCriteria": "VALUE",
"firstVariable": {
"name": "userTypeHeader",
"type": "HEADER",
"headerName": "X-User-Type"
},
"variableDataType": "STRING",
"valueComparisonOperator": "EQ",
"secondValueSource": "VALUE",
"secondValue": "PREMIUM"
},
{
"conditionCriteria": "VALUE",
"firstVariable": {
"name": "apiVersionHeader",
"type": "HEADER",
"headerName": "X-API-Version"
},
"variableDataType": "STRING",
"valueComparisonOperator": "EQ",
"secondValueSource": "VALUE",
"secondValue": "v2"
}
]
}
]
}
Request Body Fields
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
| conditionRuleList | array[object] | Yes | - | List of condition rules. See ConditionRuleDTO |
ConditionRuleDTO (conditionRuleList item)
| Field | Type | Required | Description |
|---|---|---|---|
| conditionRuleList | array[object] | No | Nested condition rules (for complex conditions) |
| conditionCriteria | string | Yes | Condition criteria. See EnumConditionCriteria |
| firstVariable | object | Yes | First variable for comparison. See Variable Object |
| variableDataType | string | Yes | Variable data type. See EnumConditionVariableDataType |
| dateFormat | string | No | Date format for date comparisons |
| valueComparisonOperator | string | Yes | Comparison operator. See EnumConditionValueComparisonOperator |
| secondValueSource | string | Yes | Second value source. See EnumConditionValueSource |
| secondValue | string | No* | Static value for comparison (required if secondValueSource is VALUE) |
| secondVariable | object | No* | Second variable for comparison (required if secondValueSource is VARIABLE) |
EnumConditionCriteria (conditionCriteria)
VALUE- Value comparison (used for actual comparison operations)NOT- Negation (negates the condition)AND- Logical AND (all nested conditions must match)OR- Logical OR (any nested condition must match)
Note
For actual value comparisons, use VALUE. Use AND/OR/NOT for combining multiple conditions.