Description: Update an existing custom condition
Since: 3.116.x
Security: Requires a valid user with the "MANAGE_POLICIES" permission.
Usage: PUT /xray/api/v1/curation/conditions/{condition_id}
Consumes: application/json
Produces: application/json
Path Parameters: condition_id
Query Parameters: None
Request Body
Name | Type | Description |
---|---|---|
| string | One of the IDs of the supported condition templates returned by the list condition templates api |
| string | The name of the condition |
| Array[ParamWithValue] | Array of parameter values. |
ParamWithValue
Name | Type | Description |
---|---|---|
| string | A |
| Various. See explanation in the section about List Curation Condition Templates API. | A value that is allowed for the |
Response Body
Name | Type | Description |
---|---|---|
| string | The ID of the condition, used as path parameter when updating or deleting the condition and when referring to it in a policy. |
| string | One of the IDs of the supported condition templates returned by the list condition templates api |
| string | The name of the condition |
| Boolean | false for built-in immutable conditions, true for mutable user created custom conditions |
| string | Timestamp when the condition was created |
| Timestamp when the condition was updated | |
| One of: | |
| One of: " | |
| Array[ParamWithValue] | Array of parameter values. |
Sample Request
PUT /xray/api/v1/curation/conditions/29 Authorization: … Content-Type: application/json { "name": "log4shell", "condition_template_id": "CVEName", "param_values": [{"param_id": "cve_name", "value": "CVE-2021-45105"}] }
Sample Response
{ "id": "29", "is_custom": true, "created_by": "admin", "created_at": "2025-03-12T13:16:29+02:00", "updated_by": "admin", "updated_at": "2025-03-12T13:19:01+02:00", "risk_type": "security", "supported_pkg_types": ["Gradle", "Maven"], "condition_template_id": "CVEName", "name": "log4shell", "param_values": [ { "param_id": "cve_name", "value": "CVE-2021-45105" } ] }
Response Codes:
Status | Description |
---|---|
200 | OK |
400 | Bad request |
404 | Not found |